Hi All,
Here below is the XSL File.

<?xml version='1.0' encoding='UTF-8'?>
<xsl:stylesheet xmlns:msxsl="urn:schemas-microsoft-com:xslt" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xslutput method="html"/>
<xsl:variable name="ext_price">
<xsl:for-each select="invoice/item">
<accum><xsl:value-of select="quantity * unit_price"/></accum>
</xsl:for-each>
</xsl:variable>


<xsl:template match="/">
<html><head/>
<body>
<table cellSpacing="0" xmlns:msxsl="urn:schemas-microsoft-com:xslt" border="1" cellPadding="2">
<tr>
<th>Item</th>
<th>Quantity</th>
<th>Unit Price</th>
<th>Extended Price</th>
</tr>
<xsl:for-each select="invoice/item">
<tr>
<td>
<xsl:value-of select="@item_num"/>
</td>
<td align="right">
<xsl:value-of select="quantity"/>
</td>
<td align="right">
<xsl:value-of select="format-number(unit_price, '#,##0.00')"/>
</td>
<td align="right">
<xsl:value-of select="format-number(quantity * unit_price, '#,##0.00')"/>
</td>
</tr>
</xsl:for-each>
<tr>
<th colSpan="3">Total, All Items</th>
<td align="right">
<xsl:value-of select="format-number(sum(msxsl:node-set($ext_price)/accum), '#,##0.00')"/>

</td>
</tr>
</table>
<table>
<tr>
<td>Accum</td>
<td>
<xsl:value-of select="accum"/>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>

</xsl:stylesheet>

Can anybody explain the Bold text with Blue Color section. I know its going in a loop to calculate the Sum. How it is stored in the Variable? Where they are saying that it has to add the sum of quantity and unit_price.
What is accum tag? Can any one please explain me in details Please...

Thanks and Regards
Anandraj.A.