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: Wed, 09 Jul 2003 09:40:47 -0500

Elliotte Rusty Harold writes:

> I think I agree with this, though it may be uglier than the current
> default output. Nothing will be automatically converted. Conversion
> will take place if and only if the user tells the serializer to
> change the white space in some way.

But then aren't you using setLineSeperator (or another method) for a
dual function or to cause a side-effect, one to set the line seperator
and second turning on/off automatic conversion or some other feature?

Would this be reasonable?

1. Always apply John's conversion alg. to attribute values and text nodes
2. add/subtract any WS need for pretty printing
3. send to output stream

And of course document this and that any \r will be escaped and if you
really want a line break always use a \n.

I think this will preserve roundtripping in the two cases of

XOM -> serialize -> text -> parse -> XOM
text -> parse -> XOM -> serialize -> text (assuming line seperator is
same)

But as often the case, I could be wrong.

Brad




Archive powered by MHonArc 2.6.24.

Top of Page