This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: zero-digit
- To: xsl-list at mulberrytech dot com
- Subject: Re: zero-digit
- From: Elliotte Rusty Harold <elharo at metalab dot unc dot edu>
- Date: Fri, 1 Dec 2000 08:43:17 -0500
- References: <4.2.0.58.20001130195803.021186a0@pop1.attglobal.net>
- Reply-To: xsl-list at mulberrytech dot com
At 8:03 PM -0500 11/30/00, G. Ken Holman wrote:
>Because of the leading paragraph, I never interpreted the attributes
>to mean anything other than the format pattern ... what indication
>did you have that these attributes were germane elsewhere?
James Clark just told me that changing the zero digit will indeed
change the 1 digit, 2 digit, and so on. This is not very well
documented in either Java or XSLT, but it is indeed the expected
behavior. For example, setting the zero-digit to A would set
1 to B
2 to C
3 to D
4 to E
5 to F
6 to G
7 to H
8 to I
9 to J
The subsequent characters follow in their Unicode order. This is how
java.text.DecimalFormat behaves, and there's a very clouded
description of this at
http://java.sun.com/products/jdk/1.1/docs/api/java.text.DecimalFormat.html
Specifically, "This class only handles localized digits where the 10
digits are contiguous in Unicode, from 0 to 9. Other digits sets
(such as superscripts) would need a different subclass," but to
really see what's going on you have to look at the Java source code
since the JavaDoc is incomplete. I should probably file a bug on this
at the Java Developer Connection.
The XSLT spec is even less clear, but I'm willing to accept James
Clark's interpretation as authoritative there, though I do think this
all needs to be made explicit in the next version of the spec.
--
+-----------------------+------------------------+-------------------+
| 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/ |
+----------------------------------+---------------------------------+
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list