Re: Schema Extension Element

>> Is there a way to more explicitly control the 
>> sequence of an extended complexType? 

Not in version 1 of schemas.  The current restriction was chosen as an 
80/20 tradeoff:  definitely some loss of generality, but moderately easy 
to understand, and receiving applications have a quite well-defined model 
of substitutability (which, by the way, maps quite well to common 
programming language practice.)

------------------------------------------------------------------------
Noah Mendelsohn                                    Voice: 1-617-693-4036
Lotus Development Corp.                            Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------------







"Jeff Rafter" <jeffrafter@definedweb.com>
Sent by: xmlschema-dev-request@w3.org
10/01/00 02:10 PM

 
        To:     <xmlschema-dev@w3.org>
        cc:     (bcc: Noah Mendelsohn/CAM/Lotus)
        Subject:        Schema Extension Element

Is there a way to more explicitly control the sequence of an extended
complexType?  For example:

<complexType name="Foo">
  <complexContent>
    <sequence>
      <element name="bar" type="int">
    </sequence>
  </complexContent>
</complexType>

<complexType name="Foo2">
  <complexContent>
    <extension base="Foo">
      <sequence>
        <element name="bar2" type="int">
      </sequence>
    </extension>
  </complexContent>
</complexType>

=========================================
The result of the extension is:

<complexType name="Foo2">
  <complexContent>
    <sequence>
      <element name="bar" type="int">
      <element name="bar2" type="int">
    </sequence>
  </complexContent>
</complexType>

But is there anyway to control the sequence?  Is it possible to control 
the
order of the resultant sequence-- for example, alaways making the "bar"
element appear at the end of the sequence?

Thanks,
Jeff Rafter
Defined Systems, Inc

Received on Monday, 2 October 2000 14:54:05 UTC