xsl-list
[Top] [All Lists]

RE: format-number

2003-01-28 12:51:59
Try this me old mucker!
Call this template passing in SHARE_PRICE as parameter Value.

 <xsl:template name="null-dash">
        <xsl:param name="Value"/>
  
                <xsl:variable name="buff" select="format-number($Value, 
'###,##0.00')"/>
                <xsl:choose>
                    <xsl:when test="$buff='NaN'">N/A etc...</xsl:when>
                    <xsl:otherwise><xsl:value-of 
select="$buff"/></xsl:otherwise>
                </xsl:choose>
    </xsl:template>

-----Original Message-----
From: Lee, Insoo [mailto:Insoo(_dot_)Lee(_at_)gs(_dot_)com]
Sent: 28 January 2003 19:33
To: 'xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com'
Subject: [xsl] format-number



  Quick question,
   This would return me the formatted value - but if the  'SHARE_PRICE' is
not number, it would return me NaN

        <xsl:value-of select="format-number(SHARE_PRICE, '###,##0.00')"/>

  Without any if/when statements, is there anyway to overwrite it so that it
returns me NA or something else I specify insteadof NaN?
 Thanks
IL




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>