[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Can grouping and sorting be done in single transf

Subject: Re: Can grouping and sorting be done in single transformation?
From: Mukul Gandhi <mukulgw3@xxxxxxxxx>
Date: Mon, 10 Nov 2003 02:15:52 -0800 (PST)
item desc
This, is a grouping by position problem. Its nicely
explained at --

http://www.jenitennison.com/xslt/grouping/index.html#by-position

Regards,
Mukul

--- Herman Kwok <herman.kwok@xxxxxxxxxxxxxxxx> wrote:
> Hi all,
> 
> I am new to XSL. I am woundering if sorting and
> grouping can be done in single transformation. If it
> is possible, would you please tell me how?
> 
> Here is the screnario.
> 
> XML Data
> =========
> <result>
>     <item desc="d"/>
>     <item desc="j"/>
>     <item desc="k"/>
>     <item desc="e"/>
>     <item desc="c"/>
>     <item desc="g"/>
>     <item desc="h"/>
>     <item desc="i"/>
>     <item desc="f"/>
>     <item desc="a"/>
>     <item desc="b"/>
> </result>
> 
> expected result after transformation
> (all the items are sortted by the value of "desc"
> and 
> arranged x (say 3) items in a group)
> =====================================
> <result>
>   <group>
>     <item desc="a"/>
>     <item desc="b"/>
>     <item desc="c"/>
>   </group>
>   <group>
>     <item desc="d"/>
>     <item desc="e"/>
>     <item desc="f"/>
>   </group>
>   <group>
>     <item desc="g"/>
>     <item desc="h"/>
>     <item desc="i"/>
>   </group>
>   <group>
>     <item desc="j"/>
>     <item desc="k"/>
>   </group>
> </result>
> 
> Any idea? 
> 
> 
> -- 
>
__________________________________________________________
> Sign-up for your own personalized E-mail at Mail.com
> http://www.mail.com/?sr=signup
> 
> Search Smarter - get the new eXact Search Bar for
> free!
> http://www.exactsearchbar.com/
> 
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

 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.