W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2002

Re: all group maxOccurs cannot be unbounded limitation

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 05 Feb 2002 09:05:33 +0000
To: Christopher Birkett <christopherbirkett@yahoo.com>
Cc: www-xml-schema-comments@w3.org, xmlschema-dev@w3.org
Message-ID: <f5b8za8nvs2.fsf@cogsci.ed.ac.uk>
Christopher Birkett <christopherbirkett@yahoo.com> writes:

> Hello,
> Can someone explain to me how to specify any order of
> elements and any occurence for each?  I need xsd:all
> with child elements' maxOccurs="unbounded", but this
> does not seem to be valid.  So how else can I do it?

<xs:choice maxOccurs="unbounded">
 <xs:element ref="..."/>
 <xs:element ref="..."/>
 <xs:element ref="..."/>

This gives you any order, any number.

> Also, I really do not understand why this limitation
> was put in and why it cannot be turned off.  Can
> someone explain to me the logic behind this decision?

This is a FAQ, there's a number of earlier threads about it, sorry
can't immediately lay my hands on a pointer.

  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
Received on Tuesday, 5 February 2002 04:06:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:58 UTC