[Xpath-ng] My favorite XPath language]

bob mcwhirter bob at werken.com
Fri Nov 22 08:43:28 MST 2002


On Fri, 22 Nov 2002, Joe English wrote:

> 
> Uche Ogbuji wrote:
> 
> > [Joe English]
> > > Number three is mandating IEEE floating point for numbers,
> > > complete with the rules for NaNs and infinities.  This is
> > > fine for Java implementations where all the world is a
> > > 32-bit CPU with IEEE 754 support, but it's a bit of a
> > > headache for most other languages (like C89, where 1.0/0.0
> > > is "undefined behavior" instead of +Infinity).
> >
> > I *hate* IEEE 754 as much as the next man, but I wonder what we would replace
> > it with.
> 
> Arbitrary- or fixed-precision rationals would be my choice, but
> just about anything else would do.  See DSSSL and/or Scheme
> for examples.  My main objection is that the XPath numeric
> datatype is overspecified.  For instance there is absolutely
> no good reason to mandate that "1.0/0.0" returns anything other
> than an error.  The rules for converting a number to a string
> are pretty bad too.  (I understand that even Java programmers
> have a difficult time getting this right.)

Indeed, we do.

And this also raises the whole question of number format localizations.
I doubt many documents are written with all numbers in canoncial form
(is there a such) wrt to punctuation.  Commas, periods, spaces, etc.

	-bob




More information about the Xpath-ng mailing list