This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I think your example doesn't work because the xsl:value-of element can't have a "name" attribute.
Later: Oh, I see, you want to know how to assign the sum to a variable named "var3". You use the <xsl:variable> element to declare a variable and assign a value to it. Remember that these two must always be done at the same time in XSLT, you can't declare a variable and later assign it a value. So: [ May 24, 2006: Message edited by: Paul Clapham ]
Originally posted by Anil Vupputuri: [QB]Here is the more descriptive code,
Also I didn't see an alternative condition in your code. What do you do when $ytd-max-installed is equal to 'NA'? I would use xsl:choose to ensure $total-ytd-max-installed had a value. Something like this:
Also it looks like maybe you would want to increment $total-ytd-max-installed. You probably want to declare $total-ytd-max-installed outside the loop and set it with something like: That's from the top of my head and untested but I hope you get the idea.
Holla at me...<br /><a href="http://codeforfun.wordpress.com" target="_blank" rel="nofollow">http://codeforfun.wordpress.com</a>