[Uri-review] Re: [art] Re: Alternative representation of URIs in YANG
Kent Watsen <kent+ietf@watsen.net> Tue, 09 December 2025 15:43 UTC
Return-Path: <0100019b03c7e8ed-3a974bbf-9e0d-45fe-89ec-0975ade9a5b0-000000@amazonses.watsen.net>
X-Original-To: uri-review@mail2.ietf.org
Delivered-To: uri-review@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id 06A6D980BC30; Tue, 9 Dec 2025 07:43:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (1024-bit key) header.d=amazonses.com
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wM7PGcAYQ_9v; Tue, 9 Dec 2025 07:43:17 -0800 (PST)
Received: from a48-92.smtp-out.amazonses.com (a48-92.smtp-out.amazonses.com [54.240.48.92]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id 9523E980BC29; Tue, 9 Dec 2025 07:43:17 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1765294991; h=From:Message-Id:Content-Type:Mime-Version:Subject:Date:In-Reply-To:Cc:To:References:Feedback-ID; bh=LVsXO5WsJpr44W0I9T83XRRjHnyf+WA+2xvUZnVvTsk=; b=ME8NVhbTXOx7y9b79FeyP/vqvlvXTl0E+zbRWe4vAZR+eFoYms7cpVFqqZh1aF2Q tnEfWrn5B9q1mY9HAKWU15werMd/c3aiM2nTK4lS5gW93Dt63P40sZxsKYToiISfyZx 09chDOZ3pWTYII4B9rl4cxkWCr0yEnk504UUQjDw=
From: Kent Watsen <kent+ietf@watsen.net>
Message-ID: <0100019b03c7e8ed-3a974bbf-9e0d-45fe-89ec-0975ade9a5b0-000000@email.amazonses.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_2AB1069A-48DF-4976-941A-D284017A2902"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\))
Date: Tue, 09 Dec 2025 15:43:11 +0000
In-Reply-To: <874iq0s6tl.fsf@hobgoblin.ariadne.com>
To: "Dale R. Worley" <worley@ariadne.com>
References: <874iq0s6tl.fsf@hobgoblin.ariadne.com>
X-Mailer: Apple Mail (2.3826.700.81)
Feedback-ID: ::1.us-east-1.DKmIRZFhhsBhtmFMNikgwZUWVrODEw9qVcPhqJEI2DA=:AmazonSES
X-SES-Outgoing: 2025.12.09-54.240.48.92
Message-ID-Hash: G6WKPL4UE2HRKTA7XOC5DCS3ID3RERUM
X-Message-ID-Hash: G6WKPL4UE2HRKTA7XOC5DCS3ID3RERUM
X-MailFrom: 0100019b03c7e8ed-3a974bbf-9e0d-45fe-89ec-0975ade9a5b0-000000@amazonses.watsen.net
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-uri-review.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: Mahesh Jethanandani <mjethanandani@gmail.com>, ietfa@btconnect.com, art@ietf.org, uri@w3.org, uri-review@ietf.org, mt@lowentropy.net
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [Uri-review] Re: [art] Re: Alternative representation of URIs in YANG
List-Id: Proposed URI Schemes <uri-review.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/uri-review/xbmOZrAoMHGKfzD0B6EtrA2J2Ow>
List-Archive: <https://mailarchive.ietf.org/arch/browse/uri-review>
List-Help: <mailto:uri-review-request@ietf.org?subject=help>
List-Owner: <mailto:uri-review-owner@ietf.org>
List-Post: <mailto:uri-review@ietf.org>
List-Subscribe: <mailto:uri-review-join@ietf.org>
List-Unsubscribe: <mailto:uri-review-leave@ietf.org>
> On Dec 8, 2025, at 8:54 PM, Dale R. Worley <worley@ariadne.com> wrote:
>
> But referring to my earlier message, I don't think the proposed module
> has that problem.
I hope this is true. Though folks are stating URIs are nearly impossible to structure, RFC 3986 (which is not obsolete) does not indicate this, and the only "update" to it (via RFC 8820) doesn't seem to indicate otherwise either.
> Maybe I've overlooked something in the discussion.
> Or maybe I've overlooked that the module has "host" as being mandatory,
> which for URIs it certainly isn't.
>
> The overall syntax of (absolute) URIs is
>
> URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
>
> hier-part = "//" authority path-abempty
> / path-absolute
> / path-rootless
> / path-empty
>
> so if you know the scheme, the authority (which may be empty), the path
> (which may be path-abempty, path-absolute, path-rootless, or
> path-empty), the query (which may be empty or absent), and the fragment
> (which may be empty or missing), you know the URI.
I think folks are misunderstanding the "presence" statement. Also, please note that, in YANG, the default "mandatory" value is "false". Lastly, the default "string" type in YANG may be empty. Together, the following abridged YANG:
container authority {
presence
"Indicates that 'authority' has been configured.";
leaf userinfo {
type string;
}
leaf host {
type inet:host;
mandatory true;
}
leaf port {
type inet:port-number;
}
}
Should be read as:
The "authority" node MAY be configured.
If the "authority" node is configured:
the "userinfo" node MAY be configured and, if configured, MAY be empty.
the "host" node MUST be configured.
the "port" node MAY be configured.
> Looking at all this a little more carefully, it seems that the module
> needs to be adjusted:
>
> - "userinfo" needs to be optional, because an *absent* userinfo is
> different from an *empty* userinfo. (The latter has an "@".)
>
> - ditto for "query"
>
> - ditto for "fragment"
>
> - "authority" needs to be optional within "uri"
To these points, I believe this is the case already. Specifically:
for the nodes "userinfo", "query", and "fragment", which are all of type "string":
the node is optional, as the "mandatory false" is the default.
when the node is configured, the string may be empty (i.e., ""), because no "length" statement is specified and the default minimum "length" is zero (0)
the "authority" is optional, because the "presence" statement is specified.
> With those fixes, it seems to me that the module matches RFC 3986. But
> maybe I'm wrong and someone can give an example that proves it.
I'm hopeful that no changes are needed to the YANG.
> Dale
Kent
- [Uri-review] Re: [art] Re: Alternative representa… Martin J. Dürst
- [Uri-review] Re: [art] Re: Alternative representa… tom petch
- [Uri-review] Re: [art] Alternative representation… Kent Watsen
- [Uri-review] Re: [art] Alternative representation… Martin Thomson
- [Uri-review] Re: [art] Re: Alternative representa… Martin J. Dürst
- [Uri-review] Re: [art] Alternative representation… Kent Watsen
- [Uri-review] Re: [art] Alternative representation… Martin Thomson
- [Uri-review] Re: [art] Alternative representation… Kent Watsen
- [Uri-review] Re: [art] Alternative representation… Martin Thomson
- [Uri-review] Re: [art] Alternative representation… Kent Watsen
- [Uri-review] Re: [art] Alternative representation… Martin Thomson
- [Uri-review] Re: [art] Alternative representation… Mahesh Jethanandani
- [Uri-review] Re: [art] Alternative representation… Kent Watsen
- [Uri-review] Re: [art] Alternative representation… Tim Bray
- [Uri-review] Re: [art] Re: Re: Alternative repres… worley
- [Uri-review] Re: [art] Re: Alternative representa… Kent Watsen
- [Uri-review] Re: [art] Alternative representation… worley
- [Uri-review] Re: [art] Re: Alternative representa… worley
- [Uri-review] Re: [art] Re: Alternative representa… Kent Watsen
- [Uri-review] Re: [art] Re: Alternative representa… worley
- [Uri-review] Re: [art] Re: Alternative representa… worley
- [Uri-review] Re: [art] Re: Alternative representa… Martin Thomson
- [Uri-review] Re: [art] Re: Alternative representa… worley
- [Uri-review] Re: [art] Re: Alternative representa… Kent Watsen
- [Uri-review] Re: [art] Re: Alternative representa… Martin Thomson
- [Uri-review] Re: [art] Re: Alternative representa… Tim Bray
- [Uri-review] Re: [art] Re: Alternative representa… Mahesh Jethanandani
- [Uri-review] Re: [art] Re: Alternative representa… Martin Thomson
- [Uri-review] Re: [art] Re: Alternative representa… Henry S. Thompson
- [Uri-review] Re: [art] Alternative representation… Sampo Syreeni
- [Uri-review] Re: [art] Re: Alternative representa… Kent Watsen
- [Uri-review] Re: [art] Re: Alternative representa… Tim Bray
- [Uri-review] Re: [art] Re: Alternative representa… Mahesh Jethanandani
- [Uri-review] Re: [art] Re: Alternative representa… Mark Nottingham
- [Uri-review] Re: [art] Re: Re: Alternative repres… Orie
- [Uri-review] Re: [art] Re: Alternative representa… Mahesh Jethanandani
- [Uri-review] Re: [art] Re: Alternative representa… Kent Watsen
- [Uri-review] Re: [art] Re: Re: Alternative repres… Martin Thomson
- [Uri-review] Re: [art] Re: Alternative representa… Kent Watsen
- [Uri-review] Re: [art] Re: Alternative representa… Martin Thomson
- [Uri-review] Re: [art] Alternative representation… Kent Watsen