Re: [xslt] Indentation in final XSLT result document



Hi,

you have to use:

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

</xsl:stylesheet>

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

xmllint -format myDoc.xhtml

Best,
Claus

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 
>processing..
>
>/KN
>_______________________________________________
>xslt mailing list, project page http://xmlsoft.org/XSLT/
>xslt@gnome.org
>http://mail.gnome.org/mailman/listinfo/xslt
>  
>


-- 

Claus Augusti
Online-Produktion
Tel: [+49] 0721.91374-172
claus.augusti@1und1.com




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