Question about different content-model for element w/ same name

Hello,

The schema-specification includes the following example:

<xs:element name="contextOne">
 <xs:complexType>
  <xs:sequence>
   <xs:element name="myLocalElement" type="myFirstType"/>
   <xs:element ref="globalElement"/>
  </xs:sequence>
 </xs:complexType>
</xs:element>

<xs:element name="contextTwo">
 <xs:complexType>
  <xs:sequence>
   <xs:element name="myLocalElement" type="mySecondType"/>
   <xs:element ref="globalElement"/>
  </xs:sequence>
 </xs:complexType>
</xs:element>

This example demonstrates the possibility to use different content-models
for two elements with the same name, depending on their context.

My question is: is it also allowed for elements with the same name to use
different content-models, _without_ the possibility to make a distinction
based on their context, as in:

<xs:element name="...">
 <xs:complexType>
  <xs:choice>
   <xs:element name="myName" type="myFirstType"/>
   <xs:element name="myName" type="mySecondType"/>
  </xs:choice>
 </xs:complexType>
</xs:element> 

Many thanks,
--
Jeroen Koops
Empanda Software Development
jeroen@empanda.net
+31-6-24686577

Received on Monday, 22 July 2002 17:15:26 UTC