[Bug 27615] [XSLT30] Should decimal-format reference CLDR? [I18N-ISSUE-394]

https://www.w3.org/Bugs/Public/show_bug.cgi?id=27615

--- Comment #2 from Michael Kay <mike@saxonica.com> ---
Personal response:

Thanks for drawing our attention to th CLDR facilities for number formatting,
which indeed have much in common with what XSLT and XQuery provide in the
format-number() function. 

For reference,

http://www.unicode.org/reports/tr35/tr35-37/tr35-numbers.html#Number_Format_Patterns

As far as I can tell, they have similar origins in Java 1.1, but have since
diverged a little, for example XSLT decided that ignoring the negative number
pattern except for the prefix and suffix was a bug to be fixed, whereas Java
and CLDR decided that it was a feature to be documented.

My immediate reaction was that the only way we could usefully reference CLDR,
given that the specs have diverged, is in the form of a health warning that
there are differences. We could perhaps try and do the research needed to
establish exactly what these differences are.

Since format-number() adds exponential notation in XPath 3.1, we still have the
opportunity to check that it does so in a way that is consistent with CLDR, and
change it if necessary. (For example, I note that CLDR provides a way to
request a "+" sign in a positive exponent, whereas XPath 3.1 format-number()
does not.)

We could also -- perhaps for a future release -- review whether there are
facilities in CLDR that could be usefully added to format-number(). Currency
formatting is one example. Rounding is another, though I would defend the
decision to separate rounding from formatting.

Note also that XSLT, for reasons I have never fully understood and wouldn't try
to defend, has two separate mechanisms for number formatting: xsl:number (for
formatting integers, including use of other number systems such as Roman and
Hebrew), and format-number() for formatting floating point numbers, always in
decimal notation, though with the ability to choose the digit family).
xsl:number allows locale-based formatting, fomat-number() does not. We've tried
to converge these a little with the introduction of format-integer(), but this
is far from complete.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Sunday, 21 December 2014 19:54:07 UTC