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 November 21st, 2005, 02:30 PM
Registered User
 
Join Date: Nov 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to TimJR88 Send a message via MSN to TimJR88 Send a message via Yahoo to TimJR88
Default XSLT Newb.

I have my things formatted like this:

<index>
<game><name>One</name><plays>456</plays></game>
<game><name>Two</name><plays>7532</plays></game>
</index>

There is alot more than two... but you get the point.
At the end of the page I'd like to count up all the plays. I can't find out how any where. Please advise.

 
Old November 21st, 2005, 03:14 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

<xsl:value-of select="sum(/index/game/plays)"/>

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Another newb syntax question mean34dean Access VBA 4 April 4th, 2008 07:45 AM
I'm a newb.... I think I'm doing something wrong.. aaronmuslim XSLT 10 March 18th, 2008 01:02 PM
NEWB HERE Romaunt V. C# 8 August 16th, 2007 11:52 AM
Newb question zenobr BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 November 15th, 2006 10:19 PM
Need Help (Newb at HTML) Therum HTML Code Clinic 1 January 31st, 2005 07:35 PM





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