I have a need to preserve line breaks in a string of text rendered to html
output. I'm not sure exactly how to accomplish this, but was hoping
something along the lines of the following might work:
<xsl:call-template name="replace">
<xsl:with-param name="str" select="bio"/>
<xsl:with-param name="from">\n</xsl:with-param>
<xsl:with-param name="to"><br/></xsl:with-param>
</xsl:call-template>
It doesnt.
Neither does:
<xsl:call-template name="replace">
<xsl:with-param name="str" select="bio"/>
<xsl:with-param name="from"><xsl:text>
</xsl:text></xsl:with-param>
<xsl:with-param name="to"><br/></xsl:with-param>
</xsl:call-template>
I'm not even sure if i can replace the line break with an element <br/>, but
so far, i cant even match the \n and replace it with dummy text.
Any help or ideas? surely someone else has tacked this with something better
than <pre></pre>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list