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

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:element name="E3" type="xs:string"/>
				<xs:element name="E4" type="xs:string"
minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="t:Test1_Root"/>

Dinesh Sankaralingam
(512) 338-1711 ext 106
Received on Wednesday, 5 March 2003 10:57:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:09 UTC