Subject:keeping track of data Author:Steven Matthews Date:01 May 2006 04:40 AM
Hi There,
I am using XSLT to format an XML file called orders.xml
I need to collect together the 'invoices_rec' elements for each customer with the same invoiceNum. I am using a loop but I need to find a way to
save the last invoice number in order to see if it has changed, so that I can compare it with the new invoiceNum.
I am using this variable:
<xsl:variable name="last_invoice_number" select="invoices/invoices_rec/invoiceNum"/>
I am using this test but it does not work:
<!-- Check that invoiceNum has changed -->
<xsl:if test="invoiceNum != $last_invoice_number">
code here
</xsl:if>
Subject:keeping track of data Author:Steven Matthews Date:01 May 2006 02:22 PM
Thanks Ivan,
That really does work ! I spent two hours trying to figure out how to fix it and eventually gave up !
I am a newbie to XSL (as you can tell !), coming from a C/C++ background. It would seem that the logic with XSL is quite different from that in traditional programming languages. I have been trying to use that same programming logic with XSL !
One question, what does this condition actually mean: