Thanks, everybody, for your help. Voxink, that returns exactly what I asked for!
I've been toying with for-each to try to get this to be dynamic. That is, if I apply this stylesheet to another XML document with 4 products, it will display the sum of each of the 4 products.
It seems that this works so far:
Code:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="report">
<xsl:for-each select="entity/row/item/@thename[not(.=preceding::item/@thename)]">
<xsl:value-of select="current()"/>=
<xsl:value-of select="sum(/report/entity/row/item[@thename=current()]/@theval)"/><br />
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Again, thanks for your help! It was a huge push in the right direction. Without it, I would still be sleeping through the tutorial lessons online. 
|