[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: mixed content grouping by whitespace
At 2010-04-13 17:19 +0100, David Carlisle wrote:
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. As I see it and have no problems remembering it: group-by and group-adjacent are based on values, group-starting-with and group-ending-with are based on names. Which of course is incomplete, because the latter are based on complete match patterns which can be very elegant and not simply names. But that is the easy distinction for me. I look at the content of the instruction as if it were a standalone template rule that matches the entire group, so I write the attribute name as if it were that template's match= attribute that triggers the processing of the group. Using that mental imagery, I find the writing of the instruction itself quite smooth. Where I usually trip is over remembering to use a predicate on the current-group() as in current-group()[self::h1] but I'm getting better at mastering it. It would mean you had to use I'm not really sure what you are trying to say there, David. And in what you are trying to say are you accommodating the feature of using a sequence in group-by= in order to place a single population member into more than one group simultaneously? I need to include a running example of that in the classroom to help convey that concept to students. I hope the other comments above help. . . . . . . . . . Ken -- 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|