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.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center