[Bug 5074] substitution groups not that strictly limited

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





------- Comment #2 from xan.gregg@jmp.com  2008-01-01 22:23 -------
Sounds better. I realize you don't want to get into all the details such as
disallowed substitutions in section 2.

However, I would like to know whether my example is valid. The validators I
have handy (XSV and an old Xerces) say it is (schema below), but the first
statement of 2.2.2.2 suggests otherwise, unless "such members" restricts the
statement to direct members only.

The issue is that eb is in the substitution group headed by ea, but eb's type
is neither a restriction nor an extension of ea's type.

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:complexType name="ta">
    <xs:sequence>
      <xs:element name="a" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="t0">
    <xs:complexContent>
      <xs:restriction base="ta">
        <xs:sequence/>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="tb">
    <xs:complexContent>
      <xs:extension base="t0">
        <xs:sequence>
          <xs:element name="b" minOccurs="0"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:element name="ea" type="ta"/>

  <xs:element name="e0" substitutionGroup="ea"/>

  <xs:element name="eb" substitutionGroup="e0"/>

</xs:schema>

Received on Tuesday, 1 January 2008 22:23:20 UTC