[xsl] How to remove duplicate record from XML

Subject: [xsl] How to remove duplicate record from XML
From: "Rahul Singh rahulsinghindia15@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 28 Sep 2016 13:03:24 -0000
How to remove duplicate record from XML, my code is working fine, i am
deleting duplicate, but i need only that XML which is not duplicate.

*Input:*

<?xml version="1.0" encoding="UTF-8"?>
<Contact-data>
   <Contact>
      <id>074</id>
   </Contact>
   <Contact>
      <id>074</id>
   </Contact>
*   <Contact>*
*      <id>001</id>*
*   </Contact>*
</Contact-data>

*XSL:*

<xsl:stylesheet version="2.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform";>
    <xsl:output omit-xml-declaration="yes" indent="yes"/>
    <xsl:template match="/*">
        <xsl:for-each-group select="Contact" group-by="id">
            <xsl:sequence select="."/>
        </xsl:for-each-group>
    </xsl:template>
</xsl:stylesheet>

*ExpectedOutput:*

<Contact-data>
   <Contact>
      <id>001</id>
   </Contact>
</Contact-data>

Current Thread