Hi @Mahesh Madhusanka,
Please try the following XSLT 1.0.
It is using grouping to produce a single entry for each Shops tag.
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:key name="ShopsKey" match="rootnodecall/Shops"
use="OrderDetails/Packagelineitem/PartNumbers"/>
<xsl:template match="/rootnodecall">
<Shipment>
<PackingLineCollection Content="Complete">
<xsl:for-each select="Shops[generate-id(.) = generate-id(key('ShopsKey', OrderDetails/Packagelineitem/PartNumbers)[1])]">
<xsl:sort select="ShopsSequence"
order="ascending"/>
<PackingLine>
<Link>
<xsl:value-of select="position()"/>
</Link>
<Length>
<xsl:value-of select="OrderDetails/Packagelineitem/Length"/>
</Length>
<Width>
<xsl:value-of select="OrderDetails/Packagelineitem/Width"/>
</Width>
</PackingLine>
</xsl:for-each>
</PackingLineCollection>
</Shipment>
</xsl:template>
</xsl:stylesheet>