- From: Dale R. Worley <worley@ariadne.com>
- Date: Mon, 15 Dec 2025 11:37:15 -0500
- To: Kent Watsen <kent+ietf@watsen.net>
- Cc: tbray@textuality.com, mjethanandani@gmail.com, ietfa@btconnect.com, art@ietf.org, uri@w3.org, uri-review@ietf.org, mt@lowentropy.net
[I forgot to send this message 5 days ago.]
Kent Watsen <kent+ietf@watsen.net> writes:
> 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.
Ah, good! Thanks for correcting me on those points. And of course,
that matches the ABNF for "authority" at the top of page 18 of RFC 3986.
Dale
Received on Monday, 15 December 2025 16:37:25 UTC