RE: Parsing strings as numbers

Subject: RE: Parsing strings as numbers
From: Andrew Kimball <akimball@xxxxxxxxxxxxx>
Date: Thu, 7 Sep 2000 12:02:46 -0700
James,

When you say that XPath 1.0 is trying to be small, do you mean the paper
spec, or implementations?  I think it's more difficult for implementations
to *not* support exponential notation, because most floating point parsing
and printing libraries support it by default (and disabling support can
actually result in more code, especially if the library offers no simple way
to do it).

XT itself seems to support exponential notation, which prompted my original
post (didn't want to disable it in MSXML and find out later there was some
sort of spec loophole allowing it).

~Andy

-----Original Message-----
From: James Clark [mailto:jjc@xxxxxxxxxx]
Sent: Wednesday, September 06, 2000 10:11 PM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Re: Parsing strings as numbers


Andrew Kimball wrote:
> 
> According to my reading of the XPath spec, '1e200' and '+2.0' are not
valid
> numbers.

The spec seems fairly unambiguous on this to me.
 
> 1. Can it possibly be the intended behavior to disallow scientific
notation
> and a leading plus sign?

Yes.  XPath 1.0 is trying very hard to be small.

James


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread