removing duplicate children

Subject: removing duplicate children
From: Cliff Draper <Cliff.Draper@xxxxxxx>
Date: Thu, 30 Nov 2000 18:10:41 -0800
Hi.  I've looked thru the FAQ and haven't been able to figure out the
magic XSLT script to do what I want.

I want to iterate thru a list of nodes that I select and only print
out the unique ones.  This is different from what I've seen in the FAQ
since I want unique values only from the current node and below it.

So, in the following example, I might be trying to generate the
signatures of some Java methods.


void methodA() throws, MyException, MyOtherException;
void methodB() throws, MyException, MyOtherException;
void methodC() throws MyException, MyOtherException;

I have a chunk of script that looks something like:
<xsl:template match="call">
  <xsl:text>void </xsl:text>
  <xsl:apply-templates select="name"/>
  <xsl:text>() throws </xsl:text>
  <xsl:for-each select=".//throws">
    <xsl:text>, </xsl:text>
    <xsl:apply-template select="."/>

What I really want is to turn on a unique parameter to <xsl:sort>
inside of that for-each.

Thanks for any help.

Cliff Draper    Sun Microsystems, Forte Tools    (510) 869-3462 or x73462
My opinions may or may not reflect those of my employer.
---------------------------- food for thought ---------------------------
"I don't think so," said Rene Descartes.  Just then, he vanished.

 XSL-List info and archive:

Current Thread