View Single Post
 
Old February 13th, 2006, 03:25 PM
briforge briforge is offline
Registered User
 
Join Date: Sep 2005
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here's the template:

<xsl:template name="convertCurrency">
        <xsl:param name="currency"/>
        <xsl:variable name="tempCurr" select="substring-before($currency, '.')"/>
        <xsl:choose>
            <xsl:when test="string-length($tempCurr) &gt; 0">
                <xsl:value-of select='translate(substring($tempCurr, 1, 9),"AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWw XxYyZz+-,$","")'/>
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select='translate(substring($currency, 1, 9),"AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWw XxYyZz+-,$","")'/>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>

Input snippet:

<Amt>TBD</Amt>

Output snippet:

<DamageAmt></DamageAmt>

Both the input and output snippets are nested in other tags. The desired result in this case would be to NOT have the empty <DamageAmt> tags output at all.