W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2001

Unordered content model in XSDL

From: Ian Stokes-Rees <ian@decisionsoft.com>
Date: Fri, 12 Jan 2001 16:34:26 +0000
Message-ID: <3A5F3212.8E6A278E@decisionsoft.com>
To: xmlschema-dev@w3.org
I cannot seem to work out how you would create a schema that allowed any
number of elements A, B, C, or D inside an element sample.  e.g.:

<sample>
  <C/>
  <A/>
  <A/>
  <C/>
  <C/>
  <B/>
</sample>

Something to the effect of:

<element name="sample">
  <complexType>
    <group contentModel="unordered">
      <element name="A" minOccurs="0" maxOccurs="unbounded"/>
      <element name="B" minOccurs="0" maxOccurs="unbounded"/>
      <element name="C" minOccurs="0" maxOccurs="unbounded"/>
      <element name="D" minOccurs="0" maxOccurs="unbounded"/>
    </group>
  </complexType>
</element>

You could easily see where this would be relevant when the XML is being
generated by some sequential process generating XML elements with time
ordering when certain events occur.

Ian.
-- 
ian.stokes-rees@decisionsoft.com          tel: +1865 203 192
DecisionSoft Ltd.                         fax: +1865 203 194
www.decisionsoft.com                      Oxford, UK, OX2 OEA
Received on Friday, 12 January 2001 11:34:26 GMT

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