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 4337 - Substitution group and abstract
Summary: Substitution group and abstract
Status: CLOSED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.0/1.1 both
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords: resolved
Depends on:
Blocks:
 
Reported: 2007-02-19 17:33 UTC by Sandy Gao
Modified: 2009-04-21 19:21 UTC (History)
0 users

See Also:


Attachments

Description Sandy Gao 2007-02-19 17:33:14 UTC
Can an abstract element declaration "substitute" another element declaration? The 2 substitution group related constraints give different answers.

In the definition of "substitution group" [1], it's clear that abstract element declarations are excluded. But Substitution Group OK (Transitive) doesn't take abstractness into account.

Many people consider substitution group as a choice over all members of the "substitution group" of the head. This is currently *not* true given the inconsistency between these constraints.

Consider

<element name="head" type="date"/>
<element name="sub" substitutionGroup="head" abstract="true"/>
...
<choice or sequence>
 <element ref="head"/>
 <element name="sub" type="int"/>
</choice or sequence>

It's not clear whether the above <choice> violates "Unique Particle Attribution", and it's not clear whether the <sequence> violates "Element Declaration Consistent".

What's the rationale for [1] to exlcude abstract elements from substitution groups? Given the changes in how abstract is handled in schema 1.1 (moving more toward "matched but unfortunately abstract"), maybe [1] should be changed to include abstract elements?

[1] http://www.w3.org/TR/xmlschema11-1/#key-eq
[2] http://www.w3.org/TR/xmlschema11-1/#cos-equiv-derived-ok-rec
Comment 1 C. M. Sperberg-McQueen 2007-03-27 15:24:45 UTC
On 23 March, the WG accepted a wording proposal to resolve this issue by
aligning our definitions and our usage more consistently.  The requirement
that an element not be abstract is already enforced elsewhere; it does not
need to play a role in the definition of the concept 'substitution group'.