View Single Post
  #1 (permalink)  
Old June 4th, 2003, 07:20 PM
ladyslipper98201 ladyslipper98201 is offline
Registered User
Join Date: Jun 2003
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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"/>