[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: format-number

Subject: RE: format-number
From: "Cross, Neal - Development Controller" <ncross@xxxxxxxxx>
Date: Tue, 28 Jan 2003 19:51:59 -0000
nan xsl
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.Lee@xxxxxx]
Sent: 28 January 2003 19:33
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject:  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


Current Thread
  • format-number
    • Lee, Insoo - Tue, 21 Jan 2003 11:52:05 -0500 (EST)
      • <Possible follow-ups>
      • Lee, Insoo - Tue, 28 Jan 2003 14:33:20 -0500 (EST)
      • Cross, Neal - Development Controller - Tue, 28 Jan 2003 14:49:41 -0500 (EST) <=

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.