|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Generic XSLT Sorting Template
MoMad wrote: I am trying to find a way to create a generic xsl sorting function that takes 5 parameters, which are the names of the nodes to sort.
In my opinion absolutely useless. This prevents any "generic", because you will always copy a node from input to output. Change it all sort selects to "*[name() = $SortFieldX]" (X = 0 to 4).
Then there remains the question, whether is useful in general. In my opinion not. Because you can't select special elements, you always apply templates on all nodes. What about modes on <xsl:apply-templates/>? Maybe you only have a wrong understanding of named templates? They do not work like functions in procedural languages! So you can't pass an unsorted node set and the template returns the sorted one. Storing the result in a variable would help you a bit, but needs an processor specific extension function. i want the first sort field (sortfield0) to sort on the global node-set (ancestor::*[next-sibling()]) ?? This I don't understand ... Regards, Joerg XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








