xml - sorting and variables
Hello, it's been a few weeks since my last post, and I have come far since then but have got bogged with the treatment of variables in xsl.
I have xml data that looks like this:
What I am needing is to find the first <record> that has a <Header> of 03, then add all the <Amounts> of the records from after that record to the next point that has a <Header> of 03 again. I have managed this with a non-recursive template, which is fine.
Where I have trouble is when I wish to get a total for all <Amounts> (with Headers =16 or 30) in the file, but this total has to deduct one group of <records> that has a particular <DrCr>. I try to set this total in a template, but I cannot make the total (that I fill to a variable) carry back to my main template.
Perhaps it is a question of persistence? I am unsure how variables persist from "lower" level templates to higher ones.
If anyone has worked on a similar design, I'd be interested to hear how you handled such an issue.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL