W3C home > Mailing lists > Public > public-xml-schema-testsuite@w3.org > December 2006

[Bug 4065] stZ073b - deriving from a restricted union

From: <bugzilla@wiggum.w3.org>
Date: Sun, 10 Dec 2006 14:53:28 +0000
CC:
To: public-xml-schema-testsuite@w3.org
Message-Id: <E1GtQ3U-0000lu-2d@wiggum.w3.org>

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

           Summary: stZ073b - deriving from a restricted union
           Product: XML Schema Test Suite
           Version: 2006-11-06
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Microsoft tests
        AssignedTo: ht@inf.ed.ac.uk
        ReportedBy: mike@saxonica.com
         QAContact: public-xml-schema-testsuite@w3.org


In the Microsoft SimpleType test set, test group stZ073b, the schema defines a
type

 <xs:simpleType name="st.unionType">
  <xs:restriction>
   <xs:simpleType>
    <xs:union memberTypes="xs:string xs:integer"/>
   </xs:simpleType>
   <xs:enumeration value="a"/>
  </xs:restriction>
 </xs:simpleType>

Intuitively, the value "11" cannot appear as an instance of this type, and the
test is therefore correct to reject it. However, the test actually has 

<test xsi:type="xs:integer">
   11
</test>

Now in Type Derivation OK (Simple), rule 2.2.4 appears to say that
xsi:type="xs:integer" is validly derived from st:unionType, because "B's
{variety} is union and D is validly derived from a type definition in B's
{member type definitions}." If this is the case, then the value 11 is validated
against xs:integer and succeeds.

This seems to be an error in the specification. Rule 2.2.4 should perhaps say 
"B's {variety} is union and B's {base type definition} is anySimpleType and D
is validly derived from a type definition in B's {member type definitions}."
Received on Sunday, 10 December 2006 14:53:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:55 GMT