You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Thorbjoern Ravn Andersen <tr...@mrbean.stibo.dk> on 2001/02/01 11:50:27 UTC

Cannot make Xalan recognize '.' in a number.

I have a problem, which I have narrowed down to that converting this
string '26.91' to a number results in the number 2691 instead of 26.91.
This goes both for an automatic conversion (like in ' 1*$price') and for
an explicit one with number($price).  

I thought it might be a locale question where a ',' might be expected as 
a decimal point, but '26,91' is 'NaN' when printed out.   Using '26.91'
directly as the string instead of the variable, is converted correctly.

This is on the webserver - I get the correct result on my machine, and I
cannot reproduce it.  This is either the Xalan coming with WebSphere
3.5, but I have requested it to use 1.2.2 instead.  Both is the Java
versions.

Has anyone seen anything like this before?

Thanks in advance for any pointers,
-- 
  Thorbjørn Ravn Andersen                   "...sound of... Tubular Bells!"
  http://bigfoot.com/~thunderbear

Re: Cannot make Xalan recognize '.' in a number.

Posted by Philip Strube <Ph...@ofd.mf.lsa-net.de>.
Thorbjoern Ravn Andersen schrieb:
> 
> I have a problem, which I have narrowed down to that converting this
> string '26.91' to a number results in the number 2691 instead of 26.91.
... 
> Has anyone seen anything like this before?

Yes, we had problems like this before, using xalan (lots of versions) on
NT4SP6 (german version!!). I have never been able to make a really short
example. You should test your stylesheet with other processors, maybe
its a bug in xalan.

Philip