Looking at XPath 1.0, it does look like scientific notation is not allowed by
the standard.
In xpath.c it says:
/**
* xmlXPathStringEvalNumber:
* @str: A string to scan
*
* [30a] Float ::= Number ('e' Digits?)?
*
* [30] Number ::= Digits ('.' Digits?)?
* | '.' Digits
* [31] Digits ::= [0-9]+
*
* Compile a Number in the string
* In complement of the Number expression, this function also handles
* negative values : '-' Number.
*
* Returns the double value.
*/
double
xmlXPathStringEvalNumber(const xmlChar *str) {
Is that [30a] from some addendum to XPath 1.0 or is it a libxml extension?
Cheers,
Chris.
----- "Bjoern Hoehrmann" <[email protected]> wrote:
> * Christopher R. Palmer wrote:
> ><xsl:value-of select="0.09 = .9e-1"/>
>
> In XPath 1.0 that is illegal syntax; it is legal syntax in XPath 2.0
> which libxml2 does not support. Whether the specifications require
> the expression above to evaluate to true I am not sure. XPath 1.0 has
> specific requirements for parsing its numeric literals.
> --
> Björn Höhrmann · mailto:[email protected] ·
> http://bjoern.hoehrmann.de
> Am Badedeich 7 · Telefon: +49(0)160/4415681 ·
> http://www.bjoernsworld.de
> 25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 ·
> http://www.websitedev.de/
--
Christopher R. Palmer [email protected]
Chief Technology Officer www.vivisimo.com
Vivisimo, Inc. 412-422-2499 ext. 118
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml