This is a grouping problem -- for a description of the Muenchian method for
grouping see:
http://www.topxml.com/code/default.a...20010129150851
and
http://jenitennison.com/xslt/grouping/index.html
=====
Cheers,
Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL
"James Merdan" <> wrote in message
news: om...
> Hi,
> I'm having an issue I was hoping someone could help me with. I have
> a number of tags which have an attribute 'type' like this:
> <data file="file1.jpg" type="image"/>
> <data file="file2.jpg" type="image"/>
> <data file="file3.jpg" type="image"/>
> <data file="file1.txt" type="text"/>
> <data file="file2.txt" type="text"/>
> <data file="file1.bin" type="binary"/>
>
> etc...
>
> Now I can get a total count by data/@type like this:
> image : 3
> text : 2
> binary : 1
>
> But what I want to be able to do is get a running total like this:
> file1.jpg image 1 of 3
> file2.jpg image 2 of 3
> file3.jpg image 3 of 3
> ...
>
> I'm stuck with the XML coming in the way it is, so is there a way to
> do this with XSL?
>
> Thanks,
> James