Re: zero-digit

>Elliotte Rusty Harold wrote:
>>
>>  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?
>
>It's unnecessary.  In Unicode, decimal digits have consecutive codes. If
>you specify a character with Unicode code N for 0, it will use N+1 for
>1, N+2 for 2, etc.
>
>>  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. ()
>
>You are mistaken. java.text.DecimalFormatSymbols.setZeroDigit() does
>precisely this.
>

It seems to be so. That's certainly not obvious from the either the 
DecimalFormatSymbols JavaDoc or the XSLT spec. I withdraw this 
erratum, but I do proposes that the relevant bullet point be 
rewritten to make it clearer that changing the zero digit also 
changes the 1 digit, 2 digit, and so forth. That is, something like:

zero-digit specifies the Unicode character used as the digit zero. 
This will also set the characters used for the digits 1 through 9 to 
the nine Unicode characters following the zero digit in Unicode 
order. The default value is the digit zero (0)
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@metalab.unc.edu | 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/     |
+----------------------------------+---------------------------------+

Received on Friday, 1 December 2000 09:02:23 UTC