Re: [netmod] Use XML namespaces in YANG document examples

2022-02-03 Thread Martin Björklund
Tim Bray wrote: > On Thu, Feb 3, 2022 at 10:21 AM Martin Björklund wrote: > > > > > If an XML document has , 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

[netmod] WGLC on draft-ietf-netmod-rfc6991-bis-11

2022-02-03 Thread Kent Watsen
Dear NETMOD WG, This message begins a two-week WGLC for draft-ietf-netmod-rfc6991-bis-11 ending on Friday, February 18th. Here is a direct link to the HTML version of the draft: https://datatracker.ietf.org/doc/html/draft-ietf-netmod-rfc6991-bis-11.html Positive comments, e.g.,

Re: [netmod] Use XML namespaces in YANG document examples

2022-02-03 Thread Jürgen Schönwälder
On Thu, Feb 03, 2022 at 01:53:29PM -0800, Tim Bray wrote: > > Then if you look at 9.10.5 "Usage Examples", the examples make it pretty > clear what's happening, and that the namespace prefix has to be used in the > element. > > But, I think that since this is not an XML best practice,

Re: [netmod] Use XML namespaces in YANG document examples

2022-02-03 Thread Tim Bray
On Thu, Feb 3, 2022 at 10:04 AM Andy Bierman wrote: > Hi, > > I think the text in 7950 is clear enough. > The examples for identityref use prefix strings that are not the YANG > prefix. > The prefix value is arbitrary and it just needs to match an xmlns > attribute. > Are you saying sections

Re: [netmod] Use XML namespaces in YANG document examples

2022-02-03 Thread Tim Bray
On Thu, Feb 3, 2022 at 10:21 AM Martin Björklund wrote: > > If an XML document has , 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

Re: [netmod] Use XML namespaces in YANG document examples

2022-02-03 Thread Jürgen Schönwälder
The quoted text applies to the resolutione of foo:bar within YANG, which is different from resolving foo:bar within an XML serialized data tree. > Is there a reason to violate the SHOULD? There is no global registry of prefixes, hence collisions in the prefix namespace can occur. /js On Thu,

Re: [netmod] Use XML namespaces in YANG document examples

2022-02-03 Thread Martin Björklund
Hi, Tim Bray wrote: > On Thu, Feb 3, 2022 at 9:46 AM Andy Bierman wrote: > > > > > libxml2 has an API to get the namespace for a string node. > > > > Just to get the terms correct, it's not the "namespace" you need to get, > you need to get the XML prefix mapped to that namespace, and the

Re: [netmod] Use XML namespaces in YANG document examples

2022-02-03 Thread Andy Bierman
Hi, I think the text in 7950 is clear enough. The examples for identityref use prefix strings that are not the YANG prefix. The prefix value is arbitrary and it just needs to match an xmlns attribute. Are you saying sections 9.10.3 and 9.10.5 are wrong and need to be changed? Andy On Thu,

Re: [netmod] Use XML namespaces in YANG document examples

2022-02-03 Thread Tim Bray
On Thu, Feb 3, 2022 at 9:46 AM Andy Bierman wrote: > > libxml2 has an API to get the namespace for a string node. > Just to get the terms correct, it's not the "namespace" you need to get, you need to get the XML prefix mapped to that namespace, and the prefix has to be the same inside the

Re: [netmod] Use XML namespaces in YANG document examples

2022-02-03 Thread Tim Bray
>> [mj] That is correct. We have been beaten up enough number of times for not using the prefix defined by the YANG module. Is the suggestion to state that in the draft? Yes, or more simply, the suggestion is to just say what's going on: That the prefix you use inside the element has to be the

Re: [netmod] Use XML namespaces in YANG document examples

2022-02-03 Thread Carsten Bormann
On 3. Feb 2022, at 18:43, Mahesh Jethanandani wrote: > >> [mj] That is correct. We have been beaten up enough number of times for not >> using the prefix defined by the YANG module. Is the suggestion to state that >> in the draft? RFC 7950, Section 7.1.4: When used inside the "import"

Re: [netmod] Use XML namespaces in YANG document examples

2022-02-03 Thread Andy Bierman
Hi, On Thu, Feb 3, 2022 at 9:07 AM Tim Bray wrote: > Hi everyone, I'm the person on the XML directorate who raised this issue > in conversation with Ian Farrer in a review of draft-ietf-dhc-dhcpv6-yang. > After a lot of back and forth, I think we came to agreement on the > necessary language

Re: [netmod] Use XML namespaces in YANG document examples

2022-02-03 Thread Mahesh Jethanandani
Hi Tim, See inline with [mj] as I cannot seem to insert my comments between the text without distinguishing it from the rest of the thread. > On Feb 3, 2022, at 9:07 AM, Tim Bray wrote: > > Hi everyone, I'm the person on the XML directorate who raised this issue in > conversation with Ian

Re: [netmod] Use XML namespaces in YANG document examples

2022-02-03 Thread Tim Bray
Hi everyone, I'm the person on the XML directorate who raised this issue in conversation with Ian Farrer in a review of draft-ietf-dhc-dhcpv6-yang. After a lot of back and forth, I think we came to agreement on the necessary language to address this issue. I believe that language has. been

Re: [netmod] Use XML namespaces in YANG document examples

2022-02-03 Thread Andy Bierman
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 wrote: > From: netmod on

Re: [netmod] Use XML namespaces in YANG document examples

2022-02-03 Thread tom petch
From: netmod on behalf of ianfar...@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

[netmod] Use XML namespaces in YANG document examples

2022-02-03 Thread ianfarrer
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