Martin,
Many thanks to your reply.
I have never used extensions before. I think the reason for this is that I am transforming the XML using XSLT client side. Therefore, the Microsoft extension will only work for IE but I also need it to work in other browsers like Firefox etc...
1 - Is there another way we can achieve that?
To compute the Order Totals for each order (number of items * unit price) I was using a named template and recurssion like the code below.
2 - Could we do something similar to that to calculate the last row totals
<td align="right">
<xsl:call-template name="CalcualteOrderTotal">
<xsl:with-param name="OrderDetailItems" select="OrderDetails/Item"/>
</xsl:call-template>
</td>
<xsl:template name="CalcualteOrderTotal">
<xsl:param name="OrderDetailItems"/>
<xsl:choose>
<xsl:when test="$OrderDetailItems">
<xsl:variable name="First" select="$OrderDetailItems[1]"/>
<xsl:variable name="valueOfRest">
<xsl:call-template name="CalcualteOrderTotal">
<xsl:with-param name="OrderDetailItems"
select="$OrderDetailItems[position()!=1]"/>
</xsl:call-template>
</xsl:variable>
<xsl:value-of
select="format-number($First/SalePrice *
$First/Quantity + $valueOfRest,'#.00')"/>
</xsl:when>
<xsl:otherwise>
0
</xsl:otherwise>
</xsl:choose>
</xsl:template>
3 - Could you please explain what this code is doing? Why do you use copy-of? It will select the whole xml rtf and add to result, wont it?
<tbody>
<xsl:copy-of select="$orders-rtf"/>
<xsl:variable name="orders" select="ms:node-set($orders-rtf)/tr"/>