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

xsd:group and minOccurs

From: Gregory M. Messner <gmessner@breezefactor.com>
Date: Wed, 28 Aug 2002 02:18:59 -0400 (EDT)
Message-ID: <B181E96D7A30D411A12600A0CCE475DE0F92AE@breezefactor.com>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>

I'm trying to get a definitive interpretation of the use of minOccurs
attribute and an xsd:group reference.  The only thing I could find in the
specification is at http://www.w3.org/TR/xmlschema-1/#element-group and it
was a little unclear.

I have an xsd:group defined with a sequence of optional elements as follows:

<xsd:group name="agroup">
   		<xsd:element name="A" minOccurs="0" type="xsd:string">
		<xsd:element name="B" minOccurs="0" type="xsd:string">
		<xsd:element name="C" minOccurs="0" type="xsd:string">

And a reference to it as follows:

<xsd:element name="test">
			<xsd:element name="foo" minOccurs="0"
    			<xsd:group ref="agroup"/>

Since the "agroup" reference in the "test" element has an implied
minOccurs="1" would a document with an empty "test" element be valid against
the schema?
Received on Wednesday, 28 August 2002 11:23:56 UTC

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