This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: How to remove duplicates nodes?
- To: xsl-list at mulberrytech dot com
- Subject: Re: How to remove duplicates nodes?
- From: Michal_Mart at cch-lis dot com
- Date: Fri, 25 Aug 2000 16:59:47 -0400
- cc: Joel Riedesel <jriedese at jnana dot com>
- Reply-To: xsl-list at mulberrytech dot com
Hi Joel,
Will this work:
<xsl:template match="/">
<xsl:for-each
select="rule/rhs/value[1][not(.=following::rhs/value[1])]">
<xsl:value-of select="."/>
</xsl:for-each>
</xsl:template>
HTH,
Michal
Joel Riedesel <jriedese@jnana.com> on 08/25/2000 03:24:20 PM
Please respond to xsl-list@mulberrytech.com
To: xsl-list@mulberrytech.com
cc: (bcc: Michal Mart)
Subject: Re: How to remove duplicates nodes?
That's nice, but my structure is more complex and, to be honest,
I still don't quite get how I would do this:
I have a rule with multiple rhs elements. Each rhs element
may have multiple value elements.
I want to find the first value element of each rhs of the rule and
no duplicates of those.
to get all the value elements I'm interesting in I do this:
<xsl:variable name="values" select="rule/rhs/value[1]"/>
But, that may have duplicates, and that's where I'm having the
difficulty. It's not obvious, to me, how to take the example from
the faq and apply it here.
Thanks again,
Joel
"DuCharme, Robert" wrote:
>
> >How do I remove syntactically duplicate nodes from that set?
>
> See the FAQ: http://www.dpawson.freeserve.co.uk/xsl/N2696.html
>
> Bob DuCharme www.snee.com/bob <bob@
> snee.com> "The elements be kind to thee, and make thy
> spirits all of comfort!" Anthony and Cleopatra, III ii
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
--
Joel Riedesel
Jnana Technologies Corporation
mailto:jriedese@jnana.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list