ABAP Keyword Documentation →  ABAP − Reference →  Data Interfaces and Communication Interfaces →  ABAP and XML →  Transformations for XML →  Simple Transformations →  ST - Serialization and Deserialization →  ST - Literal Template Content →  ST - Literal XML Elements and Attributes → 

ST - tt:extensible, Extensibility of Literal XML Elements

Syntax

... tt:extensible="on"|"deep-static"|"deep-dynamic"|"off"|"deep-off"  ...

Effect

During deserialization, XML elements in the input stream that are not specified in the ST program normally result in 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 values "deep-static" and "deep-dynamic" have different areas of validity:

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

<r tt:extensible="on">
  <tt:cond> <a tt:value-ref="A"/> </tt:cond>
  <b tt:value-ref="B"/>
</r>

with the input stream

<r><x/><a>1</a><b>2</b></r>

would not result in 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 sequence of a and b:

<r tt:extensible="on">
  <tt:group>
    <tt:cond frq="?"> <a tt:value-ref="A"/> </tt:cond>
    <tt:cond>         <b tt:value-ref="B"/> </tt:cond>
  </tt:group>
</r>