W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2004

Re: How ensure group elements exist and in any order

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
Message-id: <41642A3C.405@tibco.com>

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:element ref="a"/>
                     <xsd:element ref="b" minOccurs="0"/>
                     <xsd:element ref="b"/>
                     <xsd:element ref="a" minOccurs="0"/>
     <xsd:element name="a" type="xsd:string"/>
     <xsd:element name="b" type="xsd:string"/>

Anli Shundi					ashundi@tibco.com
TIBCO Software Inc.				office: (919) 969-6518

Get Firefox! http://www.mozilla.org/products/firefox/
Received on Wednesday, 6 October 2004 17:24:55 UTC

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