Hi Mhkay/Martin,
please verify the following XSLT for removing duplicate
Code:
<?xml version="1.0" encoding="UTF-8"?>
<Contact_CSV>
<header>
<last_name/>
<first_name/>
<contactid/>
<primaryaccountid/>
<primaryaddressid/>
<AddressIds/>
<AccountIds/>
</header>
<Contact>
<last_name>My Last Name</last_name>
<first_name>My First Name</first_name>
<contactid>AAGA-3G9GQE</contactid>
<primaryaccountid>AAGA-3G94WA</primaryaccountid>
<primaryaddressid>AAGA-3FY71P</primaryaddressid>
<AddressIds>AAGA-3FY71P</AddressIds>
<AccountIds>AAGA-3G94WA</AccountIds>
</Contact>
<Contact>
<last_name>My Last Name</last_name>
<first_name>My First Name</first_name>
<contactid>AAGA-3G9GQE</contactid>
<primaryaccountid>AAGA-3G94WA</primaryaccountid>
<primaryaddressid>AAGA-3FY71P</primaryaddressid>
<AddressIds>AAGA-3FY71P</AddressIds>
<AccountIds>AAGA-3G94WA</AccountIds>
</Contact>
</Contact_CSV>
what am i missing
Code:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output indent="yes"/>
<xsl:template match="Contact_CSV">
<xsl:copy>
<xsl:copy-of select="header"/>
<xsl:for-each-group select="Contact" group-by="contactid">
<xsl:copy>
<xsl:copy-of select="current-group()"/>
</xsl:copy>
</xsl:for-each-group>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
this is not removing duplicate