xsl-list
[Top] [All Lists]

RE: Grouping, Counting, and Sorting

2004-05-21 11:02:10
-----Original Message-----
From: Thomas F. O'Connell [mailto:tfo(_at_)netcentral(_dot_)com]


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>