i need a way to come up with the total of the invoices per customer,.(add the three invoices then display the total accordingly),.have tried sum(/*/(PriceUnit*Ordered)),.but its not working error,.---[the total of an invoice=PriceUnit*Ordered],.so sum up the three invoice and then display the results,.its tough for me so please helpXML\[code\]<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="http://stackoverflow.com/questions/12338944/Nom.xslt"?><customers> <customer> <clientname>troy madison</clientname> <invoices> <invoiceDate>8/8/98</invoiceDate> <product> <PriceUnit>1000</PriceUnit> <Ordered>2</Ordered> </product> <product> <PriceUnit>5400</PriceUnit> <Ordered>3</Ordered> </product> </invoices> <invoices> <invoiceDate>1/4/98</invoiceDate> <product> <PriceUnit>300</PriceUnit> <Ordered>4</Ordered> </product> <product> <PriceUnit>6000</PriceUnit> <Ordered>1</Ordered> </product> </invoices> <invoices> <invoiceDate>03/5/99</invoiceDate> <product> <PriceUnit>549</PriceUnit> <Ordered>1</Ordered> </product> <product> <PriceUnit>320</PriceUnit> <Ordered>2</Ordered> </product> </invoices> </customer> <customer> <clientname>Morris</clientname> <invoices> <invoiceDate>1/1/00</invoiceDate> <product> <PriceUnit>59</PriceUnit> <Ordered>3</Ordered> </product> <product> <PriceUnit>55</PriceUnit> <Ordered>1</Ordered> </product> </invoices> <invoices> <invoiceDate>11/1/01</invoiceDate> <product> <PriceUnit>10</PriceUnit> <Ordered>2</Ordered> </product> <product> <PriceUnit>54</PriceUnit> <Ordered>1</Ordered> </product> </invoices> <invoices> <invoiceDate>03/2/01</invoiceDate> <product> <PriceUnit>30</PriceUnit> <Ordered>1</Ordered> </product> <product> <PriceUnit>299</PriceUnit> <Ordered>1</Ordered> </product> </invoices></customer></customers>XSLTSHEET<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="customers"><html><head><h1>CUSTOMER REFERENCE</h1></head><body bgcolor="#DAF52C"> <table border="1"><tr><th width="50">NAME</th><th width="50">INVOICE DATE</th><th width="50">PRODUCT UNIT</th><th width="50">ORDERED </th><th width="50">PRODUCT UNIT</th><th width="50">ORDERED </th><th width="50">INVOICE DATE</th><th width="50">PRODUCT UNIT</th><th width="50">ORDERED </th><th width="50">PRODUCT UNIT</th><th width="50">ORDERED </th><th width="50">INVOICE DATE</th><th width="50">PRODUCT UNIT</th><th width="50">ORDERED </th><th width="50">PRODUCT UNIT</th><th width="50">ORDERED </th><th width="50">INVOICE TOTAL</th> </tr> <xsl:for-each select="customer"> <tr> <td><xsl:value-of select="clientname"/></td> <xsl:for-each select="invoices"> <td><xsl:value-of select="invoiceDate"/></td> <xsl:for-each select="product"> <td><xsl:value-of select="PriceUnit"/></td> <td><xsl:value-of select="Ordered"/></td> </xsl:for-each> </xsl:for-each> </tr> </xsl:for-each> </table> </body> </html></xsl:template></xsl:stylesheet>\[/code\]