Freigeben über


ForEach-Klasse

For Each.When the object is serialized out as xml, its qualified name is dgm:forEach.

Vererbungshierarchie

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Drawing.Diagrams.ForEach

Namespace:  DocumentFormat.OpenXml.Drawing.Diagrams
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(Constraints))> _
<ChildElementInfoAttribute(GetType(LayoutNode))> _
<ChildElementInfoAttribute(GetType(Choose))> _
<ChildElementInfoAttribute(GetType(ExtensionList))> _
<ChildElementInfoAttribute(GetType(Shape))> _
<ChildElementInfoAttribute(GetType(PresentationOf))> _
<ChildElementInfoAttribute(GetType(Algorithm))> _
<ChildElementInfoAttribute(GetType(RuleList))> _
<ChildElementInfoAttribute(GetType(ForEach))> _
Public Class ForEach _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As ForEach
[ChildElementInfoAttribute(typeof(Constraints))]
[ChildElementInfoAttribute(typeof(LayoutNode))]
[ChildElementInfoAttribute(typeof(Choose))]
[ChildElementInfoAttribute(typeof(ExtensionList))]
[ChildElementInfoAttribute(typeof(Shape))]
[ChildElementInfoAttribute(typeof(PresentationOf))]
[ChildElementInfoAttribute(typeof(Algorithm))]
[ChildElementInfoAttribute(typeof(RuleList))]
[ChildElementInfoAttribute(typeof(ForEach))]
public class ForEach : OpenXmlCompositeElement

Hinweise

The following table lists the possible child types:

  • Algorithm <dgm:alg>

  • Shape <dgm:shape>

  • PresentationOf <dgm:presOf>

  • Constraints <dgm:constrLst>

  • RuleList <dgm:ruleLst>

  • ForEach <dgm:forEach>

  • LayoutNode <dgm:layoutNode>

  • Choose <dgm:choose>

  • ExtensionList <dgm:extLst>

[ISO/IEC 29500-1 1. Ausgabe]

21.4.2.14 forEach (For Each)

A looping structure, similar to a for loop in a programming language, which defines what data model points use this layout node.

[Example: Consider the following example of a forEach being used within a DrawingML diagram:

<forEach name="Name5" ref="" axis="ch" ptType="node">
<layoutNode name="node1" styleLbl="" moveWith="">
<alg type="sp"/>
<shape xmlns:r="https://schemas.openxmlformats.org/officeDocument/2006/relationships" r:blip="">
<adjLst/>
</shape>
<constrLst/>
</layoutNode>
</forEach>

In this example, the forEach element creates a layout node, referenced by the name node1, for every associated data model point in the diagram. In this particular instance the forEach creates the layout node for every child of the current point node. end example]

Parent Elements

else (§21.4.2.12); forEach (§21.4.2.14); if (§21.4.2.15); layoutNode (§21.4.2.19)

Child Elements

Subclause

alg (Algorithm)

§21.4.2.3

choose (Choose Element)

§21.4.2.6

constrLst (Constraint List)

§21.4.2.9

extLst (Extension List)

§21.4.2.13

forEach (For Each)

§21.4.2.14

layoutNode (Layout Node)

§21.4.2.19

presOf (Presentation Of)

§21.4.2.21

ruleLst (Rule List)

§21.4.2.25

shape (Shape)

§21.4.2.27

Attributes

Description

axis (Axis)

Specifies the axis on which to select data from the data model.

[Example: axis="ch" selects children of the current point node and axis="des" selects all descendants. end example]

The possible values for this attribute are defined by the ST_AxisTypes simple type (§21.4.7.7).

cnt (Count)

Specifies the count of items to use in a data set.

[Example: Consider the following example of a forEach in a DrawingML diagram:

<forEach name="Name5" ref="" axis="ch" ptType="node" cnt="2">
…
</forEach>

In this example, up to two children are obtained through this forEach. end example]

The possible values for this attribute are defined by the ST_UnsignedInts simple type (§21.4.7.63).

hideLastTrans (Hide Last Transition)

In algorithms that support transitions, this attribute specifies that the last transition is not 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 (§21.4.7.9).

name (Name)

A unique identifier for the layout node.

The possible values for this attribute are defined by the W3C XML Schema string datatype.

ptType (Data Point Type)

Specifies the type of data point to select.

[Example: Consider the following example of a forEach in a DrawingML diagram:

<forEach name="Name5" ref="" axis="ch" ptType="node" cnt="2">
…
</forEach>

In this example, the forEach selects all node type points in the set. end example]

The possible values for this attribute are defined by the ST_ElementTypes simple type (§21.4.7.28).

ref (Reference)

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 W3C XML Schema string datatype.

st (Start)

Specifies where to start in a data set.

[Example: Consider the following example of a forEach in a DrawingML diagram:

<presOf axis="desOrSelf" ptType="node" st="2"/>

In this example, the second element in the set is the first point returned. end example]

The possible values for this attribute are defined by the ST_Ints simple type (§21.4.7.40).

step (Step)

Specifies the step to use in a data set. A step with a value of 2 returns every other item in the set.

The possible values for this attribute are defined by the ST_Ints simple type (§21.4.7.40).

[Note: The W3C XML Schema definition of this element's content model (CT_ForEach) is located in §A.5.3. end note]

© ISO/IEC29500: 2008. Die oben aufgeführten Textauszüge wurden von Microsoft (und/oder den Microsoft-Vendoren) von Englisch nach Deutsch übersetzt, und im Rahmen von ISO wird keinerlei Verantwortung für diese Übersetzungen übernommen.

Threadsicherheit

Alle öffentlichen static (Shared in Visual Basic) Member dieses Typs sind threadsicher. Bei Instanzmembern ist die Threadsicherheit nicht gewährleistet.

Siehe auch

Referenz

ForEach-Member

DocumentFormat.OpenXml.Drawing.Diagrams-Namespace