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

[Bug 4071] particlesZ026 - duplicate attributes

From: <bugzilla@wiggum.w3.org>
Date: Tue, 12 Dec 2006 15:54:02 +0000
CC:
To: public-xml-schema-testsuite@w3.org
Message-Id: <E1Gu9xC-0004Hd-8y@wiggum.w3.org>

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

           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:complexContent>
    <xs:extension base="StatementType">
       <xs:attribute name="StatementAssembly" type="xs:string"/>
       <xs:attribute name="StatementClass" type="xs:string"/>
    </xs:extension>
  </xs:complexContent>
</xs:complexType>

<xs:complexType name="ManagedItemType">
  <xs:complexContent>
    <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"/>
    </xs:extension>
  </xs:complexContent>
</xs:complexType>

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 GMT

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