Re: [xslt] A bit of help



Daniel Veillard wrote:

> <xsl:value-of select="format-number(-1,'###,###;###,###')"/>|

The current behaviour of libxslt for this case is a conscious
design decision. William and I discussed it during implementation,
and although JDK permits the same prefix/suffix for both positive
and negative numbers in the formatting, it does not allow it for
parsing. That seemed inconsistant to both of us, and although we
do not parse the formatted numbers, we decided to follow the
advice for parsing in JDK, which says "the positive and negative
prefixes or the suffixes must be distinct", to stay clear of the
inconsistancy (for who knows what future specs may include?)

The decision is even documented in the comments of numbers.c ;)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]