Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Is XML Text or CDATA that includes the zerocharacter legal?

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: Michael Kay <mike AT saxonica.com>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Is XML Text or CDATA that includes the zerocharacter legal?
  • Date: Fri, 29 Jul 2005 10:13:27 -0400

Michael Kay wrote:

The same nice properties could have been achieved if &#x0; were allowed as a
character reference, in the same way as &#x1; is now allowed.

Not really. Many APIs including SAX and DOM decode the character references into real characters before presenting them to the client application. In fact, I think doing anything else would be very strange. While there might not be any embedded nulls in the original source, there very well could be embedded nulls in the strings the APIs present to clients. This would be a major hassle for C and other languages that use null delimited strings.

XML is text, all text, and nothing but text. It's completely reasonable to expect that a language's native text handling functions should be able to work with XML data.

--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim




Archive powered by MHonArc 2.6.24.

Top of Page