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

How ensure group elements exist and in any order

From: Gary Fix <gary.fix@win-na.com>
Date: Wed, 6 Oct 2004 07:17:38 -0700
Message-ID: <EC0B8316E6B52349A8320C05B0E9CEA704135B9C@uniexcha.unigard.com>
To: <xmlschema-dev@w3.org>

When a group of elements ("VINGroup") is present in my xslt file, I want to confirm that all members of the group are present but they may be in any order (sequence)...
Is there a way do this in the xsd?
This is what I have so far but it forces the VINGroup elements to be in a specific order...
thanks in advance,

<xsd:element name="Vehicle">
			<xsd:choice minOccurs="1" maxOccurs="1">
				<!-- Case #1: VIN & Body/Make/Model Group Supplied -->
					<xsd:element ref="VehicleIdentificationNumber"/>
					<xsd:group ref="VINGroup" minOccurs="1" maxOccurs="1"/>
				<!-- Case #2: VIN Only Supplied -->
					<xsd:element ref="VehicleIdentificationNumber" minOccurs="1"/>
				<!-- Case #3: Body/Make/Model Group Only Supplied -->
					<xsd:group ref="VINGroup" minOccurs="1" maxOccurs="1"/>
<xsd:group name="VINGroup">
		<xsd:element name="Body" type="xsd:string"/>
		<xsd:element name="Make" type="xsd:string"/>
		<xsd:element name="Model" type="xsd:string"/>
Received on Wednesday, 6 October 2004 14:18:10 UTC

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