> On 23 May 2016, at 15:43, Martin Bjorklund <[email protected]> wrote:
> 
> 
>> - section 3.1
>> 
>> There is an overall question regarding whitespace in XML in
>> "non-significant" places.  Is it allowed in the XML representation of
>> data trees?  And if so, precisely what whitespace is allowed?  Also,
>> to what degree is the whitespace shown in examples what is allowed on
>> the wire, and to what degree is it there just to make the example
>> easier to read?  (It's possible that XML has implemented some sort of
>> global solution for the issue of non-significant whitespace, but back
>> when I was using it regularly, there was none.)
> 
> Good catch!  Interesting that noone has found this before!

This follows from the fact that YANG doesn't support mixed content: there is no 
way how this whitespace can be made significant.

> 
> I think we need to say that whitespace is insignificant between
> elements.  So I propose to add a paragraph to the end of 7.5.7
> (container XML encoding rules):
> 
> NEW:
> 
>  Any whitespace between the subelements to the container is
>  insignificant, i.e., an implementation MAY insert whitespace
>  characters between subelements.
> 
> and insert a fourth paragraph in 7.8.5 (list XML encoding rules):
> 
> NEW:
> 
>  Any whitespace between the subelements to the list entry is
>  insignificant, i.e., an implementation MAY insert whitespace
>  characters between subelements.

I think this clarification would be useful, but maybe it should be stated 
separately (not in container/list sections) because it also applies to 
whitespace at the top level of a document. It could also say that other 
character data or CDATA sections are not permitted. What about comments and 
processing instructions?

Lada

--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C




_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to