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

NaN and Infinity in format-number

Subject: NaN and Infinity in format-number
From: Jack Matheson <jack@xxxxxxxxxxxxxx>
Date: Fri, 13 Jan 2006 11:09:45 -0600
nan format
In the following stylesheet:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/ Transform">
<xsl:template match="/">
1: <xsl:value-of select="format-number(0.0 div 0.0, '(#)')"/>
2: <xsl:value-of select="format-number(1.0 div 0.0, '(#)')"/>
</xsl:template>
</xsl:stylesheet>


...I see interesting results in Saxon 6 and Xalan 2.6:

    1: NaN
    2: (Infinity)

I was expecting either parenthesis around both values or no parenthesis at all. Is this a result of the XSLT 1.0 processors using DecimalFormat in the JDK?
Is this the conforming XSLT 1.0 behavior?


I noticed Saxon 8 puts parenthesis around both values. Is this an an XSLT 2.0 action?

Any help is appreciated!

-Jack

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.