Welcome to WebmasterWorld Guest from

Forum Moderators: httpwebwitch

Message Too Old, No Replies

XSLT Sum help

8:32 pm on Apr 1, 2010 (gmt 0)

New User

5+ Year Member

joined:Apr 1, 2010
votes: 0

I need help getting the sum of two attributes
<xsl:for-each select="Books/Book/price[@currency='Euros']" >
<xsl:value-of select="."/>
<xsl:for-each select="Books/Book" >
<xsl:value-of select="sum(/price[@currency='Euros'])"/>


I'm trying to sum the Euro's, but it is only showing 0's.
What am i missing?
6:18 am on Apr 3, 2010 (gmt 0)

Moderator This Forum from CA 

WebmasterWorld Administrator httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 29, 2003
votes: 0

the sum() syntax looks right, so it must be something wrong with the XPATH

without the "/" at the beginning

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members