I have an XML file that stores movies and their actors.\[code\]<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="http://stackoverflow.com/questions/15455618/index.xsl"?><moviesxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="movies.xsd"><movie movieID="1"> <actors> <actor actorID="1"> <name link="hello">Bob</name> </actor> <actor actorID="2"> <name link="hello">Mike</name> </actor> </actors> </movie><movie movieID="2"> <actors> <actor actorID="1"> <name link="hello">Bob</name> </actor> <actor actorID="2"> <name>Daniel</name> </actor> </actors> </movie></movies>\[/code\]As you can see from the code above, I have 2 "movie" elements that contain 2 "actor" child elements each. 3 out of 4 "name" child elements contain an attribute "link": Bob, Mike, BobI'm using the following XSLT code to display only the names of the actors that contain an attribute "link":\[code\]<xsl:template match="/"> <xsl:text>Actors: </xsl:text> <xsl:apply-templates select="/movies/movie/actors/actor/name[@link]"/></xsl:template><xsl:template match="name[@link]"> <xsl:value-of select="." /> <xsl:element name="br" /></xsl:template>\[/code\]The output that I get:\[code\]BobMikeBob\[/code\]As you can see the name "Bob" repeats twice. I want to display only unique actor names that have an attribute "link"I have tried the following XPath 1.0 queries:\[code\]<xsl:template match="[not(@name[@link] = preceding:name)]"><xsl:template match="not(@name[@link] = preceding:name)"><xsl:template match="not(@name[@link] = preceding-sibling:name)">\[/code\]All of them made the page display an error.