RE: Substitution groups & local elements

Please see Section 2.2.2.2 in the Schema Structures document -- excerpt
below.  Substitution groups are allowed only on top-level elements:

2.2.2.2 Element Substitution Group

[Definition:]  ...  Any top-level element declaration can serve as the
defining element, or head, for an element substitution group. Other
top-level element declarations, regardless of target namespace, can be
designated as members of the substitution group headed by this element.
In a suitably enabled content model, a reference to the head *validates*
not just the head itself, but elements corresponding to any member of
the substitution group as well. 


All the best, Ashok 
===========================================================
Ashok Malhotra              <mailto: ashokma@microsoft.com> 
Microsoft Corporation
212 Hessian Hills Road
Croton-On-Hudson, NY 10520 USA 
Redmond: 425-703-9462                New York: 914-271-6477 



-----Original Message-----
From: Claude Seyrat [mailto:claude.seyrat@expway.tv] 
Sent: Wednesday, November 14, 2001 7:22 AM
To: xmlschema-dev@w3.org
Subject: Substitution groups & local elements


Dear All,

I have the following question related to Substitution 
groups & locally defined elements.

Are the elements "memberOfTheSG" & "otherMemberOfTheSG" 
well defined ?

<element name="SGHead" type="integer"/>

<simpleType name="smallInt">
 <minExclusive value="0"/>
 <maxExclusive value="10"/>
</simpleType>


<element name="anElt">
 <complexType>
  <complexContent>
   <element name="memberOfTheSG" type="smallint" 
	substitutionGroup="SGHead"/>
  </complexContent>
 </complexType>
</element>			

<element name="anOtherElt">
 <complexType>
  <complexContent>
   <element name="otherMemberOfTheSG" type="verysmallint" 
	substitutionGroup="SGHead"/>
  </complexContent>
 </complexType>
</element>	

If it's the case, are "otherMemberOfTheSG" and "memberOfTheSG"
substitutable ?

<anElt>
  <otherMemberOfTheSG>8</otherMemberOfTheSG>
</anElt>

Where can I find the rules in the spec ?

Thank you for your help.

Best regards,
Claude.		



-- 
______________________________________________

Claude Seyrat

Expway c/o Acland
18 avenue Georges V
75008 Paris
tel: 33 1 56 62 11 06 **new**
fax: 33 1 56 62 11 11
mail: claude.seyrat@expway.tv

Received on Wednesday, 14 November 2001 11:50:10 UTC