Re: <xsd:sequence> required?

I think the following will give you what you want;

<xs:complexType name='ModelType' >
  <xs:choice minOccurs='0' maxOccurs='unbounded' >
    <xs:element ref='cellml:units' />
    <xs:element ref='cellml:group' />
    <xs:element ref='cellml:connection' />
    <xs:element ref='rdf:RDF' />
  </xs:choice>
  <xs:attribute ref='cellml:name' use='required' />
  <xs:attribute ref='cmeta:id' use='optional' />
</xs:complexType>


Regards

Martin Gudgin

----- Original Message ----- 
From: "Autumn Cuellar" <a.cuellar@auckland.ac.nz>
To: <xmlschema-dev@w3.org>
Sent: Sunday, February 10, 2002 2:21 AM
Subject: <xsd:sequence> required?


> What I want to be able to say with the following piece of code is that 
> one can use the mentioned elements any number of times and in any order.
> 
>    <xsd:complexType name="ModelType">
>      <xsd:element ref="cellml:units" minOccurs="0 
> maxOccurs="unbounded"/>
>      <xsd:element ref="cellml:component" minOccurs="0"
>        maxOccurs="unbounded" />
>      <xsd:element ref="cellml:group" minOccurs="0"
>        maxOccurs="unbounded"/>
>      <xsd:element ref="cellml:connection" minOccurs="0"
>        maxOccurs="unbounded" />
>      <xsd:element ref="rdf:RDF" minOccurs="0" maxOccurs="unbounded" />
>      <xsd:attribute ref="cellml:name" use="required" />
>      <xsd:attribute ref="cmeta:id" use="optional" />
>    </xsd:complexType>
> 
> Since the children elements can be in any order, the <xsd:sequence> 
> element is not useful.  Neither are the <xsd:choice> and <xsd:all>.  Is 
> it necessary that I use one of them in this case?  I do not quite 
> understand the concept of a model group and have not made it all the way 
> through Primer 1.  Thanks for your help!
> 
> Autumn A. Cuellar
> 
> 

Received on Friday, 15 February 2002 13:49:56 UTC