W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2004

Combining maxOccurs="unbounded" with all indicator

From: Frans Englich <frans.englich@telia.com>
Date: Sun, 31 Oct 2004 02:24:19 +0000
To: "Xmlschema-dev" <xmlschema-dev@w3.org>
Message-Id: <200410310224.20079.frans.englich@telia.com>

Hello all,

Combining maxOccurs="unbounded" with the 'all' indicator doesn't work, but as 
far as I can tell, it would achieve what I want.

The dilemma occurs in this Schema snippet:

   <xsd:element name="kcfg">
   <!-- root/document element -->
                <xsd:element name="include" maxOccurs="unbounded" 
                <xsd:element name="kcfgfile" type="xsd:string"/>
                <xsd:element name="group" maxOccurs="unbounded" >
                            <xsd:element name="entry" type="kcfg:entry"
                        <xsd:attribute name="name" type="xsd:string"/>

What I want, is to allow the include and group elements to exist "unbounded" 
amounts of time, freely mixed with the kcfgfile element and each others(as 
xsd:all suggests). I don't understand why this restriction in the Schema 
design is there.

How do I achieve this -- allow multiple unbounded elements to be freely mixed 
with each others and simple elements?


Received on Sunday, 31 October 2004 02:19:21 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:06 UTC