This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: check if content value begins with some exact characters
- From: Jarno dot Elovirta at nokia dot com
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Thu, 18 Apr 2002 13:04:09 +0300
- Subject: RE: [xsl] check if content value begins with some exact characters
- Reply-to: xsl-list at lists dot mulberrytech dot com
Heppa,
> Any ideas about how to check if the element content begins, lets say
> with characters RE:? If it does not begin RE: -> add these characters
> in the beginning. If it does begin with these characters -> do
> nothing, but insert the value of the element?
You can't "add these characters in the beginning", you can just output "RE:" followed by the the original string.
<xsl:if test="not(starts-with(., 'RE:'))">RE:</xsl:if>
<xsl:value-of select="." />
Cheers,
Santtu
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list