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


From: Andrew Wilson <andreww@naa.gov.au>
Date: Fri, 22 Feb 2002 12:04:16 +1100
Message-ID: <2BC4D1CA28C5D511AA190002A574CADB238186@SPARMAIL3>
To: "'XMLDev'" <xmlschema-dev@w3.org>

I'm new to XML schema development so my question might be really simple and
have been answered years ago:)

In the XML Schema Spec. part 1 it says in sect. 3.8.1: "...(choice)
correspond to exactly one of the specified particles;". I read this as
saying one of the particles in the choice group *must* appear.

However, the XML representation summary in 3.8.2 allows a minOccurs for
choice of 0 (nonNegativeInteger). So is the following valid?:

<xsd:choice minOccurs="0" maxOccurs="unbounded">
 <xsd:element ref="A"/>
 <xsd:element ref="B"/>
 <xsd:element ref="C"/>
 <xsd:element ref="D"/>
 <xsd:element ref="E"/>
 <xsd:element ref="F"/>
 <xsd:element ref="G"/>

[I'm trying to say that none of the elements have to be used but any of them
can be used as many times as needed]

If this is correct, how should the statement in 3.8.1 be read?

Andrew Wilson
Received on Thursday, 21 February 2002 20:05:13 UTC

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