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

Atleast one element should be present in ComplexType.

From: Avula, Raj <ravula@firstam.com>
Date: Tue, 1 Apr 2003 11:23:47 -0800
Message-ID: <E21C200833A45947B5410D9F10B187921B67BE@powaymail3.credit.credco.net>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>


Hi,
	I have a complexType with two element children and I need to make
sure that atleast one of that should be present.
Here is the sample.

	<xs:element name="REQUEST">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="OPTION" minOccurs="0"
maxOccurs="unbounded"/>
				<xs:element ref="DATA" minOccurs="0"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>

In the above example, I need to make sure that atleast on among OPTION, DATA
should be present.

Thanks,
Raj.
Received on Tuesday, 1 April 2003 14:57:04 GMT

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