diablokicks
IS-IT--Management
Okay, so i'm trying to pull two subtotals. I have a table with two currency values, EUROS and DOLLARS. So in my XML file i have for example :
<BOOKS>
<Book>
<title isbn="2" kind="Food" inStock="8 Count">How to Cook</title>
<author>Tom Lee</author>
<price currency="Euros">25</price>
<pages>529</pages>
</Book></BOOKS>
I know the way it is setup is stupid having it as an attribute, but its the way it needs to be. I was able to add up the total pages for all books, but i'm having troubles with seperating the EUROS and Dollars and then finding the value of the element with each attribute.
TOTAL: $
<xsl:for-each select="Books/Book//price[@currency='USD']" />
<xsl:value-of select="//*" />
</xsl:for-each>
I know that i need to use the sum function to add them up, but i am just having issues even getting the values.
Please help me.
Thank you for your time,
Patrick
<BOOKS>
<Book>
<title isbn="2" kind="Food" inStock="8 Count">How to Cook</title>
<author>Tom Lee</author>
<price currency="Euros">25</price>
<pages>529</pages>
</Book></BOOKS>
I know the way it is setup is stupid having it as an attribute, but its the way it needs to be. I was able to add up the total pages for all books, but i'm having troubles with seperating the EUROS and Dollars and then finding the value of the element with each attribute.
TOTAL: $
<xsl:for-each select="Books/Book//price[@currency='USD']" />
<xsl:value-of select="//*" />
</xsl:for-each>
I know that i need to use the sum function to add them up, but i am just having issues even getting the values.
Please help me.
Thank you for your time,
Patrick