xsl-list
[Top] [All Lists]

Re: Grouping, Counting, and Sorting

2004-06-03 08:57:03
Any suggestions on how to do this? I'm wondering if there's a better
approach to my general problem, too...

-tfo

-----Original Message-----
From: Thomas F. O'Connell [mailto:tfo(_at_)xxxxxxxxxxxxxx]


Hi,

Here's my current approach:

<table>
    <th>Header</th>
<xsl:apply-templates select="node[position() &lt;= 100]">
    <xsl:sort select="valid" />
</xsl:apply-templates>
</table>

<snip />
... but I was under the impression that the sort would apply to the
nodes before their positions were considered.

The sorting works like this:

- you select the first 100 nodes
- then sort those on their (possibly absent) valid node

If you want them all sorted first, you'll have to find a way to achieve the
sorting before the grouping...

Greetz,

Andreas



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