Subject: RE: [xsl] Removing Duplicates From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx (by way of Mulberry Technologies List Owner) Date: Fri, 2 Feb 2001 11:50:29 -0500 |
From bryan.s.schnabel@xxxxxxxxxxxxxx Thu Feb 1 19:46:28 2001 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] Removing Duplicates Date: Thu, 1 Feb 2001 16:45:49 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1"
Jeni's grouping example helped me solve a similar problem (http://www.jenitennison.com/xslt/grouping/muenchian.html).
<xsl:template match="some-element"> <xsl:for-each select="hdl[count(.|key('uq', @id)[1]) = 1]"> <mod><xsl:value-of select="@id"/></mod> <xsl:for-each select="key('uq', @id)"/> </xsl:for-each> </xsl:template>
-----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] Sent: Thursday, February 01, 2001 3:40 PM To: xsl-list Subject: [xsl] Removing Duplicates
From: Aravind Venkat <AravindV@xxxxxxxx> To: "'XSL-List@xxxxxxxxxxxxxxxxxxxxxx'" <XSL-List@xxxxxxxxxxxxxxxxxxxxxx> Subject: Removing Duplicates Date: Thu, 1 Feb 2001 16:49:43 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain
I want to remove duplicate nodes by looking at an attribute (in this case id). Can anyone suggest a good way to do this.
<hdl id="nN14139801"<![CDATA[ORACLE CORP <ORCL.O> TRADES AT $28-1/2, UP FROM CLOSE OF $27-1/2 ]]></hdl> <hdl id="nN14139801"<![CDATA[ORACLE CORP <ORCL.O> TRADES AT $28-1/2, UP FROM CLOSE OF $27-1/2 ]]></hdl> <hdl id="nN14139812"<![CDATA[MICROSOFT CORP <ORCL.O> TRADES AT $28-1/2, UP FROM CLOSE OF $27-1/2 ]]></hdl>
Thanks Aravind Venkat
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Removing Duplicates, Dimitre Novatchev | Thread | RE: [xsl] Removing Duplicates, by way of Mulberry T |
[xsl] double indirection with keys?, Tobias Grundmann | Date | RE: [xsl] Removing Duplicates, by way of Mulberry T |
Month |