W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2004

Re: Comparison of values of anySimpleType

From: <noah_mendelsohn@us.ibm.com>
Date: Fri, 29 Oct 2004 16:46:37 -0400
To: Kasimier Buchcik <kbuchcik@4commerce.de>
Cc: xmlschema-dev@w3.org
Message-ID: <OFA23535A6.7D89EA74-ON85256F3C.00710103@lotus.com>

>From our brand, spanking new XML Schema 1.0 Second Edition Recommendation 

"The mapping from lexical space to value space is unspecified for items 
whose type definition is the ·simple ur-type definition·. Accordingly this 
specification does not constrain processors' behaviour in areas where this 
mapping is implicated, for example checking such items against 
enumerations, constructing default attributes or elements whose declared 
type definition is the ·simple ur-type definition·, checking identity 
constraints involving such items.

Note: The Working Group expects to return to this area in a future version 
of this specification."

Key/keyref are what the Recommendation calls Identity Constraints.  So, 
this is a rare case where processors implementing different validation 
rules are all conforming.



Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142

Kasimier Buchcik <kbuchcik@4commerce.de>
Sent by: xmlschema-dev-request@w3.org
10/20/04 07:45 AM

        To:     <xmlschema-dev@w3.org>
        cc:     (bcc: Noah Mendelsohn/Cambridge/IBM)
        Subject:        Comparison of values of anySimpleType


I have trouble understanding how 'anySimpleType' is handled if comparing 
values. Xerces and XSV seem to differ here.

Identity-constraint example:
(using Xerces-J 2.5.1, XSV 2.5-2, MSXML 4.0)

   <element name="b" type="anySimpleType"/>
   <element name="c" type="float"/>


with the value of 'c' being a keyref to the key value of 'b'.

Results: XSV and MSXML do not find the referenced key, Xerces does.

if both types are 'float':

Results: All tree validators find the referenced key.

I cannot find a hint for 'anySimpleType' being not comparable with the
primitive types. The PER for datatypes says:

"anySimpleType is considered to have an unconstrained lexical space and 
a ·value space· consisting of the union of the ·value space·s of all the 
·primitive· datatypes and the set of all lists of all members of the 
·value space·s of all the ·primitive· datatypes."

Further "4.2.1 equal" says:

"if a datatype T' is ·derived· by ·restriction· from an atomic datatype 
T then the ·value space· of T' is a subset of the ·value space· of T. 
Values in the ·value space·s of T and T' can be compared according to 
the above rules "

Can someone explain?


Received on Friday, 29 October 2004 20:47:33 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:06 UTC