[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Line end conversion.

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

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


<xsl:template name="break">
<xsl:param name="text" select="."/>
<xsl:choose>
<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:otherwise>
<xsl:value-of select="$text" disable-output-escaping="yes" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>


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


At 04:24 PM 12/2/2003 +0200, Jarno.Elovirta@xxxxxxxxx wrote:
Write a recursive template. The FAQ has an entry for this <http://www.dpawson.co.uk/xsl/sect2/replace.html#d6768e55>, but I recommend writing the stylesheet yourself for educational purposes.

The better link for this purpose is:


http://www.dpawson.co.uk/xsl/sect2/replace.html#d6768e13

In case anybody asks in the future. Much simpler.

--->Ben


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.