[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

Subject: RE: sorting and grouping - can't get it to work
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Mon, 2 Jul 2001 10:54:50 +0100
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.