This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Test 'over021.bad.xsd' of set 'Override' overrides the same component within the same <xs:override> element twice. I agree from a logical point of view, that this should be invalid. But which clause in the spec makes it invalid? If the schema is changed from: <xs:override schemaLocation="over019a.xsd"> <xs:element name="doc" type="xs:date"/> <xs:element name="doc" type="xs:time"/> </xs:override> to: <xs:override schemaLocation="over019a.xsd"> <xs:element name="doc" type="xs:date"/> </xs:override> <xs:override schemaLocation="over019a.xsd"> <xs:element name="doc" type="xs:time"/> </xs:override> then the transformation runs twice and element declaration "doc" is duplicate causing sch-props-correct.2 to fail. But with only one <xs:override> the transformation only runs once and selects the first "doc" element declaration. Best regards, Andreas Meissl
On a strict reading of the spec I think you might be correct that this is not an error. However, the non-normative description of the transformation perhaps captures the intent: "[if] O1 has a child E1 with the same element type and the same value for its name attribute, then D2′ has a copy of E1 in the location corresponding to E2's place in D2.", which most people would read as implying that if O1 has several such children, then D2' has copies of all of them, which would produce an invalid schema. So I think we should make this an error.
On discussion the WG believes that this an erratum is needed to make this situation an error.