|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Getting the first and last nodes of a sorted nodes
Hi John,
It's good to know you're so far ahead with this. Sorry if the posts crosses: lists do that sometimes. At 01:19 PM 4/8/2004, you wrote: How do you "Bind the result of your sort to a variable" when (so far as I am aware) you can only sort output elements from within a for-each or apply-templates by using the xsl:sort element?
The thing is, in XSLT 1.0 this variable is now a Result Tree Fragment, a datatype that can be copied to output and that can be operated on as a string, but that can't be operated on as a node set. As you can imagine, the latter feature would be (is) extremely powerful -- and is what the node-set() extension function is for. (So exsl:node-set($sorted-result) turns this RTF into a node set you can apply templates to.) In XSLT 2.0, it's a node set already when it's created, so you can reprocess $sorted-result freely, no differently from your source document. Cheers, Wendell
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








