Ravindar, Biztalk Developer and Administrator

Just another BizTalk blog

Loop through a set of variables or set of elements

To loop through a set of specific variable values

<xsl:for-each select="$var1 | $var2 | $var3 ">
<xsl:if test=".!=''">   (to test if the varirable value is not null)

<xsl:value-of select="."/>
<xsl:if test="not(position() = last())">,</xsl:if>   (to avoid last comma)



 if you want to loop through a set of node values

<xsl:for-each select="element1Xpath/text() | Element2Xpath/text()| ElementNxpath/text()">
        <xsl:value-of select="."/>
        <xsl:if test="not(position() = last())">,</xsl:if>


June 11, 2017 Posted by | Uncategorized | Leave a comment