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

Re: Sorting and Grouping revisited

Subject: Re: Sorting and Grouping revisited
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Thu, 19 Apr 2001 08:39:09 +0100
Re:  Sorting and Grouping revisited
Hi Mike,

> This isn't really a question, other than to ask, 'am I crazy for
> expecting XSLT to be able to handle sorting and grouping
> gracefully?'

No, you're not.  XSLT handles *sorting* fairly well, but it doesn't
handle grouping at all well, and won't until XSLT 2.0.  There are
techniques for doing grouping that work OK, but they're not
particularly easy to get to grips with - see
http://www.jenitennison.com/xslt/grouping for more details.

> It seems to me the best bet for accomplishing what I need to do is
> to restructure my XML. As another member of this group noted, this
> is changing the data subtly for a presentation reason. This seems
> wrong.

It's 'wrong' if you change the *underlying* XML to suit the
presentation. However, you could have a preprocessing stylesheet that
takes the XML data and sorts it, before the data is then passed on to
the presentational stylesheet. This isn't 'wrong' at all - in fact
it's a good approach to the problem, better than performing the
complex transformation in a single step.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



 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.