Table of contentsAppendices |
4.6 Substitution GroupsSubstitution Groupsref25XML Schema provides a mechanism,
called substitution groups, that allows elements to be
substituted for other elements. More specifically, elements
can be assigned to a special group of elements that are
said to be substitutable for a particular named element
called the head element. (Note that the head element
as well as the substitutable
elementsmust
be declared as a global
elements.) To illustrate, we
declare two elements called NOTE:
When these declarations are added to the international
purchase order schema, NOTE:
Note that when an instance document contains element
substitutions whose types are derived from those of their
head elements, it is not necessary to identify the
derived types using the The existence of a substitution group does not require any of the elements in that class to be used, nor does it preclude use of the head element. It simply provides a mechanism for allowing elements to be used interchangeably. |