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

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 UTC