Michael Giroux wrote: > The following template attempts to convert new-lines to <br/>
Oldest FAQ in the book. http://www.dpawson.co.uk/xsl/sect2/break.html http://www.dpawson.co.uk/xsl/sect2/replace.html http://skew.org/xml/stylesheets/linefeed2br/linefeed_to_br_demo_13.xsl <xsl:template match="/"> <xsl:call-template name="lf2br"> <xsl:with-param name="s" select="'here is a string that contains some linefeeds'"/> </xsl:call-template> </xsl:template> <xsl:template name="lf2br"> <xsl:param name="s"/> <xsl:choose> <xsl:when test="contains($s,' ')"> <xsl:value-of select="substring-before($s,' ')"/> <br/> <xsl:call-template name="lf2br"> <xsl:with-param name="s" select="substring-after($s,' ')"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$s"/> </xsl:otherwise> </xsl:choose> </xsl:template> In the future, please ask such questions on the xsl-list. http://www.mulberrytech.com/xsl/xsl-list/ Mike
