- From: Anli Shundi <ashundi@tibco.com>
- Date: Wed, 06 Oct 2004 13:24:12 -0400
- To: Michael Kay <mike@saxonica.com>
- Cc: "'Gary Fix'" <gary.fix@win-na.com>, xmlschema-dev@w3.org
On 10/6/2004 11:54 AM, Michael Kay wrote:
>>But the all group would allow also none of the elements.
>
>
> Not if the element specifies minOccurs="1".
>
but in that case an all group wouldn't allow only a or only b. I
thought that was a requirement.
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="root">
<xsd:complexType>
<xsd:choice>
<xsd:sequence>
<xsd:element ref="a"/>
<xsd:element ref="b" minOccurs="0"/>
</xsd:sequence>
<xsd:sequence>
<xsd:element ref="b"/>
<xsd:element ref="a" minOccurs="0"/>
</xsd:sequence>
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:element name="a" type="xsd:string"/>
<xsd:element name="b" type="xsd:string"/>
</xsd:schema>
--
Anli Shundi ashundi@tibco.com
TIBCO Software Inc. office: (919) 969-6518
www.tibco.com
Get Firefox! http://www.mozilla.org/products/firefox/
Received on Wednesday, 6 October 2004 17:24:55 UTC