2.5.1 ForEachEnumeratorType

The ForEachEnumeratorType complex type MUST NOT be used for an executable unless its ExecutableType attribute is equal to "STOCK:FOREACHLOOP". The ForEachEnumeratorType complex type contains information about the entity to be looped over and the logic of the looping.

The following is the XSD for the ForEachEnumeratorType type.

   <xs:complexType name="ForEachEnumeratorType">
     <xs:sequence>
       <xs:element name="Property"
                   maxOccurs="unbounded">
         <xs:complexType>
           <xs:complexContent>
             <xs:extension base="DTS:PropertyElementBaseType">
               <xs:attribute name="Name"
                   type="DTS:BasePropertyNameEnum"
                   use="required"/>
             </xs:extension>
           </xs:complexContent>
         </xs:complexType>
       </xs:element>
       <xs:element name="PropertyExpression"
                   type="DTS:PropertyExpressionElementType"
                   minOccurs="0" maxOccurs="unbounded"/>
       <xs:element name="ObjectData"
                   type="DTS:ForEachEnumeratorObjectDataType"/>
     </xs:sequence>
   </xs:complexType>

The following table provides additional information about the elements, types, and constraints in the ForEachEnumeratorType complex type.

Element

Additional constraints

Type definition

Description

Property

In some cases, constraints are placed on the Property element’s value for specific values of the Name attribute of the Property element. If such constraints exist, they are specified where the meaning of the particular property name is specified. These constraints MUST be followed. If the optional DataType attribute is present, the value of the Property element MUST be of the type that is specified by the DataType attribute.

Inline in the XSD in this section.

Contains values for many different properties that are associated with an instance of the containing Executable element, according to the Name attribute of each Property element.

PropertyExpression

Additional constraints exist for the PropertyExpression element. These constraints MUST be followed. For a description of these constraints, see PropertyExpressionElementType.

PropertyExpressionElementType

Serves the same purpose as described for the Property element, except that an expression that is evaluated at runtime is contained in the element’s value that is stored in the Microsoft SQL Server Integration Services (SSIS) file format

ObjectData

None.

ForEachEnumeratorObjectDataType

Contains information that is specific to the ForEachEnumerator. For more information, see Executable ObjectData Types.

The following table provides additional information about the attributes and types for the Property element that is declared inline in the complex type declaration. The Property element is an extension of the PropertyElementBaseType type with the addition of the Name attribute, which is specified in the following table.

Attribute

Description

Name

Specifies the name of the Property element. Each named property has its own use and interpretation. The explanation for the interpretation of each named property is given with the definition of the type for the Name attribute.

The ForEachEnumerator has no additional values that are allowed for the Name attribute of the Property element beyond those of the BasePropertyNameEnum type. Therefore, no further Name attribute enumeration items are described in any subsection to this section.