Subject: Re: [xsl] mixed content grouping by whitespace From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Tue, 13 Apr 2010 12:45:51 -0400 |
On 13/04/2010 16:47, Wendell Piez wrote:It's really helpful to keep this distinction in mind. One sort of grouping works with a key; @group-by or @group-adjacent calculates that key. The other sort simply applies a match criterion to each node in the group to determine whether it's the particular sort of node (group-starting or group-ending) of interest for that sort of grouping.
Is it just me?
this is one of the few distinctions in xslt for which I can never find a mental model (so I can never remember) I always have to look this up (or more exactly I don't look it up and get it wrong half the time).
the use of match expression sseem completely arbitrary, Why didn't they always make them xpath expressions?
group-by and group-adjacent are based on values, group-starting-with and group-ending-with are based on names.
It would mean you had to use
self::h1 instead of h1 to trigger grouping on an h1 element, but it would seem to be a lot more consistent and more powerful as the match versions of grouping are restricted to nodes, so you can't for example group a sequence of integers with group-starting with specifying some condition on integers...
-- XSLT/XQuery training: San Carlos, California 2010-04-26/30 Principles of XSLT for XQuery Writers: San Francisco,CA 2010-05-03 XSLT/XQuery training: Ottawa, Canada 2010-05-10/14 XSLT/XQuery/UBL/Code List training: Trondheim,Norway 2010-06-02/11 Vote for your XML training: http://www.CraneSoftwrights.com/s/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] mixed content grouping by, David Carlisle | Thread | Re: [xsl] mixed content grouping by, David Carlisle |
Re: [xsl] mixed content grouping by, David Carlisle | Date | Re: [xsl] mixed content grouping by, David Carlisle |
Month |