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

String manipulation & Line Breaks

Subject: String manipulation & Line Breaks
From: "Marty McKeever" <marty.mckeever@xxxxxxxxxx>
Date: Tue, 25 Mar 2003 10:15:15 -0500
line break in string
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


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.