Thursday, January 23, 2020

XSLT - ForEach Indexing

Sometimes we come across scenarios where we need to map uneven repeating nodes in Source and Target. In such a case we need to use the indexing carefully.

Tips and Tricks 1: Mapping uneven repeating nodes between Source and Target


Use <xsl:variable name="FirstLevel1Index" select="position()"/> for holding the position of each loop.

<xsl:for-each select="/Xpath1 ">
   <xsl:variable name="Counter1" select="position()"/>
   <xsl:for-each select="/Xpath1[$Counter1]/Xpath2 ">
        <xsl:variable name="Counter2" select="position()"/>
                 <!--  Mapping -->
   </xsl:for-each>

</xsl:for-each>

No comments:

FBDI Introduction

FBDI  stands for File Based Data Import. It is a pattern provided by Oracle to have the data loaded into Oracle ERP Cloud. Its usually u...