Automatically Create for-each Statements

You can automatically create for-each statements when mapping between repeatable source and target elements in the mapper.

To automatically create for-each statements:
  1. In the Source section, identify the repeatable source and target elements to which to map. Repeatable elements are identified by the repeatable element icon icon to the left of the name. When you right-click these elements and select Node Info, Repeating: true is displayed in the message details about the element.
  2. In the Source section, map the child repeatable element to the child target repeatable element. You cannot map repeatable elements to nonrepeatable elements.


    The mapper creates a for-each statement to loop through the source Relationship element and place the mapping into the target Organization element. This statement does not include a value to select because parent elements do not typically contain attributes to map.

  3. Click Code to view the for-each statement.
    <xsl:for-each select="/nssrcmpr:createOrganizationAsync/nssrcmpr:organizationParty/nsmpr5:Relationship">
                  <nstrgmpr:Organization xml:id="id_27">
                        <rnb_v1_2:ID xml:id="id_28" id="{/nssrcmpr:createOrganizationAsync/nssrcmpr:organizationParty/nsmpr5:PartyId}"/>
                        <rnb_v1_2:LookupName xml:id="id_30">
                              <xsl:value-of xml:id="id_31" select="/nssrcmpr:createOrganizationAsync/nssrcmpr:organizationParty/nsmpr5:PartyName"/>
                        </rnb_v1_2:LookupName>
                        <rnb_v1_2:CreatedTime xml:id="id_34">
                               <xsl:value-of xml:id="id_35" select="/nssrcmpr:createOrganizationAsync/nssrcmpr:organizationParty/nsmpr5:CreationDate"/>
                        </rnb_v1_2:CreatedTime>
                        <rnb_v1_2:UpdatedTime xml:id="id_32">
                               <xsl:value-of xml:id="id_36" select="/nssrcmpr:createOrganizationAsync/nssrcmpr:organizationParty/nsmpr5:LastUpdateDate"/>
                        </rnb_v1_2:UpdatedTime>
                        <rno_v1_2:Addresses xml:id="id_37">
                               <rno_v1_2:TypedAddressList xml:id="id_38">
                                     <rno_v1_2:Country xml:id="id_41">
                                           <rnb_v1_2:ID xml:id="id_42" id="{/nssrcmpr:createOrganizationAsync/nssrcmpr:organizationParty/nsmpr5:Country}"/>
                                      </rno_v1_2:Country>
                                      <rno_v1_2:Street xml:id="id_39">
                                            <xsl:value-of xml:id="id_40" select="/nssrcmpr:createOrganizationAsync/nssrcmpr:organizationParty/nsmpr5:Address1"/>
                                      </rno_v1_2:Street>
                               </rno_v1_2:TypedAddressList>
                         </rno_v1_2:Addresses>
                         <rno_v1_2:NameFurigana>
                           <xsl:value-of select="/nssrcmpr:createOrganizationAsync/nssrcmpr:organizationParty/nsmpr5:HQBranchIndicator"/>
                </rno_v1_2:NameFurigana>
          </nstrgmpr:Organization>
    </xsl:for-each>