[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: sorting and grouping - can't get it to work
> Now for my question > > I have a little problem with data I want to sort and then place into a > two-column table > (two of the sorted data items in each row). > > > <xsl:template match="data/item"> > <table> > <xsl:for-each select="item[position() mod 2 = 1]"> Someone has already pointed out that your item elements don't occur as children of a data/item. > > But what I really need is that the sorting of the item takes > place before I > start selecting some of them to start rows. > For a problem that involves sorting, then grouping, I recommend a two-phase approach. Build a result tree fragment that contains the data in sorted order, use the xx:node-set() extension function to convert this to a node-set, and do the grouping in a second pass over this node-set. Mike Kay Software AG 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
|