Hi @sushil ,
By using XSLT 1.0 or 2.0
Input XML
<?xml version="1.0"?>
<ns0:ExternalEmployees xmlns:ns0="http://BizTalk_Server_Project2.Schema1">
<packages>
<package>
<AddOns>
<AddOn-Bundled Category="Legal" SubType="Independent" Type="Core"/>
<AddOn-Bundled Category="Home" SubType="Independent" Type="Core"/>
<AddOn-Bundled Category="Home" SubType="Independent" Type="Core"/>
</AddOns>
</package>
<package>
<AddOns>
<AddOn-Bundled Category="Legal" SubType="Independent" Type="Core"/>
<AddOn-Bundled Category="Home" SubType="Independent" Type="Core"/>
<AddOn-Bundled Category="Home" SubType="Independent" Type="Core"/>
</AddOns>
</package>
</packages>
</ns0:ExternalEmployees>
XSLT 2.0
<?xml version="1.0"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="AddOns">
<xsl:copy>
<xsl:for-each-group select="AddOn-Bundled" group-by="concat(@Category, '|', @SubType, '|', @Type)">
<xsl:sequence select="."/>
</xsl:for-each-group>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
XSLT 1.0
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="AddOns">
<xsl:copy>
<xsl:for-each select="AddOn-Bundled[not(@Category=preceding-sibling::AddOn-Bundled/@Category)]">
<xsl:sort select="@Category" order="descending" />
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>