[thelist] [XSL] New Line

Howard Cheng howcheng at ix.netcom.com
Fri Nov 15 12:10:01 CST 2002


I think if you use just put a line break in, it will be reflected in your
output.

<xsl:template match="/">
    fskdlj
    fdslkj
    s;lkdf
</xsl:template>

This should show up as three separate lines.

Note that this only works with text, and not HTML elements. You might try:

<xsl:text>
</xsl:text>

after your closing HTML tags, such as:

<xsl:template match="/">
     <p>text text text</p>
     <xsl:text>
     </xsl:text>
</xsl:template>

At 05:48 PM 11/15/2002 +0000, Chris Marsh wrote:
>Dear all
>
>I have an XML document that I transform on the server using an XSL
>document. The XML is hierarchical, so the XSL formats it recursively.
>The only problem is that it outputs the HTML in one enormous line. I
>want each transformation within the recursion to appear on one line, but
>with a line break in between. Can anyone suggest the best way of doing
>this? Is there a new line character in XSL?
>
>TIA
>
>Regards
>
>Chris Marsh

::::::::::::::::::::::::::::::::::
Howard Cheng
http://www.howcheng.com/ <-- NEW!
howcheng at ix dot netcom dot com
AIM: bennyphoebe
ICQ: 47319315




More information about the thelist mailing list