BizTalk Mapping Transformation - Remove duplicate from repating record

sushil 41 Reputation points
2021-09-14T18:39:11.23+00:00

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>

Microsoft BizTalk Server
Microsoft BizTalk Server
A family of Microsoft server products that support large-scale implementation management of enterprise application integration processes.
349 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Girish Patil 1 Reputation point
    2021-09-19T15:18:26.58+00:00
    0 comments No comments