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

RE: Element occurrence

From: Tom Wason <wason@mindspring.com>
Date: Wed, 20 Jun 2001 11:39:45 -0400
To: "Morris Matsa" <mmatsa@us.ibm.com>, "Wouter Cordewiner" <wouter_cordewiner@hotmail.com>
Cc: <ht@cogsci.ed.ac.uk>, <xmlschema-dev@w3.org>
Message-ID: <NEBBJIDAALNJAOPHOLJJOELPEOAA.wason@mindspring.com>
< > <!ELEMENT result (level4*,level5*,level4*)>
< >
< > The level4 element is completely optional before and after level5, and
< > level5 itself is also optional.
< >
< > Is there any way to express this without any ambiguity ?

Or the more general solution that allows freely mixed level4 and level5
elements:

   <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element ref="level4"/>
    <xs:element ref="level5"/>
   </xs:choice>

Thomas D. Wason, Ph.D.
Consultant, Collaboration Broker
e-Learning, Meta-Data & XML-Schema
+1 919.839.8187
wason@mindspring.com
http://www.twason.com
1421 Park Drive
Raleigh, North Carolina 27605 USA

< -----Original Message-----
< From: xmlschema-dev-request@w3.org
< [mailto:xmlschema-dev-request@w3.org]On Behalf Of Morris Matsa
< Sent: Wednesday, June 20, 2001 11:12 AM
< To: Wouter Cordewiner
< Cc: ht@cogsci.ed.ac.uk; xmlschema-dev@w3.org
< Subject: Re: Element occurence
<
<
<
<
< > <!ELEMENT result (level4*,level5*,level4*)>
< >
< > The level4 element is completely optional before and after level5, and
< > level5 itself is also optional.
< >
< > Is there any way to express this without any ambiguity ?
<
<
<    <xs:sequence>
<     <xs:element ref="level4" minOccurs="0" maxOccurs="unbounded"/>
<     <xs:element ref="level5" minOccurs="0" maxOccurs="unbounded"/>
<     <xs:element ref="level4" minOccurs="0" maxOccurs="unbounded"/>
<    </xs:sequence>
<
<
<
Received on Wednesday, 20 June 2001 11:41:43 GMT

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