SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Data Interfaces and Communication Interfaces → ABAP and XML → Transformations for XML → Simple Transformations → ST - Serialization and Deserialization → ST - Flow Control → ST - tt:cond, Conditional Transformations →ST - Pattern
When conditional transformations are deserialized, the fact that the template content is also a pattern is used as a criterion for the assessment. A pattern contains one or more constructs that are used as markers. The most common form of a marker is a literal XML element: If the content of the condition consists of exactly one XML element, then the condition has a positive result if an XML with this name follows in the current position in the XML input stream.
Marker constructs are:
Each of these constructs can be compared with the input stream in an obvious way.
A pattern can usually contain multiple markers. For example, the sequence
is also a pattern; it contains the markers <X> and <Y>. A condition with this pattern is determined positively by element X as well as by element Y in the input stream (in the second case, condition is determined negatively with X).
The number of marker constructs M(c) contained in template content c is defined recursively below. Template content c is a pattern if M(c) is not empty. In summary, M(c) consists of the markers that can be used to positively determine pattern c, where conditions in an initial part of c can also be determined negatively.
Some constructs propagate markers externally:
Transformations with conditions also propagate markers. If differences in cases exist or groupings, then the union of all cases is determined:
For all other instructions c, M(c) is empty.
For c1 c2 ... sequences in template content, the following applies:
Template content is a pre-pattern if its deserialization is possible without the use of content from the input stream. In detail:
tt:deserialize, tt:ref, and tt:apply propagate the pre-pattern property.
Example
The content of the following element tt:cond is a pattern with marker elements {f1, f2, f3} (but not fx).