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: "Bradley S. Huffman" <hip AT cs.okstate.edu>
  • To: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Extra white space escaping to preserve the infoset
  • Date: Tue, 08 Jul 2003 14:14:54 -0500

Elliotte Rusty Harold writes:

> OK, I'm beginning to see half your point. God, what a mess. Days like
> this I hate XML.

+1 for that. Look at me, I tried to quickly re-read the section on end-of-line
handle and attribute normalization to ensure I was completely correct, and
ended up saying something completely wrong.

> I think you've convinced me that setting the line separator is not
> enough to justify not escaping. What I probably should have said
> instead is that if the user turns on indenting or a maximum line
> length, then the serializer is free to muck with white space and line
> breaks in attribute content and text content, etc. However, just
> setting the line separator is not enough to justify removing or
> adding line breaks anywhere.
>
> On the other hand, if the user does set the line separator to a
> linefeed (for example) then I think I'm justified in changing all
> line breaks including those in attribute values to line feeds. The
> resulting line feed would then be escaped in the attribute value so
> that there'd still be a line break there, just possibly not the one
> the user started with.
>
> Finally, if the user doesn't touch the serializer options, it should
> faithfully preserve all white space to the maximum extent possible
> including carriage returns in text nodes. This means escaping those
> too. Bleah. However, since there likely won't be any insignificant
> carriage returns in the document unless the user used a \r escape
> sequence in the Java code, this probably isn't too big a hassle.

Look at that, 3 paragraphs to try and explain what to do with two
little characters :-) There's got to be a easier way that we're missing.

Brad




Archive powered by MHonArc 2.6.24.

Top of Page