Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 37. Element Substitution
Abstract
37.1. Substitution Groups in XML Schema Copier lienLien copié sur presse-papiers!
Overview Copier lienLien copié sur presse-papiers!
Syntax Copier lienLien copié sur presse-papiers!
substitutionGroup
attribute of the XML Schema element
element. The value of the substitutionGroup
attribute is the name of the element that the element being defined replaces. For example, if your head element is widget
, adding the attribute substitutionGroup="widget" to an element named woodWidget
specifies that anywhere a widget
element is used, you can substitute a woodWidget
element. This is shown in Example 37.1, “Using a Substitution Group”.
Example 37.1. Using a Substitution Group
<element name="widget" type="xsd:string" /> <element name="woodWidget" type="xsd:string" substitutionGroup="widget" />
<element name="widget" type="xsd:string" />
<element name="woodWidget" type="xsd:string"
substitutionGroup="widget" />
Type restrictions Copier lienLien copié sur presse-papiers!
Example 37.2. Substitution Group with Complex Types
widget
, is defined as being of type widgetType. Each element of the substitution group extends widgetType to include data that is specific to ordering that type of widget.
part
elements in Example 37.3, “XML Document using a Substitution Group” are valid.
Example 37.3. XML Document using a Substitution Group
Abstract head elements Copier lienLien copié sur presse-papiers!
abstract
attribute of an element
element to true
, as shown in Example 37.4, “Abstract Head Definition”. Using this schema, a valid review
element can contain either a positiveComment
element or a negativeComment
element, but cannot contain a comment
element.
Example 37.4. Abstract Head Definition