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

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

From: <noah_mendelsohn@us.ibm.com>
Date: Fri, 6 Feb 2004 17:29:40 -0500
To: "Michael Kay" <mhk@mhk.me.uk>
Cc: "'Bruno Chatel'" <bcha@chadocs.net>, "'Henry S. Thompson'" <ht@inf.ed.ac.uk>, xmlschema-dev@w3.org
Message-ID: <OF00886009.119DB357-ON85256E32.007AEC11@lotus.com>

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 

Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
Received on Friday, 6 February 2004 17:32:33 UTC

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