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.Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 35. Element Substitution
Abstract
35.1. Substitution Groups in XML Schema Link kopierenLink in die Zwischenablage kopiert!
Overview Link kopierenLink in die Zwischenablage kopiert!
Syntax Link kopierenLink in die Zwischenablage kopiert!
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 35.1, “Using a Substitution Group”.
Example 35.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 Link kopierenLink in die Zwischenablage kopiert!
Example 35.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 35.3, “XML Document using a Substitution Group” are valid.
Example 35.3. XML Document using a Substitution Group
Abstract head elements Link kopierenLink in die Zwischenablage kopiert!
abstract
attribute of an element
element to true
, as shown in Example 35.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 35.4. Abstract Head Definition