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

zero-digit

Subject: zero-digit
From: Elliotte Rusty Harold <elharo@xxxxxxxxxxxxxxx>
Date: Thu, 30 Nov 2000 11:09:19 -0500
digit zero
It strikes me that the text describing the zero-digit attribute of the xsl:decimal-format element in the XSLT 1.0 spec may be wrong. What is stated in Section 12.3 is:

zero-digit specifies the character used as the digit zero; the default value is the digit zero (0)

The issues with this:

1. Why can we specify 0 but not 1 through 9?

2. Changing the character used for 0 is not allowed by the java.text.DecimalFormat class after which format-number and xsl:decimal-format is modeled. ()

On the other hand, 0 is a special character used in decimal format patterns by java.text.DecimalFormat, just like # is. The # character represents a digit which IS NOT printed when it's an insignificant zero. The 0 represents a digit that IS printed if it's an insignificant zero. Otherwise 0 and # are the same. I think it is this use of 0 in decimal format patterns that was intended for the zero-digit attribute of xsl:decimal-number.

Assuming this analysis is correct, I think an erratum needs to be published for XSLT 1.0. This erratum should delete the current bullet point "zero-digit specifies the character used as the digit zero; the default value is the digit zero (0)" It should add the following bullet point to the list of "The following attributes control the interpretation of characters in the format pattern:

zero-digit specifies the character used for a zero digit in the format pattern; the default value is the zero character (0)
--


+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@xxxxxxxxxxxxxxx | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|                  The XML Bible (IDG Books, 1999)                   |
|              http://metalab.unc.edu/xml/books/bible/               |
|   http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://metalab.unc.edu/javafaq/ |
|  Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/     |
+----------------------------------+---------------------------------+


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



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.