[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Unique attribute values


Subject: Re: [xsl] Unique attribute values
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Thu, 10 Jan 2008 17:39:31 +0100

Sean Tiley wrote:
Hi there,
I have the following structure in an XML file

<root>
 <file name="c:\test.java">
  <error line="4" message="Message1" severity="2"/>
  <error line="67" message="Message2" severity="4"/>
 </file>
  <file name="c:\code.java">
  <error line="2" message="Message1" severity="2"/>
  <error line="54" message="Message2" severity="4"/>
  <error line="122" message="Message1" severity="2"/>
  <error line="124" message="Message2" severity="4"/>
 </file>
</root>

What I want to do is the following.
I want a list of the unique values for the message attribute
I then want to output attribute value and the number of times it
appears in the file.

Do you want to use XSLT 1.0 or 2.0?


--

	Martin Honnen
	http://JavaScript.FAQTs.com/


Current Thread
Keywords