xsl-list
[Top] [All Lists]

RE: Sorting results by output of a conversion template

2004-01-09 02:56:53
I need to be able to sort my results by the output of this 
template. So...is there a way using XSL:SORT to call a 
template (like the one above) and sort the results that way?? 

Not in 1.0.

You can do it using a 2-phase transformation, where the first phase
writes a temporary tree containing the expanded values, and the second
phase sorts the nodes from the temporary tree (accessed using
exslt:node-set()). 

In XSLT 2.0 this becomes easy using a call on an xsl:function from
within the <xsl:sort> select expression.

Michael Kay


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



<Prev in Thread] Current Thread [Next in Thread>