Questions about "equal" fundamental facet

1. Is it defined on "value spaces", or "types"?

In 4.2.1 of the datatype spec: "Every ·value space· supports the notion of
equality, ...". So it seems that "equal" is defined on "value spaces". Does
this imply that two (unconnected) types (with the same value space) can
have equal values? For example, hexBinary and base64Binary have the same
value space ("the set of finite-length sequences of binary octets").
hexBinary value "00" and base64Binary value "AA==" both represent one byte
of value "0". Then are the two values equal? I would say they are equal, if
"equal" is defined on value spaces.

But 3.11.1 of the structure spec says "Values of differing type can only be
equal if one type is derived from the other, and the value is in the value
space of both". Here it seems to indicate something different. Is this a
contradiction?

2. Does the types have to be related by ·restriction· or ·union·?

If type A restricts "integer" by setting "minInclusive=0", and B restricts
"integer" by setting "maxInclusive=10". Now A and B are not related by
restriction or union. But I still expect value "5" from both types (values
spaces) to be equal.

(If they have to be related by ·restriction· or ·union·, doesn't 3.11.1 of
the structure spec need to be modified to be more strict, instead of simply
saying "derived from"?)


My take on these 2 questions:

1. "equal" should be defined on value spaces, because equal values are
equal, no matter how they were lexically represented.

2. Types used to generate equal (actual) values don't need to be related.
As long as there exist a (primitive) value space to which both values
belong, and the two values are equal in that value space, then they are
equal. This means hexBinary and base64Binary can generate equal values, so
can QName and NOTATION. Further on this, maybe the value space of "float"
should (or already is) be a subset of that of "double", so that these types
can generate equal values.

Thanks,
Sandy Gao
Software Developer, IBM Canada
(1-905) 413-3255
sandygao@ca.ibm.com

Received on Wednesday, 24 April 2002 14:43:32 UTC