You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Zheng Liu <zl...@Barra.COM> on 2002/02/01 21:33:15 UTC

string to number casting in Xalan 2.2

A statement like <xsl:value-of select="number('1.23E1')"/> produces '12.3'
in Xalan 2.1, and 'NaN' in 2.2.

The difference is caused by how XString cast string to number,
In 2.1, it's done by calling Double.valueOf(),
In 2.2, it's done by a hand crafted parsing routine that returns
        NaN when encounters a non-digit char.

The behavior in 2.2 is not standard compliant. Please fix. Thanks.