|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Grouping while sorting
Your best bet is to take the problem and break it into two seperate
processes.
In the first process create a variable and within the opening and closing brackets of that variable put the logic you are using to sort your elements as desired. This process is often refered to as creating a temporary tree. In strict XSLT 1.0 the problem with this method is that there is no way to tree the Result Tree Fragment (RTF) and a node-set and as such each vendor has implemented similar but just slightly different (just enough to make each implementation non-portable between processors) such that without knowing which processor you are using I can give you the specifics of the syntax for the node-set function particular to that processor. A while back Jeni Tennison and company started the EXSLT project which is an effort to bring further functionality to XSLT using standard function names within one particular namespace extension library. There are several processors that support the EXSLT extensions directly the most notable being Dr. Michael Kay's Saxon processor. You can learn more about EXSLT at EXSLT.org, continue your learning of XSLT through Jeni Tennisons XSL tutorials (http://www.jenitennison.com), and download the latest build of Saxon from Dr. Kay's company site (http://www.saxonica.com). All this aside you can look up the specifics to the variation on the node-set function implemented by your processor by simply looking inside the documentation. With this variable you can then, via the node-set function, treat the resulting XML node-set just like any node-set. The document order for this node-set is now in sorted order based on your original sort criteria. As such you can expect that whatever sort process you place on this newly order node-set the result will be based on the new document order and not the original document order, which at this point in the transformation processor the processor will know nothing about as it sees a brand new node-set that has no direct relation to the originating node-set/// Hope this helps! <M:D/> Ragulf Pickaxe wrote: Hello all,
|
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








