<if>
(If)
Like an if statement in a programming language, wraps elements which are to be used under the conditions defined by its attributes.
<choose name="Name1"> <if name="Name2" func="var" arg="dir" op="equ" val="norm"> <alg type="snake"> <param type="grDir" val="tL"/> <param type="flowDir" val="row"/> <param type="contDir" val="sameDir"/> <param type="off" val="ctr"/> </alg> </if> <else name="Name3"> <alg type="snake"> <param type="grDir" val="tR"/> <param type="flowDir" val="row"/> <param type="contDir" val="sameDir"/> <param type="off" val="ctr"/> </alg> </else> </choose>
In this example, a <if>
element is used to define a set of parameters associated with the snake algorithm when the diagram is in the normal direction]
Parent Elements |
---|
|
Child Elements |
Subclause |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Attributes |
Description |
---|---|
|
Specifies the variable to use as part of the test in an if element. Ignored unless the function attribute is set to "var". The possible values for this attribute are defined by the ST_FunctionArgument simple type (§5.9.7.29). |
|
Specifies the axis on which to select data from the data model. The possible values for this attribute are defined by the ST_AxisTypes simple type (§5.9.7.7). |
|
Specifies the count of items to use in a data set. <forEach name="Name5" ref="" axis="ch" ptType="node" cnt="2"> ... </forEach> In this example, up to two children will be obtained through this The possible values for this attribute are defined by the ST_UnsignedInts simple type (§5.9.7.63). |
|
The function used to evaluate the if condition. <if name="Name2" func="var" arg="dir" op="equ" val="norm"> ... </if> In this example, The possible values for this attribute are defined by the ST_FunctionType simple type (§5.9.7.31). |
|
In algorithms that support transitions, this attribute specifies that the last transition will not be rendered. This allows for diagrams that start and end with a node. The possible values for this attribute are defined by the ST_Booleans simple type (§5.9.7.9). |
|
A unique identifier for the layout node. The function used to evaluate the if condition. <if name="Name2" func="var" arg="dir" op="equ" val="norm"> ... </if> In this example, the The possible values for this attribute are defined by the XML Schema string datatype. |
|
The operator used to evaluate the condition. <if name="Name2" func="var" arg="dir" op="equ" val="norm"> ... </if> In this example, The possible values for this attribute are defined by the ST_FunctionOperator simple type (§5.9.7.30). |
|
Specifies the type of data point to select. <forEach name="Name5" ref="" axis="ch" ptType="node" cnt="2"> ... </forEach> In this example, the The possible values for this attribute are defined by the ST_ElementTypes simple type (§5.9.7.26). |
|
Specifies where to start in a data set. <presOf axis="desOrSelf" ptType="node" st="2"/> In this example, the second element in the set will be the first point returned. ] The possible values for this attribute are defined by the ST_Ints simple type (§5.9.7.39). |
|
Specifies the step to use in a data set. A The possible values for this attribute are defined by the ST_Ints simple type (§5.9.7.39). |
|
An absolute value. The possible values for this attribute are defined by the ST_FunctionValue simple type (§5.9.7.32). |
The following XML Schema fragment defines the contents of this element:
<complexType name="CT_When">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="alg" type="CT_Algorithm" minOccurs="0" maxOccurs="1"/>
<element name="shape" type="CT_Shape" minOccurs="0" maxOccurs="1"/>
<element name="presOf" type="CT_PresentationOf" minOccurs="0" maxOccurs="1"/>
<element name="constrLst" type="CT_Constraints" minOccurs="0" maxOccurs="1"/>
<element name="ruleLst" type="CT_Rules" minOccurs="0" maxOccurs="1"/>
<element name="forEach" type="CT_ForEach"/>
<element name="layoutNode" type="CT_LayoutNode"/>
<element name="choose" type="CT_Choose"/>
<element name="extLst" type="a:CT_OfficeArtExtensionList" minOccurs="0" maxOccurs="1"/>
</choice>
<attribute name="name" type="xsd:string" use="optional" default=""/>
<attributeGroup ref="AG_IteratorAttributes"/>
<attribute name="func" type="ST_FunctionType" use="required"/>
<attribute name="arg" type="ST_FunctionArgument" use="optional" default="none"/>
<attribute name="op" type="ST_FunctionOperator" use="required"/>
<attribute name="val" type="ST_FunctionValue" use="required"/>
</complexType>