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

Occurs without restricting order

From: Michael Erdmann <merdmann@epost.de>
Date: Wed, 28 Mar 2001 20:45:41 +0200
Message-ID: <3AC23155.87631ED4@epost.de>
To: xmlschema-dev@w3.org
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 13:46:23 GMT

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