|
Subject: RE: [xsl] Replace $ with $$ From: "Chris Bayes" <Chris@xxxxxxxxxxx> Date: Fri, 9 Mar 2001 15:11:25 -0000 |
Micheal,
Just do it again
<xsl:template match="text()">
<xsl:choose>
<xsl:when test="contains(., '$')">
<xsl:call-template name="doubleYourMoney">
<xsl:with-param name="str" select="." />
</xsl:when>
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="doubleYourMoney">
<xsl:param name="str" />
<xsl:choose>
<xsl:when test="contains(., '$')">
<xsl:value-of select="concat(substring-before(.,'$'),'$$')" />
<xsl:call-template name="doubleYourMoney">
<xsl:with-param name="str" select="substring-after(., '$')" />
</xsl:when>
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
</xsl:choose>
</xsl:template>
Ciao Chris
XML/XSL Portal
http://www.bayes.co.uk/xml
><xsl:template match="text()">
> <xsl:choose>
> <xsl:when test="contains(., '$')">
> <xsl:value-of select="concat(substring-before(.,
>'$'),'$$',substring-after(., '$'))"/>
> </xsl:when>
> <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
> </xsl:choose>
></xsl:template>
>
>
>Thanks in advance.
>
>Michael Lee
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Replace $ with $$, Michael Lee | Thread | [xsl] Saxon problems or maybe bugs?, Nestel, Frank |
| Re: [xsl] Bringing XML values into , cutlass | Date | [xsl] RE:, Patrick, Curtis W |
| Month |