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

[F+O] Casting to subtypes of xs:integer

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Wed, 10 Dec 2003 14:18:59 +0100
Message-ID: <DFF2AC9E3583D511A21F0008C7E62106073DD32A@daemsg02.software-ag.de>
To: public-qt-comments@w3.org

The normal rules for casting to a derived type are that the value must
satisfy all the facets of the target type. But there are special rules in
section 17.8.4 for xs:integer, which cause the supplied value to be
truncated towards zero.

It's not clear whether or not these special rules also apply if the target
type is a subtype of xs:integer. For example, xs:short(4.3). 

I think they should apply. But the rules then need to be modified to allow
this. For example, the clause "and TV is xs:integer(IV)" is wrong.

Michael Kay

PS: these rules still have references to xs:anySimpleType. This doesn't
belong in the casting rules because it's not an atomic type. It's gone from
the table, but not from the text.
Received on Wednesday, 10 December 2003 08:20:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:28 GMT