Re: [xsl] xsl:for-each-group and identity transform

Subject: Re: [xsl] xsl:for-each-group and identity transform
From: Jesper Tverskov <jesper.tverskov@xxxxxxxxx>
Date: Fri, 23 Jan 2009 15:07:45 +0100
I'm now using:

<h>
<xsl:copy-of select="./node()"/>
</h>

instead of:

<h>
<xsl:copy-of select="descendant::node()"/>
</h>

But this (my) template works:

<xsl:template match="element()|comment()|processing-instruction()" mode="group">
<xsl:copy-of select="current-group()"/>
</xsl:template>

Your proposal:

<xsl:template match="node()" mode="group">
<xsl:copy>
<xsl:copy-of select="@* except @the-attributes-you dont-want"/>
<xsl:apply-templates mode="group"/>
</xsl:copy>
</xsl:template>

I guess is never going to work, we need "current-group()". I simply
can't see how we can get the modified identity template into play.

Cheers,
Jesper

Current Thread