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

Interpretation of a choice element

From: Autumn Cuellar <a.cuellar@auckland.ac.nz>
Date: Thu, 18 Apr 2002 20:15:52 -0400 (EDT)
Message-ID: <3CBF6190.4062F03F@auckland.ac.nz>
To: xmlschema-dev@w3.org
Hi,

How should the following be interpreted:

  <xsd:complexType name="A">
    <xsd:choice>
      <xsd:element ref="B" minOccurs="0" maxOccurs="1" />
      <xsd:element ref="C" minOccurs="0" maxOccurs="unbounded" />
      <xsd:element ref="D" minOccurs="0" maxOccurs="unbounded" />
    </xsd:choice>
  </xsd:complexType>

Would it be the same as saying

<!ELEMENT A (B? | C* | D*)>

in a DTD?

What I don't want is to be limited to exactly one choice of B, C, or D. 
I'm confusing myself on semantics.

Thanks for your help!

Cheers,
Autumn

-- 
Autumn A. Cuellar
Bioengineering Institute
The University of Auckland
New Zealand
Received on Friday, 19 April 2002 04:39:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:30 GMT