Listing single occurrences of namespace labels

Subject: Listing single occurrences of namespace labels
From: Trem Stamp <trem@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 29 Nov 2000 17:37:28 +1100
HI all,

I'm not sure that my last question got sent here it is

I'd like to know if it is possible to generate a list of namespace label
values that may occur in an xml,
so that only one label reference occurs even if there are two or more of
the same name.

For example if I have....

<library xmlns="";
xmlns:book=""; >
 <name>Scary movies</name>
 <name>James Bond</name>

I'd like to list:


(note only one mention of horror is listed).

I've been through the XSL-list and know that it is possible to list
unique values using preceding-sibling,
but couldn't get it to work when trying to use the local-name() as the
checking value.

It may have been the incorrect syntax:

<xsl:template match="/library">
 <xsl:apply-templates select="book[not(local-name(*//.) =

<xsl:template match="book">
<xsl:value-of select="local-name(*//.)"/>

Firstly can anyone suggest where I am going wrong.

Secondly what if the books aren't necessarily in the correct order for
preceding-sibling to work correctly.
Is there any other way that I can retrieve only single values of
namespace elements?



 XSL-List info and archive:

Current Thread