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

Re: Is there a way to skip non-numerical data while f

Subject: Re: Is there a way to skip non-numerical data while formatting numbers?
From: "Rashmi Rubdi" <rashmi.sub@xxxxxxxxx>
Date: Sun, 15 Apr 2007 21:49:40 -0400
Re:  Is there a way to skip non-numerical data while  f
David,

Thank you for the very useful tip.

I tried the following (with some variations):

<xsl:decimal-format name="currency_format" NaN=""/>

<xsl:value-of select="format-number(number(price),
'##,##,.00',currency_format)"/>

but the above is throwing a
SystemId Unknown; Line #58; Column #102; java.lang.RuntimeException:
ElemTemplateElement error: Malformed format string: ##,##,,00 on
Xalan XSLT 1.0 parser.

I wasn't getting the above error before (when I didn't use the
decimal-format option inside the format-number function.

It could be possible that this is a bug in Xalan according to this post:
http://mail-archives.apache.org/mod_mbox/xml-xalan-cvs/200102.mbox/%3C20010215213041.1778.qmail@xxxxxxxxxx%3E

I will check with the Xalan mailing list if it is their bug.

-Rashmi
On 4/15/07, David Carlisle <davidc@xxxxxxxxx> wrote:

you can specify the string used for Not a Number using xsl:decimal-format, it defaults to 'NaN' but you can make it ''

David

Current Thread

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.