document node order vs sort node order.
So I am grouping nodes by predicate on an attribute and sorted the nodes based on another attribute. I put these nodes into lines in a table. I want to have the lines in the table have alternating background colors. When I use xsl:number that returns the document order # of the node but what I want is the number of the node in the grouped & sorted order - otherwise the colors don't alternate they are just lumped together in pre-sorted/pre-grouped order.
How do I go about that?
Here is the grouping example,
<th>Method Stats</th>
<xsl:apply-templates select="Metric[Values/@per='method']">
<xsl:sort select="Values/@total" data-type="number" order="descending"/>
</xsl:apply-templates>
Thanks,
JJ
|