ABAP Keyword Documentation → ABAP − Reference → Data Interfaces and Communication Interfaces → ABAP and XML → Transformations for XML → ST - Simple Transformations → ST - Serialization and Deserialization → ST - Literal Template Content → ST - Literal XML Elements and Attributes
ST - tt:extensible, Extensibility of Literal XML Elements
Other versions: 7.31 | 7.40 | 7.54
Syntax
... tt:extensible="on"|"deep-static"|"deep-dynamic"|"off"|"deep-off" ...
Effect
In deserializations, XML elements in the input stream that are not specified in the ST program normally produce an error. If the processed XML format is to be extensible, elements that are not specified explicitly can be skipped without further processing through specification of the optional attribute tt:extensible. The attribute can accept the following values:
- The value ″on" states that the current element may have direct subelements that are not explicitly specified. This is the standard setting.
- Values ″deep-static" and ″deep-dynamic" state that the current element and its subelements can be extended. The value "off" deactivates extensibility for the current element but not its subelements. In other words, direct subelements cannot be added to the element but (specified) subelements can be.
- The value "deep-off" deactivates extensibility for the current element and its subelements. These settings can be overwritten locally in individual subelements.
The values "deep-static" and "deep-dynamic" have different areas of validity:
- "deep-static" only has an effect within the part of the program in which it is set.
The deep extensibility that is configured using ″deep-static" and ″deep-dynamic" also takes effect in case distinctions with tt:switch and groupings with tt:group by skipping unexpected elements that are not covered by a case.
Example
This example shows that extensibility together with optional elements (such as elements that are only deserialized when a condition occurs) causes problems, since extensibility generally means that such optional elements are not found. For example, the following section of program
<tt:cond> <a tt:value-ref="A"/> </tt:cond>
<b tt:value-ref="B"/>
</r>
with the input stream
would not produce the deserialization A=1 since the unexpected element x determines the condition negatively using a. Both x and a are skipped as "extension elements" are only mandatory element b is deserialized as B=2. The problem can be solved by using tt:group, although this also resolves the order of a and b:
<tt:group>
<tt:cond frq="?"> <a tt:value-ref="A"/> </tt:cond>
<tt:cond> <b tt:value-ref="B"/> </tt:cond>
</tt:group>
</r>
This translation does not reflect the current version of the documentation.