This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Variable containing sorted node-set?
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Variable containing sorted node-set?
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Mon, 15 Oct 2001 16:29:07 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> 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