[Bug 2142] R-151: Questions about equal fundamental facet

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2142

           Summary: R-151: Questions about equal fundamental facet
           Product: XML Schema
           Version: 1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSD Part 2: Datatypes
        AssignedTo: cmsmcq@w3.org
        ReportedBy: sandygao@ca.ibm.com
         QAContact: www-xml-schema-comments@w3.org


Questions include:

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? 

But 3.11.1 of the Structures 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? 

Do 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"?)

The commentator's views on these issues:

"equal" should be defined on value spaces, because equal values are equal, no 
matter how they were lexically represented. 
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.

See:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2002AprJun/0059.html

Received on Monday, 12 September 2005 16:39:20 UTC