Subject: Re: [xsl] Re: Wrong indentation with javax.xml.transform.Transformer From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Tue, 20 Sep 2011 11:16:41 -0400 |
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.
"may output whitespace in addition to the whitespace in the result tree (possibly based on whitespace stripped from either the source document or the stylesheet) in order to indent the result nicely"
"MAY output whitespace in addition to the whitespace in the instance of the data model in order to indent the result so that a person will find it easier to read"
-- Contact us for world-wide XML consulting and instructor-led training Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Google+ profile: https://plus.google.com/116832879756988317389/about Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: Wrong indentation with j, Olivier Lefevre | Thread | [xsl] Re: Wrong indentation with , Olivier Lefevre |
[xsl] Re: Wrong indentation with j, Olivier Lefevre | Date | [xsl] Re: Wrong indentation with , Olivier Lefevre |
Month |