Returns a top-level ISchemaElement object. This object is the <element> declaration that the substitutionGroup attribute of the current object refers to. The substitution group provides an option for the declaration of an element. For example, if you have the following two elements, <A name='eleA' /> and <B name='eleB' substitutionGroup ="eleA"/>, you could use the <B> element anywhere in the instance document where the <A> element was expected. This might work well in a <sequence> declaration.
The following example shows an XML Schema document and the instance documents that would be valid for its declaration.
<xsd:schema xmlns:xsd= 'http://www.w3.org/2001/XMLSchema'>
<xsd:element name='eleA' type='xsd:string' />
<xsd:element name='eleB' substitutionGroup='eleA' />
<xsd:element name='eleSeq'>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref='eleA' />
<xsd:element ref='eleB' />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
This instance document would validate:
<eleSeq> <eleA>a string</eleA> <eleB>another string</eleB> </eleSeq>
This instance documents would also validate:
<eleSeq> <eleB>a string</eleB> <eleB>another string</eleB> </eleSeq>
var oSubstitutionGroup = oISchemaAttribute.substitutionGroup;
None.
ISchemaElement object.Set oSubstitutionGroup = oISchemaAttribute.substitutionGroup
None.
ISchemaElement object.HRESULT get_substitutionGroup(ISchemaElement** substitutionGroup);
ISchemaElement object.substitutionGroup parameter is NULL.To view reference information for Visual Basic or C/C++ only, click the Language Filter button
in the upper-left corner of the page.
Applies to: ISchemaElement Interface