Re: [netmod] Use XML namespaces in YANG document examples
Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de> Mon, 07 February 2022 21:14 UTC
Return-Path: <J.Schoenwaelder@jacobs-university.de>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DB99F3A0B19; Mon, 7 Feb 2022 13:14:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.9
X-Spam-Level:
X-Spam-Status: No, score=-6.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=jacobsuniversity.onmicrosoft.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CU_rpyVDesl3; Mon, 7 Feb 2022 13:14:08 -0800 (PST)
Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02on0612.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe07::612]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7AFE43A0AA2; Mon, 7 Feb 2022 13:13:43 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bkj4tnofbHBALAHN4aUSlkhzHcasX83ODoMEQCfU4t6i/fsbxjrXHLFOJfaL/MVR3FCxG3j5kMziux4q1ytr32xn7l3aVQyAERrvLKgcNNBgFJclkp33FhuwrhTW2gmPyYNjkODoeitP+534HBSqAWv4dQXMOVIsVpfLmt7I+0XuqIALA9EO4vNS34v60U3o5vTILtfS9QJw6TWfgDUX2VFV0OKuzDFh5Nbw/wyyfNNl3/ex/BuYQgqAWJdJSqdzOaSG19A2n2K1LKjpUdf9NCGpw3L5YiFp/Z1/lILcmBi9XCyMMqd4YyOZhVShFKLxA8tznwVadXNjkEOXkZy2VQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+Pd6cyxC0i9HZHrFkrCJxa5KhOpTRJDzg9f8AVQEsFk=; b=JQgMkzpMQhAN8AQLUiYwgeRX1m3yQVXKXqWP6glUk527mv1SLFBywNcoEnpRZ7pLexHnEzEI9uNU494Evpfa5Q5n7k09z+sJS/i+d9RZtFTrOUghAFpuHtmK47Y4irFFfo5/CYxEpE+57rTRLWJkL9qMWJrGB4QJQLUFHfv41NXqhGjxtOl7Mk+a88Ooe1QM5FHj1L7XTMIyqrLK6G41GlOXq6x8FKBEF8Zy3qVB0Z6zfScMXKWT/GWakGggExB5H4caECKo635WaFAUYe3IIYevWtjJPvqYQJf3yADHGL1yuqeHRB6llwqGtx+87YTnnluIj8zYsn8S+be1N2CxbA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jacobsuniversity.onmicrosoft.com; s=selector2-jacobsuniversity-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+Pd6cyxC0i9HZHrFkrCJxa5KhOpTRJDzg9f8AVQEsFk=; b=VHvhZ0XYLpLtkBsl+1JVxq4BhN9U9kjJgdoav1Nt0dyEAQCHfdKk/RX1xh0F4TcWEjLmd44UtWE86tq2wmcVm/wqF+RVKaAsOSRXt+cpeQ+oRjWikgOnFY1qVrYCSUSl4GNS7csSHI9b+6L/W7sivYhMyRZ5urMhiXM4nk2fmXk=
Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=jacobs-university.de;
Received: from AM0P190MB0641.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:194::23) by AM4P190MB0178.EURP190.PROD.OUTLOOK.COM (2603:10a6:200:62::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.14; Mon, 7 Feb 2022 21:13:37 +0000
Received: from AM0P190MB0641.EURP190.PROD.OUTLOOK.COM ([fe80::ac24:5a30:ebfa:19af]) by AM0P190MB0641.EURP190.PROD.OUTLOOK.COM ([fe80::ac24:5a30:ebfa:19af%7]) with mapi id 15.20.4951.019; Mon, 7 Feb 2022 21:13:30 +0000
Date: Mon, 07 Feb 2022 22:13:28 +0100
From: Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de>
To: Tim Bray <tbray@textuality.com>
Cc: ianfarrer@gmx.com, Martin Björklund <mbj+ietf@4668.se>, jernej.tuljak@mg-soft.si, dhc-chairs@ietf.org, "Eric Vyncke (evyncke)" <evyncke@cisco.com>, netmod@ietf.org, drafts-expert-review@iana.org
Message-ID: <20220207211328.vflkodtzf67mdvcb@anna>
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: Tim Bray <tbray@textuality.com>, ianfarrer@gmx.com, Martin Björklund <mbj+ietf@4668.se>, jernej.tuljak@mg-soft.si, dhc-chairs@ietf.org, "Eric Vyncke (evyncke)" <evyncke@cisco.com>, netmod@ietf.org, drafts-expert-review@iana.org
References: <CAHBU6is235QT3d7q+0xhJHdtVna_9-qjGzHG_P4gnMd6nKtdTw@mail.gmail.com> <20220204.081841.166197909676487568.id@4668.se> <866e763b-88ce-ca3f-300a-7f702467fe7c@mg-soft.si> <20220204.161536.1816358672148417997.id@4668.se> <5BDB40B2-F191-41BC-92DF-BD0A94B6E992@gmx.com> <20220207200304.qhkvwrxwl5i56qqk@anna> <CAHBU6itN7xYOTjusFpffX-Q4P=i4hyw5Wny+siX9hLjNz5Ug4A@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CAHBU6itN7xYOTjusFpffX-Q4P=i4hyw5Wny+siX9hLjNz5Ug4A@mail.gmail.com>
X-ClientProxiedBy: AM0PR01CA0156.eurprd01.prod.exchangelabs.com (2603:10a6:208:aa::25) To AM0P190MB0641.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:194::23)
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 3929159a-9067-45c5-a6fe-08d9ea7eb08b
X-MS-TrafficTypeDiagnostic: AM4P190MB0178:EE_
X-Microsoft-Antispam-PRVS: <AM4P190MB0178442EC684D221A51848A4DE2C9@AM4P190MB0178.EURP190.PROD.OUTLOOK.COM>
X-MS-Oob-TLC-OOBClassifiers: OLM:9508;
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: SYg3p8AZU7BXTTDXVwJQXagmUjNe19RUx51i/gaZWBM7YmCspc82Z2xq1J2mUeo0fau0g6CzfJ2T/tVPilPmz3ph5TyELK9dzV4g+x7KmsOzR7JLGzHOxTwhskGFwzeSLuyxI3uKn7dJ8rLRAoqXnSbO6bd1ntwhdj/hxaPUKK5K7dezjw/8q99ykLpHydfeQDSfklGcfGU8j0DkW9MxFMI8L3zr/fhwQ2xqgaFd5v+xxzyOI7muSHt58LMKsI3ORIwq3+7GZEPV0jBnOs80iSelrRQIB2ygjO9k8efdpKsbhRkRxjxXyQ/Ja7nEJDF5+xqj3Oze7IKA2Xq0/0LbMvEKpX03Tf5hCqUndU9d8jRxlzQWvwLJ9FxqwougnQcYRgzD4xinXVotDyqfjxE+fEbJBSpkesfQep70wWLkZA0a3yaIq6pq6ETBIQXjbBgrrrrNXnDWHAZofTsKM9ZRsbvVg6OX8Id/0asdDRxLW73pWDh9hsdx/zu7omBkUrnD4yXj2h/GjyookFKidA6Ia2scvOchx+ouCnQi7c6iwtDcptyt2aNF2WPb9da0DGtLzZU5hOTFio6F4ah3vxL8vJlEQDUOIexf35GXIOuVvcsK371bx+/6Tsfaz21SEiNd9Eh5RmQtfzufXK7DkvY4POcDka1xgNRSrag+fYkliWi3v1hslvBrP/udF/bLPPXNESD/CTjIIvPJ0E/F0o/5sDv2cusdP1fYv3ddx4ULhEv74Xb3hY9b0nb2Wzjh7CPYkhXYpYa66aWZVpFtfaZj/l0ZHiyqWXtD/ZL8YuTRn6jjsablAR8rm9LwgKjfRcLt4g6YSIqFsbKtRk+4eN0xrWrUrQ57AeGLw/nVPB/ecYo=
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0P190MB0641.EURP190.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230001)(7916004)(366004)(52116002)(53546011)(54906003)(2906002)(66476007)(66556008)(66946007)(3450700001)(4326008)(33716001)(966005)(316002)(38100700002)(6916009)(86362001)(38350700002)(6486002)(8676002)(786003)(8936002)(66574015)(85182001)(5660300002)(1076003)(40140700001)(83380400001)(26005)(186003)(6512007)(508600001)(85202003)(30864003)(6506007)(9686003)(518174003); DIR:OUT; SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: qda1c9k7fML6NYJ/sIi2t5yrCXM60i68gQ+hcddVb5Vv7wF1ZhSfufIoL8v2ZTPgA9xT8nVu1f0KxK5jyPUguV1MWlTfGuO6J19d4q1IboQqaY8HXjXKgllqv1OsZZK0SeZ5f/dIsw63iuelfyg2MnwJkjH8AhRObulIFZrztLI723wBxBfCDsJKUFEP8i8zHT5dz7SZjOTCmA5RDpFSuGXaSuHbfJwWFZ8KXVrcCkBCI3/q3KYm4oIsZlHpib9/SAPEgp1ODQ1n+eRdroggN53KJO+QTKYU8KrvmhlPRy9RHZJOI8nuxpNnZVwLO/o+zgtw5S40k1sCzhU3hvF5HHY5XxW0Leb9ACAWLK/n5W9uugcQeD8GFYZ1eaCrUmYcdIPcNKPYG/OQANyuPjdHMchZoXLYMhoxt+iHThGUxRs+uxE/B+piMzr2GHxj41l9Pq8yOj0Cq2JXGdeTEIQRcEISPjEZ8kFq+H4xx7GR1FkSjc4qIcagP4yxAqIV+lTXfx4fVBnwlmFYcZe6+ZMrmkhU6sCD9Mga0SZa4Fsr0P3sd1lGCZPoDGWjygf34ncEN02vQfNIFCu67T8BYmUmiFNsqCXOjqSL7p4qk0pQ7sShzxa4OJ/o0kk/PkPE042aYHUM1Vvey6ojHww3xl4HRVjGRbqWF4Elh1hwahOASi5vy65B5xFgmojbWsaT+QyvI2kgmjBaa4koMQEkdZ/jXbAVXLFqbFOL90jnx2NFnv8MrvFdKcHG4NWsobGvIYWX7HHTUi/3wa+ToHTRKEzTo7B23u+hbk9C309tOF2M0PrsC6ngVU791efFn0HACs1RVguG3ZdGsf631z6YMtHLvKaJLtA9JmwnbIZm+EcpAf8ivt6LulmorGXURMfOh3dwRoyL6fMthplWXwI6woJVGewxlYhe1M+UwFpIEr79V8n5tM2cYBbpZheWmsnPGk4lV3jJQBpIxKm55XvloKfXFj3S598rOHKHgZV8DPtFcku36Ac2v+2MQiRhkCtcikQzlkK/95RIshp6BQ1CNquhGiPZnbTZmSEfD7k95LZPuodIxIuvMkhRNZLi7Ic+3xaooQy9N0VQWO9C/aywKpY0p7UhOOwAP2brfhqW5bXcg1UET79SobRKKfaiX9vK4++RskkiYS8k1k9rO5Up908oa8k6Grjagbct8S1dmRaL5k7N/Zgpm+8vDVyaAWqp3wFPhaUJIZajZ1sK/0R4+5GKoZqHEKkrraDwNWavnzR+KsWs2C/qNEXz6HzEcASPdED0H/8NqThNDgvPiQwWCYbi34Shw0dS6eZwjFk3w3OmD8p8A48hReBQleobuFXMnatdA0IOimVyWgKDjY7f1xuIJhd0c0Xqk5B/4+Fw8VLZKy66RPWvkbBHW4IK+z7z0HrEw/S5mK/ouksowbvrBebG/sCOQOh1HNbdCU6pM0i7QdsnOOXDDFgDWorK3c6LMbv4gY5HxsabQjtPZi90HDUCQ+h5E9xGrNN/lqtfzBmwUFnG0JgouwTOn/MAJ1mpbSnoBdkOwso2wBWFmtXhSMmRwVLbHPHwAuuh+uY8NHqi+iYwAGV5TgLR8sXteVwwR0p6BwkKT8MDkG1+fnqL1/qiED6vPILQQSipFWCZ57XzArb2HTD42iG95AGttJL2paJOlMHP7BLCPHMCID6JKf6H380tXHmFlE6juqYeSi/frE8=
X-OriginatorOrg: jacobs-university.de
X-MS-Exchange-CrossTenant-Network-Message-Id: 3929159a-9067-45c5-a6fe-08d9ea7eb08b
X-MS-Exchange-CrossTenant-AuthSource: AM0P190MB0641.EURP190.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2022 21:13:29.9919 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: f78e973e-5c0b-4ab8-bbd7-9887c95a8ebd
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: ItWbgf6fNIPsjAOy09/tXUW+IDQLVH85X8XnlExaSjm7WSWqcK98KYweUdyzX1Lw1qQFGIt+comX9Jnn0kIyxRsv+lhTRNUcFoSOLmIlBm8=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4P190MB0178
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/FWGunT8MuZlD58r2J4wDTQVd3Ko>
Subject: Re: [netmod] Use XML namespaces in YANG document examples
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 07 Feb 2022 21:14:15 -0000
The XML encoding rules are part of RFC 7950, I do not think this document has to clarify the properties of these encoding rules. Since this document normatively depends on RFC 7950, I think it can be expected that implementors understand RFC 7950. You can of course file an erratum against RFC 7950, I assume it will go through the usual process and the WG will discuss it. /js On Mon, Feb 07, 2022 at 12:56:02PM -0800, Tim Bray wrote: > I can see your point, and I'm not trying to get in YANG's way. From my > PoV, I think the question I'm being asked to answer is "Does this RFC > provide the information needed to build an interoperable implementation?" > And on the XML front, it does a weak job, which I pointed out, and provided > text which would address that weakness. Whatever you decide to do, I guess > I should file an erratum against 7950; any objection to that? > > On Mon, Feb 7, 2022 at 12:03 PM Jürgen Schönwälder < > j.schoenwaelder@jacobs-university.de> wrote: > > > While adding such a disclaimer may help you to move your document > > forward (which I assume is your main priority), this looks to me like > > a disclaimer added to an arbitrary YANG document for the sake of > > making a reviewer happy while (i) we never did this before and (ii) we > > likely have no plan to do this in the future. > > > > If this issue is really important, then someone should write an I-D or > > an errata for RFC 7950 that clarifies this for _all_ YANG modules. > > > > Given that YANG is 11+ years old, I am not convinced this clarification > > is needed, but that certainly may be a biased opinion. > > > > Hence, my preference is to add no disclaimer and to move forward. > > > > /js > > > > On Mon, Feb 07, 2022 at 08:40:49PM +0100, ianfarrer@gmx.com wrote: > > > Hi, > > > > > > Reading back through the discussion, I think I can summarise the outcome > > to the following 2 points: > > > > > > 1,The examples in the DHCPv6 YANG draft can keep the current use of XML > > prefixes (e.g. ianaift:ethernetCsmacd) > > > > > > 2, In the XML examples appendix, I will change the first paragraph to > > read: > > > > > > XML Examples for DHCPv6 Element Configuration > > > > > > This section contains XML examples of data trees for the different > > > DHCPv6 elements. In order for the XML data to be used correctly, > > > the XML prefix must be the same as the namespace prefix. i.e, for > > > The client configuration example, the characters before the colon > > > (or 'ianaift:’ in the "interface/type” element content) must match the > > > xmlns defined for "urn:ietf:params:xml:ns:yang:iana-if-type”. In this > > > case xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type”. > > > Therefore, XML software must be chosen that makes the namespace prefix > > > information available. > > > > > > Does this sound like the right way to proceed? > > > > > > Thanks, > > > Ian > > > > > > > > > > > > > > > > On 4. Feb 2022, at 16:15, Martin Björklund <mbj+ietf@4668.se> wrote: > > > > > > > > Jernej Tuljak <jernej.tuljak@mg-soft.si> wrote: > > > >> > > > >> > > > >> On 04/02/2022 08:18, Martin Björklund wrote: > > > >>> Tim Bray <tbray@textuality.com> wrote: > > > >>>> On Thu, Feb 3, 2022 at 10:21 AM Martin Björklund <mbj+ietf@4668.se> > > > >>>> wrote: > > > >>>> > > > >>>>> If an XML document has <foo xmlns:bar="...">, won't the XML > > processor > > > >>>>> pass the attribute "xmlns:bar" and its value to the application? > > This > > > >>>>> should be enough even if the XML processor doesn't provide a > > mapping > > > >>>>> table between prefix and namespace (it requires more work in the > > > >>>>> application of course). > > > >>>>> > > > >>>> Nope, there's no requirement that they do and some don't. > > > >>> Does this mean that an XML processor might not pass attributes in > > > >>> general to the application? If so, we might have other similar > > > >>> problems. Or does it mean that an XML processor might just not pass > > > >>> these "special" attributes? If so, where is that specified? (I > > tried > > > >>> to find this info in the spec, but didn't find it). > > > >> > > > >> Names that start with "xml" (case insensitive) are reserved by XML 1.0 > > > >> specification, "xmlns" in an attribute name included (2.3 Common > > > >> Syntactic Constructs). They are special. There is also a guideline on > > > >> colon usage within names. > > > > > > > > Yes, I know. But I can't see that the spec says that attributes w/ > > > > reserved names should be treated differently wrt. the application than > > > > other attributes. > > > > > > > >> All processors I'm aware of differentiate between attributes and > > > >> namespace attributes in their APIs. What Tim is probably saying is > > > >> that some XML processors either don't implement Namespaces in XML 1.0 > > > >> or need to be explicitly configured to become "namespace aware". If > > > >> not configured as namespace aware, they might simply ignore namespace > > > >> attributes therefore not passing them. If they are configured as > > > >> namespace aware, they might remove prefix information and pass only > > > >> "namespace : local-name" pairs where required (and that excludes text > > > >> node content). > > > > > > > > I guess I wonder if this is b/c the specification says so, or that > > > > some implementations choose to do so. > > > > > > > > > > > > /martin > > > > > > > > > > > > > > > >> > > > >> Jernej > > > >> > > > >>> > > > >>> > > > >>> /martin > > > >>> > > > >>> > > > >>>>> I think that if special text is needed for identityref values in > > XML, > > > >>>>> that text should go in to the YANG specification (RFC 7950). All > > > >>>>> these other drafts just follow the rules defined in RFC 7950. > > > >>>>> > > > >>>> Agreed. > > > >>>> > > > >>>> > > > >>>> > > > >>>>> > > > >>>>> /martin > > > >>>>> > > > >>>>> > > > >>>>> > > > >>>>>> > > > >>>>>> > > > >>>>>> > > > >>>>>> > > > >>>>>>> > > > >>>>>>> Andy > > > >>>>>>> > > > >>>>>>> > > > >>>>>>>> I've excerpted an email exchange with Ian Farrer that I think > > makes > > > >>>>> the > > > >>>>>>>> potential problem concrete: > > > >>>>>>>> > > > >>>>>>>> Hi Ian, I don't think we've met. I'm the grumpy person on the > > "XML > > > >>>>>>>> Directorate" who's been whining about the namespace prefixes in > > YANG > > > >>>>>>>> internet-drafts. One quick issue: I'm a little surprised, is > > anyone > > > >>>>> still > > > >>>>>>>> using XML in this kind of thing any more in 2021? > > > >>>>>>>> > > > >>>>>>>> Anyhow, below I've excerpted the issue that's still troubling > > me. > > > >>>>> Here's > > > >>>>>>>> the XML: > > > >>>>>>>> > > > >>>>>>>> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces" > > > >>>>>>>> xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type"> > > > >>>>>>>> <interface> > > > >>>>>>>> <name>eth0</name> > > > >>>>>>>> <type>ianaift:ethernetCsmacd</type> > > > >>>>>>>> <description>DHCPv6 Relay Interface</description> > > > >>>>>>>> <enabled>true</enabled> > > > >>>>>>>> </interface> > > > >>>>>>>> </interfaces> > > > >>>>>>>> > > > >>>>>>>> So my question is, I see the XML namespace prefix and the > > prefix for > > > >>>>> the > > > >>>>>>>> <type> element content are identical. Is this a coincidence? > > For > > > >>>>> example, > > > >>>>>>>> would the following work, changing the namespace prefix to > > "foo"? > > > >>>>>>>> > > > >>>>>>>> > > > >>>>>>>> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces" > > > >>>>>>>> xmlns:foo="urn:ietf:params:xml:ns:yang:iana-if-type"> > > > >>>>>>>> <interface> > > > >>>>>>>> <name>eth0</name> > > > >>>>>>>> <type>ianaift:ethernetCsmacd</type> > > > >>>>>>>> <description>DHCPv6 Relay Interface</description> > > > >>>>>>>> <enabled>true</enabled> > > > >>>>>>>> </interface> > > > >>>>>>>> </interfaces> > > > >>>>>>>> > > > >>>>>>>> [if - This example would not work and fails validation with > > yanglint: > > > >>>>>>>> > > > >>>>>>>> $ yanglint --strict --verbose -t config -p $IETFYANG > > > >>>>>>>> $IETFYANG/iana-if-type.yang $IETFYANG/ietf-interfaces.yang > > test1.xml > > > >>>>>>>> err : Invalid value "ianaift:ethernetCsmacd" in "type" element. > > > >>>>>>>> (/ietf-interfaces:interfaces/interface[name='eth0']/type) > > > >>>>>>>> ] > > > >>>>>>>> > > > >>>>>>>> > > > >>>>>>>> Follow-up, would the following work, foo for both namespace and > > > >>>>> content > > > >>>>>>>> prefix? > > > >>>>>>>> > > > >>>>>>>> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces" > > > >>>>>>>> xmlns:foo="urn:ietf:params:xml:ns:yang:iana-if-type"> > > > >>>>>>>> <interface> > > > >>>>>>>> <name>eth0</name> > > > >>>>>>>> <type>foo:ethernetCsmacd</type> > > > >>>>>>>> <description>DHCPv6 Relay Interface</description> > > > >>>>>>>> <enabled>true</enabled> > > > >>>>>>>> </interface> > > > >>>>>>>> </interfaces> > > > >>>>>>>> > > > >>>>>>>> Thanks in advance! > > > >>>>>>>> > > > >>>>>>>> > > > >>>>>>>> [if - This does validate with yanglint, however the convention > > in the > > > >>>>>>>> IETF examples I’ve seen seems to be to use the prefix that is > > defined > > > >>>>> in > > > >>>>>>>> the original YANG module for imports for consistency, e.g. (from > > > >>>>>>>> iana-if-type.yang): > > > >>>>>>>> > > > >>>>>>>> > > > >>>>>>>> On Thu, Feb 3, 2022 at 8:03 AM Andy Bierman <andy@yumaworks.com > > > > > > >>>>> wrote: > > > >>>>>>>>> Hi, > > > >>>>>>>>> > > > >>>>>>>>> I think the text from sec 4 refers to the usage within an > > > >>>>> application. > > > >>>>>>>>> The XML instance document is the on-the-wire representation and > > > >>>>>>>>> the I-D example looks correct. > > > >>>>>>>>> > > > >>>>>>>>> https://www.w3.org/TR/xml-names/#ns-qualnames > > > >>>>>>>>> > > > >>>>>>>>> > > > >>>>>>>>> Andy > > > >>>>>>>>> > > > >>>>>>>>> > > > >>>>>>>>> On Thu, Feb 3, 2022 at 3:53 AM tom petch <ietfc@btconnect.com> > > > >>>>> wrote: > > > >>>>>>>>>> From: netmod <netmod-bounces@ietf.org> on behalf of > > > >>>>> ianfarrer@gmx.com < > > > >>>>>>>>>> ianfarrer@gmx.com> > > > >>>>>>>>>> Sent: 03 February 2022 09:37 > > > >>>>>>>>>> > > > >>>>>>>>>> Hi, > > > >>>>>>>>>> > > > >>>>>>>>>> A draft I have been working on ( > > > >>>>>>>>>> https://datatracker.ietf.org/doc/draft-ietf-dhc-dhcpv6-yang/) > > > >>>>> contains > > > >>>>>>>>>> a number of XML configuration examples. During the XML expert > > > >>>>> review, a > > > >>>>>>>>>> question has been raised about the use of XML namespaces in > > these > > > >>>>> examples. > > > >>>>>>>>>> I’m raising it here as I don’t have the XML knowledge to > > answer. > > > >>>>>>>>>> > > > >>>>>>>>>> <tp> > > > >>>>>>>>>> > > > >>>>>>>>>> Ian > > > >>>>>>>>>> > > > >>>>>>>>>> This looks like the issue I raised on this list 14jan2022 > > with a > > > >>>>>>>>>> subject line of > > > >>>>>>>>>> XML and prefix > > > >>>>>>>>>> although I have not checked that the usage is exactly the > > same; the > > > >>>>>>>>>> 'XML Expert' comment would appear to be. > > > >>>>>>>>>> > > > >>>>>>>>>> Tom Petch > > > >>>>>>>>>> > > > >>>>>>>>>> In my example: > > > >>>>>>>>>> > > > >>>>>>>>>> <interfaces > > xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces" > > > >>>>>>>>>> > > > >>>>>>>>>> xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type"> > > > >>>>>>>>>> <interface> > > > >>>>>>>>>> <name>eth0</name> > > > >>>>>>>>>> <type>ianaift:ethernetCsmacd</type> > > > >>>>>>>>>> <description>DHCPv6 Relay Interface</description> > > > >>>>>>>>>> <enabled>true</enabled> > > > >>>>>>>>>> </interface> > > > >>>>>>>>>> </interfaces> > > > >>>>>>>>>> > > > >>>>>>>>>> The question is related to the use of the ‘ianaift:’ prefix. > > This is > > > >>>>>>>>>> quite commonly use in XML examples in YANG documents (e.g. > > RFC8344) > > > >>>>> so I > > > >>>>>>>>>> think the question is generally applicable. > > > >>>>>>>>>> > > > >>>>>>>>>> The specific comments from the expert review are: > > > >>>>>>>>>> > > > >>>>>>>>>> - > > > >>>>>>>>>> For the correct processing of these documents requires that > > whatever > > > >>>>>>>>>> XML software is being used makes available to application > > code the > > > >>>>>>>>>> namespace prefixes. > > > >>>>>>>>>> > > > >>>>>>>>>> Whilst the recommended tools (e.g. yanglint) provides this > > > >>>>> function, it > > > >>>>>>>>>> is not an XML best practice. Quoting from the Namespaces in > > XML, > > > >>>>> section 4: > > > >>>>>>>>>> "Note that the prefix functions only as a placeholder for a > > > >>>>> namespace name. > > > >>>>>>>>>> Applications SHOULD use the namespace name, not the prefix, in > > > >>>>> constructing > > > >>>>>>>>>> names whose scope extends beyond the containing document.” > > > >>>>>>>>>> > > > >>>>>>>>>> I think that violating a SHOULD assertion in a W3C standard > > is a > > > >>>>>>>>>> problem. > > > >>>>>>>>>> > > > >>>>>>>>>> There is no requirement for XML processors to provide this > > prefix > > > >>>>>>>>>> information, and software that (quite legally) doesn't, will > > not > > > >>>>> work > > > >>>>>>>>>> correctly with YANG documents constructed as specified in > > this I-D. > > > >>>>>>>>>> > > > >>>>>>>>>> 1, YANG specifications should note this fact and specify that > > > >>>>> software > > > >>>>>>>>>> which is used to process YANG documents MUST provide an > > interface > > > >>>>> such that > > > >>>>>>>>>> applications can retrieve the prefix-namespace mappings. > > > >>>>>>>>>> 2, For constructs such as <type>ianaift:ethernetCsmacd</type> > > the > > > >>>>>>>>>> Internet-Draft should specify that the prefix ("ianaift" in > > this > > > >>>>> case) MUST > > > >>>>>>>>>> be identical to the xmlns namespace prefix representing the > > > >>>>> namespace name > > > >>>>>>>>>> urn:ietf:params:xml:ns:yang:iana-if-type > > > >>>>>>>>>> 3, Alternately, the draft could specify that for the namespace > > > >>>>>>>>>> urn:ietf:params:xml:ns:yang:iana-if-type, the XML namespace > > prefix > > > >>>>> ianaift > > > >>>>>>>>>> MUST be used. Another XML bad practice because software that > > > >>>>> generates XML > > > >>>>>>>>>> programmatically should feel free to generate synthetic > > prefixes > > > >>>>> without > > > >>>>>>>>>> breaking the content, but at least this would solve the > > problem. > > > >>>>>>>>>> - > > > >>>>>>>>>> > > > >>>>>>>>>> BCP216 (RFC8407 - Guidelines for Authors and Reviewers of > > Documents > > > >>>>>>>>>> Containing YANG modules) doesn’t make any mention of how XML > > > >>>>> namespaces > > > >>>>>>>>>> should be used, only that example XML/ JSON should be > > included and > > > >>>>> that > > > >>>>>>>>>> these examples need to be validated (pyang and yanglint are > > > >>>>> mentioned for > > > >>>>>>>>>> this). > > > >>>>>>>>>> > > > >>>>>>>>>> Does this guidance need to be updated to reflect expert review > > > >>>>> comments > > > >>>>>>>>>> above? > > > >>>>>>>>>> > > > >>>>>>>>>> Thanks, > > > >>>>>>>>>> Ian > > > >>>>>>>>>> > > > >>>>>>>>>> > > > >>>>>>>>>> > > > >>>>>>>>>> _______________________________________________ > > > >>>>>>>>>> netmod mailing list > > > >>>>>>>>>> netmod@ietf.org > > > >>>>>>>>>> https://www.ietf.org/mailman/listinfo/netmod > > > >>>>>>>>>> > > > >>> _______________________________________________ > > > >>> netmod mailing list > > > >>> netmod@ietf.org > > > >>> https://www.ietf.org/mailman/listinfo/netmod > > > >> > > > > _______________________________________________ > > > > netmod mailing list > > > > netmod@ietf.org > > > > https://www.ietf.org/mailman/listinfo/netmod > > > > > > > > _______________________________________________ > > > netmod mailing list > > > netmod@ietf.org > > > https://www.ietf.org/mailman/listinfo/netmod > > > > > > -- > > Jürgen Schönwälder Jacobs University Bremen gGmbH > > Phone: +49 421 200 3587 Campus Ring 1 | 28759 Bremen | Germany > > Fax: +49 421 200 3103 <https://www.jacobs-university.de/> > > -- Jürgen Schönwälder Jacobs University Bremen gGmbH Phone: +49 421 200 3587 Campus Ring 1 | 28759 Bremen | Germany Fax: +49 421 200 3103 <https://www.jacobs-university.de/>
- [netmod] Use XML namespaces in YANG document exam… ianfarrer
- Re: [netmod] Use XML namespaces in YANG document … tom petch
- Re: [netmod] Use XML namespaces in YANG document … Andy Bierman
- Re: [netmod] Use XML namespaces in YANG document … Tim Bray
- Re: [netmod] Use XML namespaces in YANG document … Mahesh Jethanandani
- Re: [netmod] Use XML namespaces in YANG document … Andy Bierman
- Re: [netmod] Use XML namespaces in YANG document … Carsten Bormann
- Re: [netmod] Use XML namespaces in YANG document … Tim Bray
- Re: [netmod] Use XML namespaces in YANG document … Tim Bray
- Re: [netmod] Use XML namespaces in YANG document … Andy Bierman
- Re: [netmod] Use XML namespaces in YANG document … Martin Björklund
- Re: [netmod] Use XML namespaces in YANG document … Jürgen Schönwälder
- Re: [netmod] Use XML namespaces in YANG document … Tim Bray
- Re: [netmod] Use XML namespaces in YANG document … Tim Bray
- Re: [netmod] Use XML namespaces in YANG document … Jürgen Schönwälder
- Re: [netmod] Use XML namespaces in YANG document … Martin Björklund
- Re: [netmod] Use XML namespaces in YANG document … Jernej Tuljak
- Re: [netmod] Use XML namespaces in YANG document … Ladislav Lhotka
- Re: [netmod] Use XML namespaces in YANG document … Ladislav Lhotka
- Re: [netmod] Use XML namespaces in YANG document … Ladislav Lhotka
- Re: [netmod] Use XML namespaces in YANG document … Martin Björklund
- Re: [netmod] Use XML namespaces in YANG document … ianfarrer
- Re: [netmod] Use XML namespaces in YANG document … Tim Bray
- Re: [netmod] Use XML namespaces in YANG document … Jürgen Schönwälder
- Re: [netmod] Use XML namespaces in YANG document … Tim Bray
- Re: [netmod] Use XML namespaces in YANG document … Jürgen Schönwälder
- Re: [netmod] Use XML namespaces in YANG document … tom petch
- Re: [netmod] Use XML namespaces in YANG document … Carsten Bormann
- Re: [netmod] Use XML namespaces in YANG document … tom petch
- Re: [netmod] Use XML namespaces in YANG document … Carsten Bormann
- Re: [netmod] Use XML namespaces in YANG document … tom petch
- Re: [netmod] Use XML namespaces in YANG document … Andy Bierman
- Re: [netmod] Use XML namespaces in YANG document … tom petch
- Re: [netmod] Use XML namespaces in YANG document … Carsten Bormann
- Re: [netmod] Use XML namespaces in YANG document … Jürgen Schönwälder
- Re: [netmod] Use XML namespaces in YANG document … Andy Bierman
- Re: [netmod] Use XML namespaces in YANG document … Ladislav Lhotka
- Re: [netmod] Use XML namespaces in YANG document … Jan Lindblad (jlindbla)
- Re: [netmod] Use XML namespaces in YANG document … Jürgen Schönwälder
- Re: [netmod] Use XML namespaces in YANG document … Andy Bierman
- Re: [netmod] Use XML namespaces in YANG document … Ladislav Lhotka
- Re: [netmod] Use XML namespaces in YANG document … Rob Wilton (rwilton)
- Re: [netmod] Use XML namespaces in YANG document … tom petch