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

Re: Unordered content model in XSDL

From: <Noah_Mendelsohn@lotus.com>
Date: Fri, 12 Jan 2001 12:02:40 -0500
To: Ian Stokes-Rees <ian@decisionsoft.com>
Cc: xmlschema-dev@w3.org
Message-ID: <OFB45F3F51.911E133B-ON852569D2.005DE3B1@lotus.com>
Ian Stokes-Rees writes:

>> 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>

The pertinent content model fragment is (using local elements):

        <choice minOccurs="0" maxOccurs="unbounded">
                <element name="A" type="...."/>
                <element name="B" type="...."/>
                <element name="C" type="...."/>
        </choice>

or with globals:

        <choice minOccurs="0" maxOccurs="unbounded">
                <element ref="A" />
                <element ref="B" />
                <element ref="C" />
        </choice>

Note that the above is directly (and intentionally) analagous to the 
common DTD construction:

        (A | B | C)*

Hope this helps.

------------------------------------------------------------------------
Noah Mendelsohn                                    Voice: 1-617-693-4036
Lotus Development Corp.                            Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------------
Received on Friday, 12 January 2001 12:12:55 GMT

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