Substitutable Elements in XML

Instance example

In the example below, element nc:Date appears as a replacement for element nc:DateRepresentation, an abstract element that cannot appear in an instance.

    <!-- Date is substituted for DateRepresentation -->

Schema example

<xs:element name="Date" type="niem-xs:date" substitutionGroup="nc:DateRepresentation" nillable="true">
    <xs:documentation>A full date.</xs:documentation>
  • The element declares what it may be substituted in place of in the substitutionGroup attribute.
  • In this case, the Date element may replace element nc:DateRepresentation wherever it occurs.

Schema template

<xs:element name="NAME" type="TYPE" substitutionGroup="SUBSTITUTION" nillable="true">