XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 27th, 2004, 12:43 PM
dunk dunk is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: Köln, Germany
Posts: 2 dunk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
XSL: prevent duplicates in a hierarchy

Hi,

I have a hierarchy like this:

<hierarchy>
<class name="a">
<class name="b"/>
<class name="c"/>
</class>
<class name="d">
<class name="c"/>
<class name="e"/>
</class>
</hierarchy>

Now I want to go through the hierarchy and output each name, omitting duplicates (two nodes are equal if their names are equal). The desired output is:

a, b, c, d, e

and NOT:

a, b, c, d, c, e

How could I do that using XSLT? I'm not very familiar with XSLT. The approach I would take in, say, Java, is just to have some datastructure that remembers each name. However, I don't think that's possible in XSLT - or is it?

Cheers,
Knud

Reply With Quote
  #2  
Old August 27th, 2004, 03:17 PM
kid23 kid23 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 62 kid23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
several solutions for that can be found here:

http://www.dpawson.co.uk/xsl/sect2/N2696.html

grtz

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XSL: prevent duplicates in a hierarchy


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT