This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: sort on more than one element
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: sort on more than one element
- From: Ben Robb <Ben at cscape dot com>
- Date: Wed, 1 Nov 2000 09:51:15 -0400 (EST)
- Reply-To: xsl-list at mulberrytech dot com
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