RE: [xsl] Line end conversion.

Subject: RE: [xsl] Line end conversion.
From: Ben Trafford <ben@xxxxxxxxxxx>
Date: Tue, 02 Dec 2003 10:22:46 -0500

Thanks to everybody who answered! The problem's been solved, like so:

<xsl:template name="break">
<xsl:param name="text" select="."/>
<xsl:when test="contains($text, '&#xa;')"><xsl:value-of select="substring-before($text, '&#xa;')" disable-output-escaping="yes" />\n<xsl:call-template name="break"><xsl:with-param name="text" select="substring-after($text,'&#xa;')"/></xsl:call-template></xsl:when>
<xsl:value-of select="$text" disable-output-escaping="yes" />

<xsl:template select="example">
        <example><xsl:call-template name="break" /></example>

At 04:24 PM 12/2/2003 +0200, Jarno.Elovirta@xxxxxxxxx wrote:
Write a recursive template. The FAQ has an entry for this <>, but I recommend writing the stylesheet yourself for educational purposes.

The better link for this purpose is:

In case anybody asks in the future. Much simpler.


XSL-List info and archive:

Current Thread