Subject: Re: [xsl] generic grouping without nesting for-each-group? From: James Cummings <james@xxxxxxxxxxxxxxxxx> Date: Wed, 28 Jul 2010 15:14:30 +0100 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] generic grouping without , Michael Kay | Thread | Re: [xsl] generic grouping without , Martin Honnen |
Re: [xsl] generic grouping without , Michael Kay | Date | Re: [xsl] generic grouping without , Martin Honnen |
Month |