Re: Question about number types

On 4 Jul 2008, at 10:29 , C.M.Sperberg-McQueen wrote:

>
> On 4 Jul 2008, at 09:13 , Alan Ruttenberg wrote:
>
> > On Jul 4, 2008, at 11:10 AM, C. M. Sperberg-McQueen wrote:
>
> >> Personally, I thought the spec was fairly clear that the
> >> disjointness of the primitives is a given for purposes of XSD, and
> >> is not intended as a constraint on other systems, which will of
> >> course wish to compare values across primitive types.
> ...
> > Would you mind pointing us to the text that makes this clear? It
> > would be very helpful for our discussion.
>

My earlier answer pointed to passages in the 1.0 and 1.1 specs,
but on reflection I think the stronger argument is just:  given
that several of the value spaces are described in the same terms
(numbers, bit strings), how could the rule that the value spaces
of the XSD types are disjoint be taken any other way than as
specifying that they are treated as disjoint for purposes of the
comparison operations defined in the XSD spec for purposes of
bounds checking, enumerations, and identity constraints?  It
does not lie within the power of the XSD spec, or any other
spec, to say that numbers expressible with finite decimal
numerals and numbers which can be expressed as m × 2^e cannot
be compared.

The disjointness of the value spaces postulated by XSD is a
convenient way of handling the relatively few cases of
cross-primitive comparison that can arise in schema-validity
assessment, and of ensuring that one can postulate, given
a value, knowledge of its primitive datatype.

I hope this helps.

--CMSMcQ

Received on Friday, 4 July 2008 18:06:49 UTC