This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: zero-digit
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: zero-digit
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Fri, 1 Dec 2000 11:56:04 -0000
- Reply-To: xsl-list at mulberrytech dot com
XSLT simply refers to the JDK 1.1 spec in this area, and I for one find that
spec extremely fuzzy. But from experiment (Saxon simply uses the JDK
DecimalFormat class)
with <xsl:decimal-format zero-digit="a"/>
<xsl:value-of select="format-number(123.45, 'aaa.aa')"/>
produces
bcd.ef
which suggests that zero-digit does affect the digits used in the output as
well as those used in the format pattern.
Mike Kay
> -----Original Message-----
> From: Clapham, Paul [mailto:pclapham@core-mark.com]
> Sent: 30 November 2000 22:05
> To: xsl-list@mulberrytech.com
> Subject: RE: zero-digit
>
>
> I'm no XML expert, and I haven't inspected the XML spec in
> any detail, but
> from what I read in Michael Kay's XSLT book it appears to me
> that I should
> be able to use for example <xsl:decimal-format ...
> digit-zero="#x0E50" ...>,
> where x0E50 is the Unicode character for "Thai Digit Zero",
> and expect the
> resulting output to be rendered in Thai digits. True, that
> isn't supported
> by Java's DecimalFormat class; is there some other way in
> Java of persuading
> DecimalFormat to produce Thai digits?
>
> PC2
>
> -----Original Message-----
> From: Elliotte Rusty Harold [mailto:elharo@metalab.unc.edu]
> Sent: November 30, 2000 08:09
> To: xsl-list@mulberrytech.com
> Cc: xsl-editors@w3.org
> Subject: zero-digit
>
>
> 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. ()
>
> <snip/>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list