RE: [xsl] Variable containing sorted node-set?

Subject: RE: [xsl] Variable containing sorted node-set?
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Mon, 15 Oct 2001 16:29:07 +0100
> The document is marked up with <index> tags. In others
> languages, it would
> be natural to put these elements in a list and sort the list.
> And *then*
> doing smart things with that sorted list. I have found no way
> of doing this
> in XSLT. Is it possible to get a variable of sorted <index> elements?

XSLT 1.0 has five data types: boolean, number, string, node-set, and
result-tree-fragment. Node-sets are no use to you here, because by
definition sets don't hold ordering information. Your best bet is a result
tree fragment; though this can only hold copies of the original nodes rather
than references to them; and you need the xx:node-set() extension to process
the RTF.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread