[xsl] select unique name

Subject: [xsl] select unique name
From: Sylwester Lesniak <tycoonek@xxxxxxxxx>
Date: Sun, 18 Apr 2004 11:57:11 -0700 (PDT)
Hi All,

I'm new to xsl and xpath. I have a pmd xml report (xml
below). What I would like to do is to display all test
names, like:

\test00
\test10
\test20


I manage to get a name of single test: 
<xsl:variable name="name"
select="substring-before(substring-after(@name,'build'),'src')"/>
   

and I know how to display all 5 @names, but I don't
know how to select unique names.  

\test00
\test00
\test10
\test10
\test20


<pmd>
<file name="D:\build\test00\test00src\test01.java">
  <violation line="5" rule="UnusedImports">Avoid
unused imports such as 'Collection'</violation>
</file>

<file name="D:\build\test00\test00src\test02.java">
  <violation line="8" rule="UnusedImports">Avoid
unused imports such as 'Context'</violation>
</file>


<file name="D:\build\test10\test10src\Class11.java">
  <violation line="10" rule="UnusedImports">Avoid
unused imports such as 'Exception'</violation>
  <violation line="11" rule="UnusedImports">Avoid
unused imports such as 'Exception'</violation>
</file>

<file name="D:\build\test10\test10src\Class12.java">
  <violation line="10" rule="UnusedImports">Avoid
unused imports such as 'Exception'</violation>
  <violation line="11" rule="UnusedImports">Avoid
unused imports such as 'Exception'</violation>
</file>


<file name="D:\build\test20\test20src\Class21.java">
  <violation line="12" rule="DuplicateImports">Avoid
duplicate imports such as 'java.util.Date'</violation>
  <violation line="12" rule="UnusedImports">Avoid
unused imports such as 'Date'</violation>
</file>
</pmd>


Can any body tell me how to solve it?
//sylwester


	
		
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25"
http://photos.yahoo.com/ph/print_splash

Current Thread