Re: [xslt] Identical separators in format-number() and decimal-format
- From: Daniel Veillard <veillard redhat com>
- To: The Gnome XSLT library mailing-list <xslt gnome org>
- Subject: Re: [xslt] Identical separators in format-number() and decimal-format
- Date: Wed, 13 Jul 2005 15:52:41 -0400
On Wed, Jul 13, 2005 at 08:56:41PM +0200, Bjorn Reese wrote:
> Tony Marston wrote:
>
> >Which interpretation is correct? Which interpretation is the most
> >logical? Which interpretation is easiest to implement?
For the record Bjorn is the initial author of the number and format support
in libxslt :-)
> There are a number of ways in which we can try to address this matter:
>
> 1. We can seek clarification in the JDK.
>
> The JDK 1.1 specification of DecimalFormat is rather vague, so we
> have to resort to a later version of JDK. However, the XSLT spec
> deliberately seems to discourage this (section 12.3)
>
> "The format pattern must not contain the currency sign (#x00A4);
> support for this feature was added after the initial release of
> JDK 1.1"
Refering to the JDK was a serious mistake, they recognize that now :-)
> 2. We can seek clarification from an authorative source (the editors of
> the XSLT standard).
>
> I have previously attempted to seek clarify from the XSLT editors
> on other borderline cases, but without success, so I am not too
> optimistic about this option. See:
>
> http://lists.w3.org/Archives/Public/xsl-editors/2001JanMar/0075.html
The Working Group moved to 2.0, a lot of the original 1.0 contributors
are not there anymore, not sure tehy are interested.
> 3. We can adopt the behavior of (the majority of) other XSLT processors
> out there.
>
> This is how we have resolved borderline cases concerning infinity
> and not-a-number. This, however, requires that somebody with access
> to other XSLT processors examine and report their behavior.
I think William looked at Saxon's behaviour before making an answer to
Tony in bugzilla. We should also check the 2 XSLT processors from IBM/Apache
the C and the Java ones.
> 4. We can reason about what kind of behavior we prefer.
>
> Although it is always good to apply a dose of reasoning to our
> decisions, we should be careful not to invent our own behavior
> when it comes to standards. For example, hardcoding the values of
> decimal-point and thousand-separator can be confusing for users
> who are not familiar with the values that we select.
Agreed
> I am unsure how we best approach this (although our approach ought to
> include the spanking of the XSLT editors :)
Ahum, to me 3. is the most pragmatic approach. 2. would be the correct
one, it doesn't cost much except time.
Asking the xsl-list and checking Michael Kay's book on the topic are
also reasonable things to do.
Daniel
--
Daniel Veillard | Red Hat Desktop team http://redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]