Re: CDATA vs. EMPTY

Sure, depending on your point of view, the fact that Canonical XML
discards the information as to where CDATA sections were in XML input
is a "limitation" or a "benefit". Just like the fact that XPath
discards where most namespace delcarartions were in XML input. There
would be no harm in specifically mentioning this partiuclar
consequence of dicarding the existence of CDATA sections as a
limitation of Canonical XML.

Donald

From:  Bjoern Hoehrmann <derhoermi@gmx.net>
To:  peter@silmaril.ie
Cc:  xml-dev@lists.xml.org, xml-editor@w3.org, w3c-ietf-xmldsig@w3.org
Date:  Mon, 09 Jul 2001 03:50:47 +0200
Organization:  Web Programming and IT Development Guru [tm]
Reply-To:  Bjoern Hoehrmann <derhoermi@gmx.net>
Message-ID:  <pb0iktcgf7942j7t64j8rlnsvk00a0vrrf@4ax.com>
References:  <06jhkt0n2s52soall3j18cv6s9arrkt9t8@4ax.com> <01070900444800.02133@bealtaine>
In-Reply-To:  <01070900444800.02133@bealtaine>

>* Peter Flynn wrote:
>>On Sun, 08 Jul 2001, Bjoern Hoehrmann wrote:
>>> Hi,
>>> 
>>>    XML 1.0 SE says: "An element with no content is said to be empty".
>>> Does the following fragment have any content?
>>> 
>>>   <elem><![CDATA[]]></elem>
>>>
>>> The Recommendation further reads: "The representation of an empty
>>> element is either a start-tag immediately followed by an end-tag, or an
>>> empty-element tag". This is true for the fragment in it's canonical
>>> representation.
>
>>In answer to your question: yes, your example does have content,
>>but it does not have character data content. The direct
>>equivalence of <elem/> with <elem></elem> only holds when the >
>>of the start-tag is followed directly by the < of the end-tag.
>
>I suggest to clarify XML 1.0 by making the word 'content' in the
>definition of 'empty' a reference to '#NT-content'.
>
>Btw.:
>
>  Original Input            | Canonical representation
>  --------------------------+-------------------------
>  <elem />                  | <elem></elem>
>  <elem></elem>             | <elem></elem>
>  <elem><![CDATA[]]></elem> | <elem></elem>
>
>Since in the original input the element is not empty, it is in the
>canonical representation, I won't call that "logically equivalent",
>maybe this should be listed in the "Limitations" section of XML C14N.
>
>(x'posted to the relevant mailing lists)
>
>Thanks for your comments.
>-- 
>Björn Höhrmann { mailto:bjoern@hoehrmann.de } http://www.bjoernsworld.de
>am Badedeich 7 } Telefon: +49(0)4667/981028 { http://bjoern.hoehrmann.de
>25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 } http://www.learn.to/quote/
>

Received on Monday, 9 July 2001 09:14:34 UTC