You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by le...@philips.com on 2000/06/09 09:55:38 UTC

number formatting bug?

Hi

It appears that number formatting takes into account the default Locale, which results in unexpected output from a construct like this:

<xsl:value-of select="number(3 div 2)"/>

E.g., for a Locale that uses ',' as a decimal seperator this yields "1,5".

A fix:
org.apache.xalan.xpath.XNumber.java
  public String str()
.....
    java.text.DecimalFormat formatter = new java.text.DecimalFormat("0.####################",
	new java.text.DecimalFormatSymbols( java.util.Locale.US )
        );


regards
Leon