You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by mi...@objectweb.org on 2004/06/01 17:13:01 UTC

indent='yes' does not indent

My xslt contains
<xsl:output method='xml' indent='yes'/>
but output is not indented. 

I realize that indent='yes' is only a suggestion, so my question is this 
-- Am I doing something wrong?  If not, are there any plans for xalan to 
provide support indenting the generated xml?

Michael Giroux


Re: indent='yes' does not indent

Posted by Johannes Lebek <jo...@gmx.de>.
Hi Michael,

you also must specify the Xalan specific attribute "indent-amount". The 
value is interpreted as number of blanks.

<xsl:output method='xml' indent='yes' xalan:indent-amount="2" 
xmlns:xalan="http://xml.apache.org/xslt"/>

Regards,

Johannes




michael.giroux@objectweb.org wrote:
> My xslt contains
> <xsl:output method='xml' indent='yes'/>
> but output is not indented. 
> 
> I realize that indent='yes' is only a suggestion, so my question is this 
> -- Am I doing something wrong?  If not, are there any plans for xalan to 
> provide support indenting the generated xml?
> 
> Michael Giroux
> 
> 


Re: indent='yes' does not indent

Posted by Joseph Kesselman <ke...@us.ibm.com>.



You also need to set the amount of indentation required per level, which
currently defaults
to 0. See http://xml.apache.org/xalan-j/usagepatterns.html#outputprops

(We should probably re-re-reconsider whether 0 is really the best possible
default, given how often this question comes up. At the very least, we
should add a link in the FAQs to make this detail easier to find.)

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk