<forEach>
(For Each)
A looping structure, similar to a for
loop in a programming language, which defines what data model points will use this layout node.
<forEach name="Name5" ref="" axis="ch" ptType="node"> <layoutNode name="node1" styleLbl="" moveWith=""> <alg type="sp"/> <shape xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" r:blip=""> <adjLst/> </shape> <constrLst/> </layoutNode> </forEach>
In this example, the <forEach>
element will create a layout node, referenced by the name node1
, for every associated data model point in the diagram. In this particular instance the <forEach>
will create the layout node for every child of the current point node. ]
Parent Elements |
---|
|
Child Elements |
Subclause |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Attributes |
Description |
---|---|
|
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). |
|
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 possible values for this attribute are defined by the XML Schema string datatype. |
|
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). |
|
When used on a for-each element, causes the specified for-each element to be used instead. The possible values for this attribute are defined by the XML Schema string datatype. |
|
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). |
The following XML Schema fragment defines the contents of this element:
<complexType name="CT_ForEach">
<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=""/>
<attribute name="ref" type="xsd:string" use="optional" default=""/>
<attributeGroup ref="AG_IteratorAttributes"/>
</complexType>