W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2004

using substitutionGroup members in complexType derviation by restriction ?

From: Edmund Vorauer <edmund.vorauer@utanet.at>
Date: Tue, 16 Nov 2004 14:48:30 +0100 (CET)
Message-ID: <57892.>
To: <xmlschema-dev@w3.org>


is there an non-ambiguous rule in the spec which allows the use of
substitutionGroup members instead of the original element in the derived
type ?

i've the following schema:

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

        <xs:element name="A" type="xs:token"/>

        <xs:element name="B" substitutionGroup="A">
                        <xs:restriction base="xs:token">
                                <xs:maxLength value="2"/>

        <xs:complexType name="X">
                        <xs:element ref="A"/>

        <xs:complexType name="Y">
                        <xs:restriction base="X">
                                        <!-- use of an substitutionGroup
member from element A in the
restriction -->
                                        <xs:element ref="B"/>


as i understand the spec, this schema is not valid because the derived
type uses element B instead of element A in the content model;

the rule/clause that should be violated is rcase-NameAndTypeOK.1:
1 The declarations' {name}s and {target namespace}s are the same.

however, other people argue that rule/clause cos-particle-restrict.1:
1 They are the same particle.
is fulfilled because A contains B as a substitutionGroup member:

any hint most wellcome!

edmund vorauer
Received on Tuesday, 16 November 2004 14:33:38 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:06 UTC