|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > XSL: prevent duplicates in a hierarchy |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|