[Xpath-ng] Number literal and string conversion rules in FIXPath
Uche Ogbuji
uche.ogbuji at fourthought.com
Mon Jan 6 12:54:07 MST 2003
In FIXPath I changed the grammar snippet at #NT-Number
from
[30] Number ::= Digits ('.' Digits?)? | '.' Digits
to
[30] SimpleNumber ::= Digits ('.' Digits?)? | '.' Digits
[100] Number ::= SimpleNumber (('e' | 'E') ('+' | '-')? SimpleNumber)?
This is off-head for sci notation. I haven't tested it in a lexer. If this
stands, we can renumber the grammar later.
I also modified #function-number to:
<p class="xpath-deviation">a string that consists of optional whitespace
followed by an
optional minus sign followed by a <a href="#NT-Number">Number</a>
followed by whitespace is converted to the IEEE 754 number that is
nearest (according to the IEEE 754 round-to-nearest rule)
to the mathematical value represented by the string. A string containing
"INF", "+INF", or "-INF", surrounded only by optional white space is converted
to infinity in the first case, infinity in the second case, and negative
infinity in the third case.</p>
Yeah the wording can be simplified, but I have to move on to something else
just now :-) I'll put in any re-write anyone offers in the interim.
--
Uche Ogbuji Fourthought, Inc.
http://uche.ogbuji.net http://4Suite.org http://fourthought.com
A Python & XML Companion - http://www.xml.com/pub/a/2002/12/11/py-xml.html
XML class warfare - http://www.adtmag.com/article.asp?id=6965
MusicBrainz metadata - http://www-106.ibm.com/developerworks/xml/library/x-thi
nk14.html
More information about the Xpath-ng
mailing list