RE: Element occurrence

< > <!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 UTC