RE: list of complextypes?

> 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.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 

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