W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2010

Re: Doubt about Choice of lists

From: Michael Kay <mike@saxonica.com>
Date: Fri, 17 Dec 2010 16:10:09 +0000
Message-ID: <4D0B8B61.4080902@saxonica.com>
To: Luis Enrique <enrique@defferrari.com.br>
CC: xmlschema-dev@w3.org
On 17/12/2010 14:18, Luis Enrique wrote:
> Hi people,
> I have a schema with the following structure:
>
> <element name="demonstrativosRetorno" minOccurs="0">
> <complexType>
> <choice>
> <element name="element1" type="type1" maxOccurs="30"/>
> <element name="element2" type="type2" maxOccurs="30"/>
> <element name="element3" type="type3" maxOccurs="30"/>
> <element name="element4" type="type4" maxOccurs="30"/>
> </choice>
> </complexType>
> </element>
>
> what it means?
> I can have a list of elements, all of the same type?

Yes, that's correct. If you want a mixed list, move the maxOccurs to the 
<choice> element.

Michael Kay
Saxonica
Received on Friday, 17 December 2010 16:10:37 UTC

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