Re: [xsl] Problem accumulating values.

Subject: Re: [xsl] Problem accumulating values.
From: Patricia Santana Cruz <patriciasc@xxxxxxxxxxxxx>
Date: Thu, 03 Mar 2011 13:13:13 +0100
On Thu, 2011-03-03 at 11:43 +0000, Andrew Welch wrote:
> <xsl:template match="year/week">
>   ....
>   <xsl:for-each select="day/task">
>     <xsl:call-template name="total_duration"/>
>   </xsl:for-each>
> 
> to just:
> 
> <xsl:value-of select="sum(for $x in task return $x/xs:dateTime(@end) -
> $x/xs:dateTime(@start))/>
> 
> (well, make it a variable and then do your formatting as you have done already)

Thanks, this really helped. It worked perfectly.

Patricia.

-- 
patriciasc@xxxxxxxxxxxxx
http://psconboard.blogspot.com/
www.openismus.com

Current Thread