This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17617 - should 'over021.bad.xsd' be valid?
Summary: should 'over021.bad.xsd' be valid?
Status: NEW
Alias: None
Product: XML Schema Test Suite
Classification: Unclassified
Component: Saxon tests (show other bugs)
Version: 2006-11-06
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema Test Suite mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-27 09:29 UTC by Altova XML Developers
Modified: 2015-10-05 00:56 UTC (History)
2 users (show)

See Also:


Attachments

Description Altova XML Developers 2012-06-27 09:29:54 UTC
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
Comment 1 Michael Kay 2012-06-29 11:09:25 UTC
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.
Comment 2 David Ezell 2012-06-29 16:07:38 UTC
On discussion the WG believes that this an erratum is needed to make this situation an error.