W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2000

Re: XML Schema: element ordering

From: <petsa@us.ibm.com>
Date: Wed, 12 Jul 2000 11:02:24 -0400
To: Robin LaFontaine <robin@monsell.co.uk>
cc: xmlschema-dev@w3.org
Message-ID: <8525691A.00529A25.00@D51MTA03.pok.ibm.com>
Robin:
You got it!  You can't!
In XML Schema a parent element always contains
ordered list(s) of child elements.

XML Query is struggling with this issue but its too
early to tell how it will be resolved.

All the best, Ashok


Robin LaFontaine <robin@monsell.co.uk> on 07/12/2000 10:17:48 AM

To:   xmlschema-dev@w3.org
cc:
Subject:  XML Schema: element ordering




There is a basic requirement for most data structures to distinguish
between a 'list', which is ordered, and a 'set' which is not.

I cannot see how, in XML Schema, to make this distinction.

For example:

    <element name="CoordGeom">
            <complexType>
              <choice minOccurs="0" maxOccurs="unbounded">
                  <element ref="Line"/>
                  <element ref="Curve"/>
                  <element ref="Spiral"/>
              </choice>
            </complexType>
    </element>

How can I indicate if the sequence of element instances within the
choice is significant ('list') or not ('set')?

I have not been able to determine the answer to this question from
reading the spec, except that by omission I think the answer is 'you
cannot do this in XML Schema'! That would be a serious limitation for
data structures.

Any help appreciated.

Robin
-- -----------------------------------------------------------------
Robin La Fontaine, Monsell EDM Ltd
(R&D Project Management, Engineering Data Exchange using XML, EDIF)
Tel: +44 1684 592 144 Fax: +44 1684 594 504 or +44 870 054 2811
Email: robin@monsell.co.uk       http://www.monsell.co.uk
Received on Wednesday, 12 July 2000 11:06:19 GMT

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