xsl-list
[Top] [All Lists]

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

2011-01-14 02:14:00


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>

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>