Skip to Content.
Sympa Menu

xom-interest - Re: [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: Re: [XOM-interest] Extra white space escaping to preserve the infoset
  • Date: Mon, 7 Jul 2003 09:24:58 -0400

Everyone seemed to like this idea so I went ahead and added it to my tree. It will be in the next d19 release. (FYI, I'm working on getting a CVS repository set up through java.net so you won't have to wait for releases in the future. However, things seem to be moving at a snail's pace over there right now.)

As usual, answering any question opens up two more. In this case here are the two:

1. How should carriage returns and linefeeds in attribute values be affected by the serializer's explicitly set line separator? My gut says that if the client calls setLineSeparator, then there should be no escaping of line breaks of any kind, and all line breaks should be converted to whatever string the client passed to setLineSeparator.

2. Assuming setLineSeparator is not called explicitly, should the serializer also escape carriage returns in text nodes with numeric character references?

Note that it is simply not possible in XML to preserve carriage returns in comments and processing instructions because numeric character references are not resolved in those contexts.

--

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