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

2022-03-11 Thread tom petch
2022 12:54 To: Rob Wilton (rwilton) Cc: netmod@ietf.org Subject: Re: [netmod] Use XML namespaces in YANG document examples Going back to the original issue and so top-posting. NSF Monitoring Interface YANG Data Model is on the IESG Telechat 17feb2022. It contains the text - not an easy read unless

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

2022-02-17 Thread Rob Wilton (rwilton)
To: Rob Wilton (rwilton) Cc: netmod@ietf.org Subject: Re: [netmod] Use XML namespaces in YANG document examples Going back to the original issue and so top-posting. NSF Monitoring Interface YANG Data Model is on the IESG Telechat 17feb2022. It contains the text - not an easy read unless you

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

2022-02-15 Thread Ladislav Lhotka
Andy Bierman writes: > On Mon, Feb 14, 2022 at 1:19 AM Jan Lindblad (jlindbla) > wrote: > >> Just to add to the complexity here, it's not only about identityrefs. >> >> People (including IETF) have also defined types that use qname:s inside >> YANG strings, which the servers and clients would

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

2022-02-14 Thread Andy Bierman
On Mon, Feb 14, 2022 at 1:19 AM Jan Lindblad (jlindbla) wrote: > Just to add to the complexity here, it's not only about identityrefs. > > People (including IETF) have also defined types that use qname:s inside > YANG strings, which the servers and clients would have to recognize and > treat

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

2022-02-14 Thread Jürgen Schönwälder
I already pointed to . There are a number of situations where the ability to resolve namespace prefixes is required when processing XML content. Yes, in hindsight, we could have designed things differently, but the ship has sailed. There are a number of

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

2022-02-14 Thread Jan Lindblad (jlindbla)
Just to add to the complexity here, it's not only about identityrefs. People (including IETF) have also defined types that use qname:s inside YANG strings, which the servers and clients would have to recognize and treat properly in order to interoperate well. module ietf-yang-types { ...

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

2022-02-14 Thread Ladislav Lhotka
Andy Bierman writes: > On Sat, Feb 12, 2022 at 6:57 AM Jürgen Schönwälder < > j.schoenwael...@jacobs-university.de> wrote: > >> I agree that this should not go forward as is. >> >> The XML representation of YANG instance data does indeed use QNames in >> element values and hence applications

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

2022-02-12 Thread Andy Bierman
On Sat, Feb 12, 2022 at 6:57 AM Jürgen Schönwälder < j.schoenwael...@jacobs-university.de> wrote: > I agree that this should not go forward as is. > > The XML representation of YANG instance data does indeed use QNames in > element values and hence applications must be able to resolve XML >

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

2022-02-12 Thread Jürgen Schönwälder
I agree that this should not go forward as is. The XML representation of YANG instance data does indeed use QNames in element values and hence applications must be able to resolve XML namespace prefixes. If this is not clear enough in RFC 7950, then we need to address the lack of clarity where it

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

2022-02-12 Thread Carsten Bormann
Let me try to restate in more general terms the technical side of what Tom said: On 2022-02-12, at 13:54, tom petch wrote: > > MUST be the same as the namespace prefix (i.e., 'nsfmi' in > the example) for urn:ietf:params:xml:ns:yang:ietf-i2nsf-nsf- > monitoring. This is confusing

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

2022-02-12 Thread tom petch
Going back to the original issue and so top-posting. NSF Monitoring Interface YANG Data Model is on the IESG Telechat 17feb2022. It contains the text - not an easy read unless you are an XML expert - "In order for the XML data to be used correctly, the prefix (i.e., the characters before

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

2022-02-11 Thread Andy Bierman
On Fri, Feb 11, 2022 at 9:04 AM tom petch wrote: > From: Carsten Bormann > Sent: 11 February 2022 08:21 > >> (I’m also still not sure I’ve got an answer to my question about using > inconsistent prefixes between YANG and the XML example. What is being > demonstrated here?) > >> > > > > If you

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

2022-02-11 Thread tom petch
From: Carsten Bormann Sent: 11 February 2022 08:21 >> (I’m also still not sure I’ve got an answer to my question about using >> inconsistent prefixes between YANG and the XML example. What is being >> demonstrated here?) >> > > If you are referring to > " Is there a reason to violate the

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

2022-02-11 Thread Carsten Bormann
>> (I’m also still not sure I’ve got an answer to my question about using >> inconsistent prefixes between YANG and the XML example. What is being >> demonstrated here?) >> > > If you are referring to > " Is there a reason to violate the SHOULD?" I’m referring to the question I was trying to

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

2022-02-10 Thread tom petch
Trimming the cc: From: Carsten Bormann Sent: 10 February 2022 12:43 On 2022-02-10, at 13:22, tom petch wrote: > > If the comments in question had been made at the time of RFC7950 they would > have been most insightful; now they are not IMHO. The comment is insightful, it is just not about

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

2022-02-10 Thread Carsten Bormann
On 2022-02-10, at 13:22, tom petch wrote: > > If the comments in question had been made at the time of RFC7950 they would > have been most insightful; now they are not IMHO. The comment is insightful, it is just not about this document. I think we need to be able to sort comments into the

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

2022-02-10 Thread tom petch
From: netmod on behalf of Jürgen Schönwälder Sent: 07 February 2022 20:03 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

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

2022-02-07 Thread Jürgen Schönwälder
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

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

2022-02-07 Thread Tim Bray
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

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

2022-02-07 Thread Jürgen Schönwälder
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

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

2022-02-07 Thread Tim Bray
LGTM. On Mon, Feb 7, 2022 at 11:40 AM 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

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

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

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

2022-02-04 Thread Martin Björklund
Jernej Tuljak wrote: > > > On 04/02/2022 08:18, Martin Björklund wrote: > > 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?

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

2022-02-04 Thread Ladislav Lhotka
Hi Ian, ianfar...@gmx.com writes: > 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

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

2022-02-04 Thread Ladislav Lhotka
Jernej Tuljak writes: > On 04/02/2022 08:18, Martin Björklund wrote: >> 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

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

2022-02-04 Thread Ladislav Lhotka
Hi Tim, Tim Bray writes: ... > Anyhow, below I've excerpted the issue that's still troubling me. Here's > the XML: > >xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type"> > >eth0 >ianaift:ethernetCsmacd >DHCPv6 Relay Interface >true > >

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

2022-02-04 Thread Jernej Tuljak
On 04/02/2022 08:18, Martin Björklund wrote: 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

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

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