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

Re: complexType : extension of a sequence by a choice ?

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Sun, 08 Feb 2004 21:43:37 +0000
To: noah_mendelsohn@us.ibm.com
Cc: "Michael Kay" <mhk@mhk.me.uk>, "'Bruno Chatel'" <bcha@chadocs.net>, xmlschema-dev@w3.org
Message-ID: <f5bwu6xs0vq.fsf@erasmus.inf.ed.ac.uk>

noah_mendelsohn@us.ibm.com writes:

> Michael Kay asks:
>
>> > As your other reply said, the result of an extension is 
>> > always a sequence of the extended model followed by the 
>> > extending model. 
>
>> I've had trouble myself in working out how this applies to content
>> models that use xs:all.
>
> The short answer is, it doesn't.  You can't extend an all group.

Your conclusions are correct.

There is slightly more than just conservatism behind the decision,
however.

As it stands, there is an invariant for extension, just as there is
for restriction, namely

  Extension: Consider a type definition DE derived by extension from a
    base type definition B.  Then any sequence of EIIs valid per DE
    contains an initial sub-sequence valid per B.

  Restriction:  Consider a type definition DR derived by extension from a
    base type definition B.  Then any sequence of EIIs valid per DR
    is also valid per B.

Allowing one 'all' to be extended by (merged with) another would lead
to violations of the Extension invariant.

ht
-- 
 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                     Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
            Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Sunday, 8 February 2004 16:43:54 GMT

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