Re: Doubt about Choice of lists

Michael Kay <[email protected]>
Newsgroups gmane.text.xml.schema.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.