|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Sorting and Grouping revisited
David Carlisle wrote: > > > 'am I crazy for expecting XSLT to be able to handle sorting and > > grouping gracefully?' > > > However all is not lost. You can access the sorted list by doing > > <xsl:variable name="x"> > <xsl:for-each.... > <xsl:sort/> > .... > </xsl:variable> > > then use it as in > > <xsl:apply-templates select="exslt:node-set($x)"/> > > where exslt: is the prefix for your processors extension namespace. > All the major XSLT systems (I think) offer a node-set() function for > this use. > Interesting - at first glance I thought that this broke the principle that node-set expressions and variables don't have an independent order property, that they use either the document order or an order dictated by their XSLT or Xpath context. Then I realised that because the new node-set was created by value rather than by reference the nodes are actually in "RTF order", as when the variable was created. I suspect this won't be the last time that this property of node-set() catches me out! Francis. 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








