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

[xsl] 2 level grouping


Subject: [xsl] 2 level grouping
From: Jeroen Janssen <jeroen@xxxxxxxx>
Date: Thu, 26 Jun 2003 15:41:04 +0200

I have a problem that I have been trying to find the solution for for quite a while, but frankly it's a bit too complicated for my limited xsl skills, maybe someone on this list can point me in the right direction.

I have something like this:

<items>
	<item month="5" year="2003"/>
	<item month="5" year="2003"/>
	<item month="4" year="2003"/>
	<item month="3" year="2003"/>
	<item month="2" year="2003"/>
	<item month="1" year="2003"/>
	<item month="12" year="2002"/>
	<item month="11" year="2002"/>
	<item month="10" year="2002"/>
	<item month="9" year="2002"/>	
</items>

And as a result I would like a list of all the months and all the years, with no duplicates. Something like this:

5/2003
4/2003
3/2003
2/2003
1/2003

5/2002

ect. you get the idea...

Now if it was just the months I could (with a little help from google) write an xsl that would work. But the years make it much more complicated.

Hopefully I'm making myself clear here...


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list




Current Thread
Keywords
xsl