This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Trying to add a linebreak
- From: Jitt_Joynoosaeng at cargill dot com
- To: XSL-List at lists dot mulberrytech dot com
- Date: Mon, 15 Jul 2002 11:51:41 -0500
- Subject: [xsl] Trying to add a linebreak
- Reply-to: xsl-list at lists dot mulberrytech dot com
I have a tag that contains a comment string. I want to be able to
search that string and look for a '#' and whenever I see this, I want
to add a line break <br>. I was trying to do it by the following code,
but found that the line break occurs ONLY after the first '#'. Can
anyone suggest a way I can make this work?
<xsl:variable name="certcomments" select="//cert_comments"/>
<xsl:if test="contains($certcomments,'#')">
<xsl:value-of
select="substring-before($certcomments,'#')"/><br></br>
<xsl:value-of select="substring-after($certcomments,'#')"/>
</xsl:if>
Thank you! Your help is much appreciated.
Jitt
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list