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

format-number issue in XSLT 1.0

Subject: format-number issue in XSLT 1.0
From: Jack Matheson <jack@xxxxxxxxxxxxxx>
Date: Wed, 13 Jul 2005 11:24:08 -0500
xsl format number
I'd like to get a ruling from the experts on Xalan conformance test numberformat31:

<xsl:decimal-format minus-sign="_" />

<xsl:template match="doc">
<out>
<xsl:value-of select="format-number (-26931.4,'###,###.###;###,###.###')"/>
</out>
</xsl:template>


Xalan 2.6 emits

<out>_26,931.4</out>

..while Saxon emits

<out>26,931.4</out>

After referencing the JDK 1.1 specification for DecimalFormat, I noticed this:

If there is an explicit negative subpattern, it serves only to specify the negative prefix and suffix; the number of digits, minimal digits, and other characteristics are all the same as the positive pattern. That means that "#,##0.0#;(#)" produces precisely the same behavior as "#,##0.0#;(#,##0.0#)".

Doesn't this mean that the default prefix of "_" should not be used because the explicit negative subpattern declared an empty prefix and suffix?

I wasn't sure if this was a special case, as the Oasis reference files seem to agree with Xalan.

Any help is appreciated!

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.