W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2001

Re: Occurs without restricting order

From: <forge@neonics.com>
Date: Thu, 29 Mar 2001 00:48:52 +0000 (UTC)
To: erdmann@aifb.uni-karlsruhe.de
cc: xmlschema-dev@w3.org
Message-ID: <Pine.LNX.4.21.0103290047390.531-100000@fire>


I don't think this is possible. It's also not possible to determine
content-type by an attribute name or value. 

What I recommend is to throw in a stylesheet that orders the types and
groups them together before you check it against the schema.



On Wed, 28 Mar 2001, Michael Erdmann wrote:

> Sorry if this is a FAQ!
> Is it possible to define a content model that contains
> say 3 elements of type X, 4-6 elemtents of type Y and
> at least 7 elements of type Z? The content model should
> not restrict the order of these elements.
> 
> As far as I know, neither 
>  <xsd:choice minOccurs="3" maxOccurs="3">
>   <xsd:element name="X" minOccurs="3" maxOccurs="3"/>
>   <xsd:element name="Y" minOccurs="4" maxOccurs="6"/>
>   <xsd:element name="Z" minOccurs="7" maxOccurs="unbounded"/>
>  </xsd:choice>
> 
> nor
> 
>  <xsd:all >
>   <xsd:element name="X" minOccurs="3" maxOccurs="3"/>
>   <xsd:element name="Y" minOccurs="4" maxOccurs="6"/>
>   <xsd:element name="Z" minOccurs="7" maxOccurs="unbounded"/>
>  </xsd:choice>
> achieve what i desire, since the elements of the same type always have to 
> be grouped together.
> 
> Is this possible at all?
> 
> thanx,
> 
> 		michael erdmann
> 
> -----------------------
> Michael Erdmann                email: mer@aifb.uni-karlsruhe.de
> Institut AIFB                  phone: ++49 / (0)721 / 608-6592
> Karlsruhe University           fax:   ++49 / (0)721 / 693717
> D-76128 Karlsruhe (Germany)    http://www.aifb.uni-karlsruhe.de/~mer
> -----------------------
> priv.: Emser Straße 361, 56076 Koblenz, GERMANY, Tel: ++49/(0)261/309712
> 
Received on Wednesday, 28 March 2001 17:40:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:20 GMT