suggestion for next version of XML Schema definition

Hello,

Per your announcement at http://www.w3c.org/XML/Schema, I have a propsed
requirement for the next version of the XML Schema definition.

My understanding of the current XML Schema definition is that there are
three ways to include multiple subelements within an element:

-<all>
-<choice>
-<sequence>

As I understand it, the <all> tag allows zero or one instance of each
subelement to appear in an element; the <choice> tag allows any number of
instances of a single subelement to appear in an element; the <sequence>
tag allows any number of instances of any of the subelements to appear, but
the must appear in the order defined in the schema.

My proposal is to add an additional tag (all is the obvious name, but is
already used), which would behave like <sequence> but without the ordering
constraint.

For example, suppose that I have an element, FOO, which may have 3
subelements, BAR1, BAR2, and BAR3.  I define a complex type, FOOTYPE to
construct a type for FOO.  My current options are as follows:

<xs:complexType name="FOOTYPE">
      <xs:all>
        <xs:element name="BAR1" type="xs:string"></xs:element>
        <xs:element name="BAR2" type="xs:string"></xs:element>
        <xs:element name="BAR3" type="xs:String"></xs:element>
      </xs:sequence>
</xs:complexType>

The above allows me to have zero or one BAR1, zero or one BAR2, and zero or
one BAR3.  The BAR1, BAR2, and BAR3 may be specified in any order.

<xs:complexType name="FOOTYPE">
      <xs:choice>
        <xs:element name="BAR1" type="xs:string"></xs:element>
        <xs:element name="BAR2" type="xs:string"></xs:element>
        <xs:element name="BAR3" type="xs:String"></xs:element>
      </xs:sequence>
</xs:complexType>

The above allows me to have any number of BAR1s (but no BAR2s and no
BAR3s), or any number of BAR2s (no BAR1s and no BAR3s), or any number of
BAR3s (no BAR1s and no BAR2s).

<xs:complexType name="FOOTYPE">
      <xs:sequence>
        <xs:element name="BAR1" type="xs:string"></xs:element>
        <xs:element name="BAR2" type="xs:string"></xs:element>
        <xs:element name="BAR3" type="xs:String"></xs:element>
      </xs:sequence>
</xs:complexType>

The above allows me to have any number of BAR1s followed by any number of
BAR2s followed by any number of BAR3s (all subject to limitations imposed
by minOccurs and maxOccurs attributes).

I would like to have the following:

<xs:complexType name="FOOTYPE">
      <xs:newTag>
        <xs:element name="BAR1" type="xs:string"></xs:element>
        <xs:element name="BAR2" type="xs:string"></xs:element>
        <xs:element name="BAR3" type="xs:String"></xs:element>
      </xs:sequence>
</xs:complexType>

Where <newTag> allows me to have any number of BAR1s, any number of BAR2s
and any number of BAR3s (numbers subject to limitations imposed by
minOccurs and maxOccurs), where the BARx elements can be specified in any
order.

I have been involved in the definition of several XML schemas.  For all of
them, I was forced to use the <sequence> tag to allow multiple instances of
multiple elements.  For all of them, the <sequence> tag imposed an
artificial order, not otherwise included in the requirements for the
system.  I hope you will consider removing this limitation in the next
version.

If my understanding of the current version of the XML Schema definition is
faulty, and my proposed requirement has already been implemented, then I
appologize for taking your time.

Please feel free to contact me if I can be of assistance.

Dorrit

Dorrit Gordon
Sr. IT Process Engineer
Seagate Technology
831-439-7139

Received on Thursday, 14 August 2003 09:06:31 UTC