Subject: RE: sort on more than one element
From: Ben Robb <Ben@xxxxxxxxxx>
Date: Wed, 1 Nov 2000 09:51:15 -0400 (EST)
|
Put as many <xsl:sort> elements as you need:
<xsl:sort select="col1"/>
<xsl:sort select="col2"/>
...
where the first <xsl:sort> element specifies the primary sort key, the
second specifies the secondary sort key and so on. When the apply-templates
or for-each builds its nodelist, it sorts according to the sort keys; if two
or more nodes have equal weight in the sort, then it should return in
document order.
Hope this helps,
Ben
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|