Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Preserve white space in text nodes

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Michael Kay <mike AT saxonica.com>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Preserve white space in text nodes
  • Date: Thu, 19 Jan 2012 12:27:26 +0000

>This is your problem. When you use setIndent and/or setMaxLength you are telling the serializer to pretty print. I.e. you are telling it that it should modify the white space so you have a certain line length and indenting. If you want to preserve white space, don't do that. Absent instructions to the contrary, XOM will preserve white space in text nodes.

The message here seems to be that XOM indentation is more aggressive than XSLT indentation, which only adds whitespace before or after start and end tags.

Michael Kay
Saxonica





Archive powered by MHonArc 2.6.24.

Top of Page