xsl-list
[Top] [All Lists]

Re: [xsl] Re: Sorting on two levels

2015-04-15 11:25:48
Michele R Combs mrrothen(_at_)syr(_dot_)edu wrote:
I did try  <xsl:apply-templates select="current-group()">, thinking
it would just go through and apply the existing indexterm, primary,
secondary templates -- but I got the entire group in a chunk, it
didn't seem to apply templates to each element  individually.  I'll
go back and look, maybe I did something wrong there.  I wasn't using
mode, maybe that was the problem.

Doing the apply-templates on the group to use existing templates sounds like the right idea, I don't know why it did not work. I only put in a mode to allow a processing step different from the normal handling.


Last question: if I want to do something at the end of each group,
I'd put that instruction right before the </xsl:for-each-group>,
correct?


Well thinking about it imperatively like "to do something at the end of each group" is not the right approach with a declarative language but the for-each-group contains a sequence constructor evaluated for each group and if you want to generate some output at the end of the sequence then do that by putting the instruction right before the closing </xsl:for-each-group>, that's right.
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>