[Bug 4071] particlesZ026 - duplicate attributes


           Summary: particlesZ026 - duplicate attributes
           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 Particles test set, test group particlesZ026, the schema
particlesZ026a.xsd has:

<xs:complexType name="ItemType" abstract="true">
    <xs:extension base="StatementType">
       <xs:attribute name="StatementAssembly" type="xs:string"/>
       <xs:attribute name="StatementClass" type="xs:string"/>

<xs:complexType name="ManagedItemType">
    <xs:extension base="ItemType">
      <xs:attribute name="Assembly" type="xs:string" use="required" />
      <xs:attribute name="Class" type="xs:string" use="required" />
      <xs:attribute name="StatementAssembly" type="xs:string" />
      <xs:attribute name="StatementClass" type="xs:string"/>

My reading of the spec is that this is invalid. The {attribute uses} on
ManagedItemTypes consists of the union of the attributes defined in the two
complexType declarations above. It's not defined exactly what "union" means
(that is, how one decides whether two attribute uses are identical) but there
is nothing in the spec to suggest eliminating attributes with duplicate names.
The resulting schema component is therefore invalid under clause 5 of Schema
Component Constraint: Complex Type Definition Properties Correct.

The test metadata reports this schema document as valid.

Received on Tuesday, 12 December 2006 15:54:10 UTC