This question is already answered at:
https://learn.microsoft.com/en-us/answers/questions/553501/biztalk-mapping-transformation-xslt-remove-duplica.html
BizTalk Mapping Transformation - Remove duplicate from repating record
I am working on mapping change in one of the existing BizTalk interfaces. For transfomation XSLT is been used.
XSLT Logic
<xsl:for-each select="s0:AddOns/s0:AddOn-Bundled">
<ns0:AddOn>
<xsl:attribute name="xsi:type">
<xsl:value-of select="'ns1:Bundled'" />
</xsl:attribute>
<xsl:attribute name="Category">
<xsl:value-of select="@Category" />
</xsl:attribute>
<xsl:attribute name="SubType">
<xsl:value-of select="@SubType" />
</xsl:attribute>
</ns0:AddOn>
</xsl:for-each>
This existing logic is unable to remove the duplicate category type (Legal in this example).
Can you please suggest how this will acheived- removing duplicates.
Sample Output
<ns0:AddOns>
<ns0:AddOn xsi:type="ns1:Bundled" Category="ReplacementLocks" SubType="Independent"/>
<ns0:AddOn xsi:type="ns1:Bundled" Category="Bicycle" SubType="Independent"/>
<ns0:AddOn xsi:type="ns1:Bundled" Category="Legal" SubType="Independent"/>
<ns0:AddOn xsi:type="ns1:Bundled" Category="Legal" SubType="Independent"/>
<ns0:AddOns>
1 answer
Sort by: Most helpful
-
Girish Patil 1 Reputation point
2021-09-19T15:18:26.58+00:00