org.infolayer.templates.elements
Class TE_switch
java.lang.Object
org.kxml2.kdom.Element
org.infolayer.templates.TemplateElement
org.infolayer.templates.elements.TE_switch
- public class TE_switch
- extends TemplateElement
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.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TE_switch
public TE_switch()
init
public void init()
- Overrides:
init
in class TemplateElement
apply
public void apply(XmlSerializer xw,
IlRequest context,
Bindings bindings)
throws java.io.IOException
- Description copied from class:
TemplateElement
- Applies the template mechanism. Must be overwritten in the
- Overrides:
apply
in class TemplateElement
- Throws:
java.io.IOException