[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Operation of indent="yes" in Saxon 6.5.2 vs MSXML


Subject: [xsl] Operation of indent="yes" in Saxon 6.5.2 vs MSXML
From: "Michael Leditschke" <mike@xxxxxxxxxxx>
Date: Wed, 26 Jun 2002 15:50:13 +1000

I have a series of stylesheets applied sequentially to a document.
Each stylesheet has the indent="yes" attribute set.

When I use MSXML, no matter how many transforms I apply, the only
whitespace I get between tags is a single linefeed.

When I use Saxon 6.5.2, each transform is adding a linefeed followed
by 3 spaces per indent level. So the more transforms, the more 
whitespace.

I realise the behaviour of indent is processor dependent and the spec
doesn't specify how to add the whitespace, but I
would expect the amount of whitespace used to achieve the 
indent effect would remain constant across multiple transforms
rather than being additive.

Example XML file

<A>
<B>
<C/>
</B>
<A>

Example Stylesheet

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output encoding="UTF-8" indent="yes"/>
  <xsl:template match="/">
    <xsl:copy-of select="."/>
  </xsl:template>
</xsl:stylesheet>

After two stylesheets;

MSXML

<A>
<B>
<C/>
</B>
<A>

SAXON

<A>

             <-- Three spaces here as well
   <B>

             <-- Three spaces here as well
      <C/>

             <-- Three spaces here as well
   </B>

             <-- Three spaces here as well
<A>


Is this the expected behaviour of SAXON in this situation?

Regards
Michael

P.S. I was using MSXML within XMLSpy but found it hung on
some large files, so dropped back to a command prompt and
tried it with SAXON. It worked and was much quicker, but 
I ran across the above feature in the process.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords
xml