Re: [xsl] Restrictind a set of notes to within a group

Subject: Re: [xsl] Restrictind a set of notes to within a group
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Thu, 19 Apr 2012 16:21:46 +0200
Mark wrote:
have an xml file like
<Date day=b1b>
<Session task=btask1b>
<Notes hours-worked=b1.5b/>
<Session task=btask2b>
Notes hours-worked=b5b/>
<Session task=btask1b>
<Notes hours-worked=b3b/>
<Date day=b2b>
For the month, I want to sum all the hours-worked for each task:

I have tried several expressions, but failed. This gives me the total
hours worked on all tasks rather than each individual task:
<xsl:for-each-group select="Date/Session" group-by="@task">
<xsl:for-each select=".">
<fo:block xsl:use-attribute-sets="subdiv2">
<xsl:value-of select="@task"/>
<xsl:text> (</xsl:text>
<xsl:text>) </xsl:text>
How do I restrict the total to just the hours-worked on each specific task?

I think you want
you will need to throw out the 'for-each' inside the 'for-each-group' however


	Martin Honnen --- MVP Data Platform Development

Current Thread