<t:switch>

The <t:switch> element allows conditional processing of <t:case> sub-elements. The evaluation result of the expr-attribute is compared to the evaluation result of the expr-attribute of the case elements. Template processing continues in the first matching {\em<t:case>} element. The evaluation context remains unchanged.

When a matching case is found, no further sub-elements are examined; if no matching case is found, template processing continues in the optional {\em<t:otherwise>} element.

Attributes

expr
(required) : The result of the given OCL expression is compared to the expressions given in <t:case> sub-elements.

Restrictions for Child Elements

Allowed sub-elements are any number of <t:case> elements, followed by up to one <t:else> element.