W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2001

Extnsions for extended complexTypes

From: Michael Shapiro <michael@creativescience.com>
Date: Wed, 30 May 2001 12:17:49 -0700
Message-ID: <008301c0e93d$37158d10$110a0a0a@voquetter>
To: <xmlschema-dev@w3.org>
I have some problems with understanding "3.4.6 Constraints on Complex Type Definition Schema Component"[1].
My reading is that if the complexType "A1" is an extension of complexType "A0" then complexType "A2" cannot be
an extension of complexType "A1" - only restricted complex type would be valid.

Is it correct interpretation?

Invalid schema:

<schema>
    <complexType name="A0">
        <sequence>
            <element name="a0" type="string"/>
        </sequence>
    </complexType>
    <complexType name="A1">
        <extension base="A0">
            <sequence>
                <element name="a1" type="string"/>
            </sequence>
        </extension>
    </complexType>
    <complexType name="A2">
        <extension base="A1">
            <sequence>
                <element name="a2" type="string"/>
            </sequence>
        </extension>
    </complexType>
    <element name="test" type="A2"/>
</schema>

If it is can someone explain why such a restriction on schema validity has been set.

Thanks for the help,
Michael

[1] http://www.w3.org/TR/xmlschema-1/#coss-ct
Received on Wednesday, 30 May 2001 15:30:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:21 GMT