Re: [xslt] Indentation in final XSLT result document


you have to use:

<xsl:stylesheet ....>
  <xsl:output method="html" indent="yes"/>


for correct indentation. If you want to format an existing file use 
xmllint with the -format option, e.g.

xmllint -format myDoc.xhtml


KN wrote:

>I wonder if there is possibility to add this as an option
>in XSLT-processing functions. I mean that every result of
>XSLT transformation to HTML looks ugly - it is not indented
>as in my source .xsl, there are no newlines, just random 
>portion of text are broken into new line. I read that this
>is because some browsers badly interpret whitespaces?
>But how could I get such result anyway? I don't want to get
>so ugly HTML, when it should be nicely formatted after 
>xslt mailing list, project page


Claus Augusti
Tel: [+49] 0721.91374-172

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]