Stephane Bailliez wrote:
> ...
> The problem is that in this case working with a format-number without
> specifically redefining the decimal-format is like shooting yourself in the
> foot.
Well, only if you want your stylesheet to run in multiple locales.
> It does not make sense to specify a pattern where you will use the
> separator and grouping characters...if you don't even know with which one
> you are working one...ergh.
That's true. You either have to make your stylesheet locale-specific or
include an xsl:decimal-format element.
> So as the default characters are supposed to be useful and save you some
> trouble, it looks like Xalan 1.2.2 behavior is not totally incoherent..no
> decimal-format is defined, thus it uses the default one to interpret the
> pattern and the output is localized...
Not totally incoherent. Just totally non-compliant. :)
> However what is supposed to be the behavior when a decimal-format does not
> define all characters used in the pattern ? In this case it could simply
> mean that we decided to go with the locale separators...
Yes. I think that XalanJ should internally keep a list of
DecimalFormatSymbols for each named decimal-format and one for the
default decimal-format. This list is initialized by the
DefaultFormatSymbols() constructor which constructs a locale-specific
list. This can be overriden by the xsl:decimal-format element.
Gary