Hello all,
I've read this article
http://www.jenitennison.com/xslt/grouping/muenchian.xml about the Muenchian Grouping method. However, I'm having a little problem while using the described method. I have an xml file, see below (sorry for the amount of XML!), and an XSLT file (which can be provided if you are interest, but the most important part is typed below) I'd like to use the XML to group by the 'Group' element, but I cannot use the new XSLT 2.0 for grouping.
Using the XML below, I'd like to create 3 different (unique) groups. However, while using this XSL:
<xsl:key name="acts-by-group" match="Act" use="Sample/Analysis/Group" />
<xsl:template match="Result">
<xsl:for-each select="Act[count(. | key('acts-by-group', Sample/Analysis/Group)[1]) = 1]">
<xsl:sort select="Sample/Analysis/Group" />
My sorting only works on the first Group in the nested Analysis. I'd like to have it to work on all of them (Group A, Group B (twice) and Group C, creating three unique groups). The resulting HTML should look something like the HTML below.
Any help would be greatly appreciated, cause it's really giving me a headache!!
Thank!
Erik Pragt
-=-=-=-=-=-=-
XML
-=-=-=-=-=-=-
-=-=-=-=-=-=-=
HTML
-=-=-=-=-=-=-=-
(PS, I crossposted this question here and on
http://p2p.wrox.com, since this is quite important to me. If an answer will be provided somehow, I will post it on both fora.)
[ August 09, 2005: Message edited by: Erik Pragt ]