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

Re: generic grouping without nesting for-each-group?

Subject: Re: generic grouping without nesting for-each-group?
From: James Cummings <james@xxxxxxxxxxxxxxxxx>
Date: Wed, 28 Jul 2010 15:14:30 +0100
Re:  generic grouping without nesting for-each-group?
On Wed, Jul 28, 2010 at 14:45, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> Well, I wouldn't suggest nesting for-each-group 3 levels deep - I would
> suggest doing it recursively so it can go any number of levels deep, along
> the lines of

Yes, really for anything over a couple levels that makes more sense...
you are right.

> http://www.saxonica.com/papers/ideadb-1.1/mhk-paper.xml

Thanks for this, I'd not read it and it will now make some bedtime reading :-)

> That leaves the problem of the bad nesting of level numbers. But I don't
> think that's actually a problem. If you look at my solution in that paper
> (the recursive template called process-level) I think that when you skip a
> level, it will simply put everything in one group, and carry on to process
> the next level.

Another solution we thought of is to add in dummy head levels in an
additional first-pass.  So the first pass would add in any extra
<head> elements based on the difference between it and the previous
head.  So
<head level="1>
...
<head level="5">

would get <head> of levels 2-4 added immediately before it.  Then the
grouping itself becomes really quite simple.

Many thanks,

-James

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.