[xsl] Re: Wrong indentation with javax.xml.transform.Transformer

Subject: [xsl] Re: Wrong indentation with javax.xml.transform.Transformer
From: Olivier Lefevre <lefevrol@xxxxxxxxx>
Date: Tue, 20 Sep 2011 16:29:26 +0200
On 9/20/2011 1:30 PM, Andrew Welch wrote:
That's correct... you will probably want to strip whitespace only text
nodes from the input (which is fine provided you don't have any 'mixed
content' elements).

If the pretty printer honors the existing whitespace and adds its own indentation then repeated application, i.e., in -> pp(in) -> pp(pp(in)) etc, should increase indentation but it doesn't: in and pp(in) may be different but after that it's a no-op. Why? Clearly I don't have a good mental model of how the transformer works.

-- O.L.

Current Thread