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

Order of elements in a complex-type (XSD)

From: Dinesh Sankaralingam <dsankara@cook-hurlbert.com>
Date: Wed, 5 Mar 2003 09:51:25 -0600
Message-ID: <BA41D50C3CC458469CAD969C79DFDE3E062662@Loyalty>
To: xmlschema-dev@w3.org

Hi,
I want to make the order of elements to be immaterial in complex-type
definition. But at the same time, I want to make the maximum occurance of
one or two elements to be unbound. Is it possible to do that?
When i have "xs:all", then i have make all the child element's maxOccurs =
1. But i want to make some elements to have "unbound" for maxoccurs. If i
use "xs:choice", then all the child elements have maxOccurs="unbound".

//the code below is giving me an error
<xs:element name="Test_Root">
		<xs:complexType>
			<xs:all>
				<xs:element name="E3" type="xs:string"/>
				<xs:element name="E4" type="xs:string"
minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="t:Test1_Root"/>
			</xs:all>
		</xs:complexType>
</xs:element>

Dinesh Sankaralingam
dinesh@cook-hurlbert.com
(512) 338-1711 ext 106
Received on Wednesday, 5 March 2003 10:57:40 GMT

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