W3C home > Mailing lists > Public > xsl-editors@w3.org > January to March 2001

Re: XSLT 1.1 draft: no enhancement of format-number?

From: James Clark <jjc@jclark.com>
Date: Sat, 06 Jan 2001 10:50:55 +0700
Message-ID: <3A56961F.EEEE0EB2@jclark.com>
To: "Arnold, Curt" <Curt.Arnold@hyprotech.com>
CC: "'xsl-editors@w3.org'" <xsl-editors@w3.org>
The scope of 1.1 is restricted to a few very specific features that have
been widely implemented as extensions in current products (ie result
tree fragment to node-set conversion, multiple output documents,
extension functions). For version 1.1, the XSLT WG is not entertaining
proposals for other improvements.   These will all be considered in the
2.0 timeframe.  I expect that support for scientific notation for
numbers will be considered as part of the alignment with Schema
datatypes that is planned for 2.0.

"Arnold, Curt" wrote:
> I posted the following message back in December on xsl-editors@w3.org, but never got any feedback.  (http://lists.w3.org/Archives/Public/xsl-editors/2000OctDec/0250.html)
> --------
> I was surprised that I did not see any noticeable change in the format-number function.  One of the annoying limitations of the XSLT 1.0 was a lack of any numeric formatting that was appropriate for
> engineering values since scientific notation was only introduced in JDK 1.2.
> I had hoped that the Scientific Notation format patterns added in JDK 1.2 (http://www.javasoft.com/j2se/1.3/docs/api/java/text/DecimalFormat.html) would be incorporated into format-number in XSLT 1.1,
> maybe with some appropriate fallback behavior for implementations running on JDK 1.1.
> --------
> I would assume that other people here would like to see the currency formatting introduced in JDK 1.2 in addition to the scientific notation (my primary interest).
> The original XSLT spec seemed to be written to make sure that a conforming processor could be deployed on JDK 1.1, hence the restriction that only JDK 1.1 defined formats are allowed.
> I doubt (but haven't confirmed) that the popular implementations on Java would allow you to use JDK 1.2 and 1.3 compatible formats when you were running on those platforms.  However, of course,
> depending on that behavior locks you into the Java platform.
> I believe (but haven't confirmed) that it would be fairly simple to implement a DecimalFormatFactory that gives you a 1.3 compatible DecimalFormat on JDK 1.1 and later.  On JDK 1.3, it would just give
> you the platform's DecimalFormat.  On earlier JDK's, it would wrap the decorate DecimalFormat to handle the new cases.
> For non-Java platforms, it would require extending the DecimalFormat implementation, but not in ways that should be a significant implementation burden.
> My recommendation would be to basically replace reference to the JDK 1.1 DecimalFormat with a reference to JDK 1.3 DecimalFormat and extend <xsd:decimal-format> to have the new attributes to
> DecimalFormatSymbols added since JDK 1.1 (international-currency-symbol, monitary-decimal-separator, currency-symbol on a quick glance).
> If there is the possibility of that, I would be willing to take a shot at hacking a 1.3 compatible DecimalFormat for JDK 1.1.
Received on Saturday, 6 January 2001 21:32:34 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:44:21 UTC