Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 3rd, 2005, 07:16 AM
Registered User
 
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Summing up in a loop

Hello,

I want to do something like this in XSLT (Perl-like code):


$sum = 0;
foreach $item @list
{
     $sum += $hash{$item};
}
do_something($sum);


Essentially I want to sum up the columns of a table WITHOUT using
sum with an XPATH Expression:
<s><xsl:value-of select="sum(/path/to/values)"/></s>


Thanks

Tschuri







Similar Threads
Thread Thread Starter Forum Replies Last Post
summing column values hydriswall PHP Databases 1 December 8th, 2006 04:54 AM
Summing values swwallace XSLT 4 March 4th, 2006 12:13 PM
SQL vs CR summing daniel SQL Server 2000 5 October 3rd, 2005 04:59 PM
Summing and Exporting imhotep666 Excel VBA 3 August 18th, 2004 11:25 PM
Summing the Results of Two Calculated Fields CloudNine Access 1 December 24th, 2003 12:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.