ASP Error: 70
Description: Permission denied
Source: Microsoft VBScript runtime error

[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: removing duplicate children

Subject: RE: removing duplicate children
From: Archie Russell <archier@xxxxxxxxxxxxxxx>
Date: Thu, 30 Nov 2000 19:32:31 -0800
xslt removing duplicate nodes
in your for-each could you check if the node existed earlier in the
document, and if so don't print out anything?  i'm not sure of the details.
maybe in the template you could select the first node matching your method's
name and see if that node has the same node id as the node the template is
being called on...but there must be a better way.

or just |sort|uniq

> -----Original Message-----
> From: Cliff Draper [mailto:Cliff.Draper@xxxxxxx]
> Sent: Thursday, November 30, 2000 6:11 PM
> To: xsl-list@xxxxxxxxxxxxxxxx
> Subject: removing duplicate children
> 
> 
> 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.
> 
> <call>
>   <name>methodA</name>
>   <throws>java.io.IOException</throws>
>   <call>
>     <name>methodB</name>
>     <throws>MyException</throws>
>     <throws>java.io.IOException</throws>
>     <call>
>       <name>methodC</name>
>       <throws>MyException</throws>
>       <throws>MyOtherException</throws>
>     </call>
>   </call>
> </call>
> 
> void methodA() throws java.io.IOException, MyException, 
> MyOtherException;
> void methodB() throws java.io.IOException, 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="."/>
>   </xsl:for-each>
> </xsl:template>
> 
> 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:  http://www.mulberrytech.com/xsl/xsl-list
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.