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

RE: list of complextypes?

From: Michael Kay <mike@saxonica.com>
Date: Fri, 14 May 2010 15:05:21 +0100
To: "'Raoul'" <raoul.doc@googlemail.com>, <xmlschema-dev@w3.org>
Message-ID: <4ABE15F283E7443EAE066AA25C1578B2@Sealion>
> I'm facing an issue here and I was hoping you could help me 
> :) Basically I have several complexTypes defined extending a 
> parent complexTypes (let's call it parentType). (using 
> xs:extension) Each of these complexTypes has a unique element 
> associated to it. So far so good.
> The problem is that I want to define a sequence/list 
> containing elements extending the complexType.
> I believe to achieve this I have to create a new element with 
> a new name of type parentType... But what I want really is 
> the user of the schema to have a sequence of any elements 
> that are extending parentType. Is this possible in a nice way?

It might be clearer if you showed an example - I might have misunderstood
your explanation.

But I would think the answer is to define an extension of the base type
containing all the child elements permitted by the extension types, and then
if necessary define restrictions of this extended type that limit the set of
extensions allowed in each case.


Michael Kay
Received on Friday, 14 May 2010 14:05:51 UTC

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