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

Re: Element occurence

From: Eric van der Vlist <vdv@dyomedea.com>
Date: Wed, 20 Jun 2001 17:30:02 +0200
Message-ID: <3B30C17A.970A8AA3@dyomedea.com>
To: xmlschema-dev@w3.org
Morris Matsa wrote:
> 
> > <!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>

No, this was the solution originally brought by Wouter Cordewiner as
bogus and this will be considered as ambiguous since a processor cannot
detect if he is referring to the 1st or 3rd element reference when there
is no level5 element.

Eric
-- 
Pour y voir plus clair dans la nebuleuse XML...
                                          http://dyomedea.com/formation/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org
------------------------------------------------------------------------
Received on Wednesday, 20 June 2001 11:30:06 GMT

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