[xml] XPath numbers and exponential notation

since April 21, libxml supports exponential notation of XPath numbers both
at parsing and writing (conversion to string). In the
xmlXPathStringEvalNumber comment was added a [30a] production, where does
it come from? I can't find anything on W3C's site.
Since then, illegal expressions such as "75.2E-12" became legal in libxml
view and some expressions don't produce expected result anymore (the above
example is converted to the string "7.52e-11" whereas "0.0000000000752" is

Any explaination about the why and the goal of such a transformation?

I came to that while translating XML in a Nutshell's XPath Refence chapter
where it is stated that exponential notation is allowed. That chocked me
and I used testXPath to check, which achieved confusing my mind. I decided
to check the XPath spec and errata and didn't find anything related.
So what?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]