W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2008

[Bug 5074] substitution groups not that strictly limited

From: <bugzilla@wiggum.w3.org>
Date: Tue, 01 Jan 2008 22:23:18 +0000
To: www-xml-schema-comments@w3.org
Message-Id: <E1J9pW2-0000us-Da@wiggum.w3.org>


------- 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 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:element name="a" minOccurs="0"/>

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

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

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

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

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

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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:07 UTC