Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 23rd, 2003, 04:42 AM
Registered User
 
Join Date: Oct 2003
Location: , , Germany.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default format-number NaN

Hi,

when I try to format a number and it contains null value i get NaN displayed.
e.g
format-number(NOMINAL,'###.###.###.##0,0000','european')

if the value in NOMINAL is null then NaN is displayed. Can it be displayed null.

Is there a workaround for this?

thanx
raju

Reply With Quote
  #2 (permalink)  
Old October 23rd, 2003, 06:48 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

So you have an <xsl:decimal-format> named 'european' defined. Take a look at all the options in xsl:decimal-format and you'll see that one of the allowed attributes is NaN, which lets you specify what should be output if the number (NOMINAL in your case) is null. Adding this attribute with a value of 'null' will do the trick for you.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Format Number Dink Classic ASP Databases 2 January 23rd, 2007 01:40 AM
format-number on a string? dep XSLT 1 October 31st, 2006 01:24 PM
Number Format - Need Help! bridog39 Access 7 November 14th, 2005 02:50 PM
Format Number hcweb Classic ASP Basics 4 October 27th, 2004 11:23 AM
format number tgopal Javascript 2 April 30th, 2004 03:44 AM



All times are GMT -4. The time now is 12:22 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.