[Uri-review] Re: [art] Alternative representation of URIs in YANG

worley@ariadne.com Fri, 05 December 2025 04:12 UTC

Return-Path: <dale.worley@comcast.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 D6ADF95C87E7 for <uri-review@mail2.ietf.org>; Thu, 4 Dec 2025 20:12:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -1.881
X-Spam-Level:
X-Spam-Status: No, score=-1.881 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.017, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (2048-bit key) header.d=comcastmailservice.net
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 he6V4CagRAbk for <uri-review@mail2.ietf.org>; Thu, 4 Dec 2025 20:12:04 -0800 (PST)
Received: from resqmta-a2p-658785.sys.comcast.net (resqmta-a2p-658785.sys.comcast.net [IPv6:2001:558:fd01:2bb4::a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id AF31795C87DC for <uri-review@ietf.org>; Thu, 4 Dec 2025 20:12:04 -0800 (PST)
Received: from resomta-a2p-646964.sys.comcast.net ([96.103.145.236]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 256/256 bits) (Client did not present a certificate) by resqmta-a2p-658785.sys.comcast.net with ESMTPS id RMjrvGNr1rEchRNAjvf4zL; Fri, 05 Dec 2025 04:11:57 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcastmailservice.net; s=20211018a; t=1764907917; bh=DMGP3YgexaNb1Z8t6eTZeblbPiEARnmhNIjYnG8cIQo=; h=Received:Received:Received:Received:From:To:Subject:Date: Message-ID:Xfinity-Spam-Result; b=kb2pDp31mhl0+AJQfc9qTcaFIVJ6+D+jV7BgwN++EuycuEsktGfhUvaNBOxvFgBIX h60MzyXBOHdXv/YI/s2nEoOqUyO6KcJS2ASvdG6OSZghd8GjowaPeI4iMIN/AOfTQe 6BJwYh0/bxLk7W1XzIwKxwBaBuF/mg88W67sjNcJwNmC/ySEDfQs3OZ37dByFMmeIK r4QreEqomHlHNZclhMlDyAsow+04nKpkCqIEBG07bSIDbOfAyc1eAzJTfm9TA7zGjS UOw3SRcD8mXzbSADljkPOYvqQw9v5RPOWl/D1z1bafypLgFKOZTHkm/L30PfmnO/6B k+pZ2Q7lQcSiA==
Received: from hobgoblin.ariadne.com ([IPv6:2601:197:580:b5c0::b07d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 256/256 bits) (Client did not present a certificate) by resomta-a2p-646964.sys.comcast.net with ESMTPSA id RNAhvpCVU4GP3RNAivHB8K; Fri, 05 Dec 2025 04:11:56 +0000
Received: from hobgoblin.ariadne.com (localhost [127.0.0.1]) by hobgoblin.ariadne.com (8.16.1/8.16.1) with ESMTPS id 5B54Btw61967148 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 4 Dec 2025 23:11:55 -0500
Received: (from worley@localhost) by hobgoblin.ariadne.com (8.16.1/8.16.1/Submit) id 5B54BsnJ1967145; Thu, 4 Dec 2025 23:11:54 -0500
X-Authentication-Warning: hobgoblin.ariadne.com: worley set sender to Dale.Worley@comcast.net using -f
From: worley@ariadne.com
To: Martin Thomson <mt@lowentropy.net>
In-Reply-To: <04751771-27b6-4894-81dc-82036aeea5d2@betaapp.fastmail.com> (mt@lowentropy.net)
Sender: worley@ariadne.com
Date: Thu, 04 Dec 2025 23:11:54 -0500
Message-ID: <87jyz1a7p1.fsf@hobgoblin.ariadne.com>
X-CMAE-Envelope: MS4xfJF3ZyKqRuQgT4qqiLYvLuhYFTZui2ifePf664OIhJnivqsKPoui3YQK6RVq5bmPv9M8PmG4muBQWtIIEstMwp4QC1uIxD9EjO5yxg86BXghmYIQ/WM+ QSHDIQBBf5B2gRE/Jx9GS9kuj7tTM5bh/WJPpz1aWkEKjXgAikrdPsadJrKjBOWiQLy7e1OA0BLFVKtC5jc14HmeIXsTDfPfdFvSglSngkhijAV79yOWeXGA PjLr4saiYZyI2LC8Dq9F2rzabiO2n6JGvJSiHxiqOgFW0evChFiM6cw3B970ar9g4A7AFQh0up+saR39/yqKhV4/59iJBf9zbBwQFjQsIVQ=
Message-ID-Hash: AFRUX6U4SEMF7H435STLYHPI2BK3TQ4V
X-Message-ID-Hash: AFRUX6U4SEMF7H435STLYHPI2BK3TQ4V
X-MailFrom: dale.worley@comcast.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: art@ietf.org, kent+ietf@watsen.net, uri@w3.org, uri-review@ietf.org
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [Uri-review] Re: [art] 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/LltHcrvQWCaa6xnSyhXm3hYZiXM>
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>

"Martin Thomson" <mt@lowentropy.net> writes:
> I recently had cause to review draft-ietf-netconf-http-client-server
> and found Section 2 [2] gave me pause.
>
> This section claims to represent URIs with a name of "ietf-uri" for
> the module.  However, it seems like the only form on offer is a very
> specific authority form.  This might be sufficient for HTTP URIs, but
> I doubt it works for SIP, file, or many other URI forms.

Is that true?  I compared draft-ietf-netconf-http-client-server with RFC
3986, and at first look, it seems like the Yang covers all of the URI
forms allowed by the RFC.  To pick a couple of examples: (with query and
fragment being empty in all cases)

    mailto:worley@ariadne.com

scheme = mailto
hier-part = path-rootless = segment-nz = worley@ariadne.com
authority =

    urn:alert:source:family

scheme = urn
hier-part = path-rootless = segment-nz = alert:source:family
authority =

There is a bit of oddity in that the Yang leaf "path" doesn't correspond
to a nonterminal named "path" in the parse tree of any URI because the
grammar is

      URI         = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

      hier-part   = "//" authority path-abempty
                  / path-absolute
                  / path-rootless
                  / path-empty

But there *is* a nonterminal "path" that is the collective name for the
nonterminals "path-abempty", "path-absolute", "path-rootless", and
"path-empty", and one of those *does* appear in the parse tree of any
(absolute) URI:

      path          = path-abempty    ; begins with "/" or is empty
                    / path-absolute   ; begins with "/" but not "//"
                    / path-noscheme   ; begins with a non-colon segment
                    / path-rootless   ; begins with a segment
                    / path-empty      ; zero characters

Note that "path-noscheme" is also included in "path", but
"path-noscheme" is only used in relative URIs, which aren't in scope.

Dale