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

Thanks for the replies. I think I'm half-way there, but something still isn't working. I've wrapped the call-template in a variable. I think that's working, because I tested it by sending it a value of 'abc123' and it output the '123'. But it's the test that isn't yet working.

<xsl:variable name="dmgAmt">
  <xsl:call-template name="convertCurrency">
    <xsl:with-param name="currency" select="/Amt">
<xsl:if test="string-length(normalize-space($dmgAmt)) &gt; 0">
  <xsl:element name="DamageAmt">
    <xsl:value-of select="$dmgAmt"/>

I've also tried

<xsl:if test="number($dmgAmt) = $dmgAmt">

Both times, it produced an empty <DamageAmt> tag, when I wanted no <DamageAmt> tag at all.