|
Subject: Re: How to remove duplicates nodes? From: Michal_Mart@xxxxxxxxxxx Date: Fri, 25 Aug 2000 16:59:47 -0400 |
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@xxxxxxxxx> on 08/25/2000 03:24:20 PM
Please respond to xsl-list@xxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxx
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@xxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: How to remove duplicates nodes?, Michal_Mart | Thread | Re: How to remove duplicates nodes?, Joel Riedesel |
| RE: Avoiding hard-coding the includ, Evan Lenz | Date | Re: How to remove duplicates nodes?, Joel Riedesel |
| Month |