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

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.  There's 
no coherent reason I'm aware of in principle:  we could have let you 
extend an 'all' with another 'all'.  My recollection of the history is 
that some WG members were dubious about having 'all' at all, and for 
better or worse that led to a general 'go slow' attitude on making it more 
capable.  Similar reasoning applies to the lack of minOccurs/maxOccurs on 
the constituents of an all group.

It would take a little longer than I have to give links to the exact 
component constraints, but basically I believe it's the ones that say (a) 
an extension is a sequence that must have as its first member the model 
group being extended and (b) an all group must be at the top level.  My 
reading is that to satisfy the first rule, the all group would have to be 
within the extended sequence, and hence not at the top level. QED (more or 
less.)

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------

Received on Friday, 6 February 2004 17:32:33 UTC