W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2000

Comment on last call of Schema doc

From: Dan Rupe <Dan_Rupe@go.com>
Date: Fri, 12 May 2000 08:21:18 -0700 (PDT)
To: www-xml-schema-comments@w3.org
Message-id: <6335708.958144878306.JavaMail.Dan_Rupe@gomailjtp05>
I would like to be able to specify the opposite of <sequence> (unsequential) within complexTypes and groups.

Consider the following example in a schema:

	<complexType name="A_complexType">
		<element name="B" type="int" />
		<element name="C" type="int" />

	<element name="A_complex" type="A_complexType" />

In my instance document, I would simply like <C> to be able to come before <B>, for example.

Or, in this example schema snippet:

	<complexType name="A_complexType">
		<element name="B" type="int" minOccurs="0" maxOccurs="unbounded"/>
		<element name="C" type="int" minOccurs="0" maxOccurs="unbounded"/>

	<element name="A_complex" type="A_complexType" />

I would like to able to specify that any number of <B>'s and <C>'s can appear any number of times and in any order.  Like this:


It's my understanding that the order of elements declared within a complexType in the schema must appear in that same order in the instance document.  (Of course a minOccurs with a value of zero can make an element optional, but following elements must still appear sequentially in the instance document.)  The Primer also mentions that a named group is <sequence> by default.

It seems the <all> element may be an attempt to provide unsequential capabilities, but I'm not sure if this is what <all> really provides.  (I can't really tell for sure because XML Spy has not implemented it yet.  Are there other validators out there that have?)  If it does, it's use seems limited since it can only be used at the top-level of any content model, and the its children must be simple elements, not contained groups.

Since <sequence> is the default behavior of complex types and groups, I suggest one of two possible scenarios:

1.) <sequence> could have a boolean attribute added to it which allows unsequential capabilities
2.) Remove <sequence> altogether (since it's the default) and add a <unsequence>-like element.

Thanks for any considerations.


Dan Rupe

GO Network Mail                                    
Get Your Free, Private E-mail at http://mail.go.com
Received on Friday, 12 May 2000 11:21:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:47 UTC