Re: XML Schema: element ordering

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 UTC