[xsl] <xsl:output indent="yes"/>

Subject: [xsl] <xsl:output indent="yes"/>
From: "Bradley, Peter" <pbradley@xxxxxxxxxx>
Date: Mon, 6 Oct 2008 11:41:40 +0100
The transformation I'm working on produces a very large file (50Mb).
Loading this up into an XML editor (we use <oXygen/>) is a lengthy
process and rather error-prone because the editor sometimes makes some
bad decisions about where to put what I guess must be hard line breaks:
meaning that it sometimes cannot even format and indent the result.

This makes the file difficult if not impossible to work with.  So we
tried setting <xsl:output ... indent="yes"/>.  Since the Recommendation
says:

"If the indent attribute has the value yes, then the xml output method
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"

... we expected that this would give us an indented result tree as
output.  Instead we got an indented version of the result tree as though
default templates had been applied (i.e. all metadata such as tags had
been stripped out of the result).

Is this the expected result?  Or is it the result of something external
to xsl (e.g. using BizTalk to apply the transformation - which, I guess,
will use some version of MSXML).

Thanks


Peter

Current Thread