Results 1 to 1 of 1
Dec 21, 2005, 13:12 #1
- Join Date
- Apr 2005
- 0 Post(s)
- 0 Thread(s)
checking for equality between xml elements
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 eat people sometimes
Tigers have stripes
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.
<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>