Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Extra white space escaping to preserve the infoset

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: [XOM-interest] Extra white space escaping to preserve the infoset
  • Date: Thu, 3 Jul 2003 10:19:33 -0400

On a recent thread on xml-dev James Clark (who is always worth listening to) wrote:

If your infoset contains a carriage return, you have to output
it as a numeric character reference, otherwise line-end
normalization will turn it into a line-feed. Similarly, if
attribute values in the infoset contain line-feeds or tabs, they
need to be output as numeric character references, otherwise
attribute value normalization will turn them into spaces...When
I'm creating XML, some parts of what I am creating may well have
come from parsing an XML document. That means if there's any
XML infoset that my program cannot serialize correctly, it's
potentially a bug.


I don't think the XOM serializer bothers to escape such carriage returns, line feeds, tabs and the like where Clark suggests it should. Should it? Or should this at least be an option in the Serializer? And if it is an option, should it be the default option? Thoughts?


--

Elliotte Rusty Harold
elharo AT metalab.unc.edu
Processing XML with Java (Addison-Wesley, 2002)
http://www.cafeconleche.org/books/xmljava
http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA




Archive powered by MHonArc 2.6.24.

Top of Page