XSLT uses XPath's definition of Number, which does not support exponential
notation. Perhaps there shoud be, but the XPath and XSLT designers didn't
anticipate a need for it and don't currently permit it.

See http://www.w3.org/TR/xpath#function-number
and http://www.w3.org/TR/xpath#NT-Number

Note that they insist that "any other string is converted to NaN", so we
really don't have any choice; accepting the 1.23e4 syntax would make us
noncompliant.


As a workaround, you could  write an extension function which does support
exponential syntax, and call that instead of number().

Reply via email to