Hi there,

I'm trying to compare a number of XML elements in a given file using XSLT, pass the XML and XSL files to the .NET parser and have it output HTML.

I'm not sure how to implement this logic in XSL. I know about the xsl:if tag, but I'm not sure how to use it in this sense. I thought about passing everything into a database table, retrieve it and use .NET logic to sort out the data, but I think there has to be an easier way.

Any help would be appreciated. I've included an XML example below. The output that I'm looking for is as follows:

Lions
Lions eat people sometimes

Tigers
Tigers have stripes
Tigers roar

Cows
Brown Cows say moo

Sorry for the childish example... essentially I'm trying to group what's in the "summary" tags according to the "category" tags for each item. Any help would be much appreciated.

Thanks


HTML Code:
<item>
	<category>Lions</category>
	<summary>
		Lions eat people sometimes
	</summary>
</item>
<item>
<category>Tigers</category>
	<summary>
		Tigers have stripes
	</summary>
</item>
<item>
<category>Cows</category>
	<summary>
	Brown Cows say moo
	</summary>
</item>
<item>
<category>Tigers</category>
	<summary>
	Tigers Roar
	</summary>
</item>