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

Re: format-number and zero

Subject: Re: format-number and zero
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 30 Sep 2015 09:40:15 -0000
Re:  format-number and zero
> On 30 Sep 2015, at 10:17, Heiko Niemann kontakt@xxxxxxxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Hi,
>
> I fail to understand why
>
> format-number(0, '#') displays 0
>
> while
>
> format-number(0.0, '#') displays nothing.
>
>

Which XSLT processor, which version?

The rules were rewritten between XSLT 1.0 and 2.0, but in both cases, I cant
see any reason why a processor should treat 0 and 0.0 differently. Looks
like a bug to me. Bugs are fairly excusable in 1.0 because the spec is so
vague (and since it depends on JDK 1.1, its actually very hard to get hold
of), but 0 and 0.0 in XSLT 1.0 represent exactly the same quantity, so its
certainly odd behaviour.

Michael Kay
Saxonica

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.