xsl-list
[Top] [All Lists]

2 level grouping

2003-06-26 06:41:04
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



<Prev in Thread] Current Thread [Next in Thread>