Re: [xsl] removing duplicate tags (xslt2.0)

Subject: Re: [xsl] removing duplicate tags (xslt2.0)
From: "Imsieke, Gerrit, le-tex" <gerrit.imsieke@xxxxxxxxx>
Date: Fri, 14 Jan 2011 09:13:35 +0100
On 14.01.2011 08:51, Robby Pelssers wrote:
Currently I'm using nested grouping but i was wondering if this is the best way.

You could build a joint grouping key out of the attribute values:


<xsl:template match="RefMaterial">
<RefMaterial>
<xsl:apply-templates select="@*"/>
<xsl:for-each-group select="Application" group-by="string-join((@Subst_ID, @ApplCode), '__')">
<xsl:copy-of select="." /><!-- first group item -->
</xsl:for-each-group>
</RefMaterial>
</xsl:template>


Current Thread