W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2003

[F&O] Casting to numerics missing lexical check

From: Sarah Wilkin <swilkin@apple.com>
Date: Wed, 19 Nov 2003 10:39:38 -0800
Message-Id: <BB0D5BCA-1ABF-11D8-99AF-0003935B7D94@apple.com>
To: public-qt-comments@w3.org

In section 17.8, Casting to numeric types, all references to checking 
the intermediate value xs:string against the lexical were removed. This 
looks incorrect as with the new spec xs:float("foo") would be valid.

For example, for xs:float, the May'03 spec stated:
- If IV is not in the lexical space of xs:float, as defined in XML 
Schema Part 2: Datatypes, then an error is raise ("Invalid lexical 
value")
- Otherwise, TV is xs:float(IV) ...

But in the Nov'03 spec, it just says:
- If ST is xdt:untypedAtomic, xs:anySimpleType or xs:string or a type 
derived fromxs:string, SV is converted to  an intermediate value IV of 
type xs:string and TV is xs:float(IV).

It seems the rules should follow the form:
- If ST is xdt:untypedAtomic, xs:anySimpleType or xs:string or a type 
derived fromxs:string, SV is converted to  an intermediate value IV of 
type xs:string
- If IV is not in the lexical space of xs:float, as defined in XML 
Schema Part 2: Datatypes, then an error is raised ("Invalid lexical 
value")
- Otherwise, TV is xs:float(IV)

--Sarah
Received on Wednesday, 19 November 2003 13:39:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:03 GMT