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

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 UTC