I have a XML file with data read from feeds over the internet. The XML is a standard RSS 2.0 file. It looks like (I ommited some tags to shorten the post):
<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title/>
<item>
<title>Blah</title>
<category>CAT1</category>
</item>
<item>
<title>Blah2</title>
<category>CAT2</category>
</item>
<item>
<title>Blah3</title>
<category>CAT1</category>
</item>
</channel>
</rss>
What I'm trying to do is use XSLT to create a HTML file. My problem is that I need to group items by CATEGORY tag. In order to generate something like:
<div>
<span>CAT1</span>
<div>
<span>Blah</span>
<span>Blah3</span>
</div>
</div>
<div>
<span>CAT2</span>
<div>
<span>Blah2</span>
</div>
</div>
So far I found a bunch os posts that teaches how to use XSLT to group by using attributes (like this, this and this). But, all my attempts to adaptate then failed.
TIA,
Bob