I am totally new to XSLT and I need to use it to compute interest flows from a XML document.
Here is the relevant part of the XML document:
What I want to do is to get the sum of the quantities notionalAmount*coupon present in each interestPaymentPeriod node. For instance here, the result expected would be 1.71784*10000+1.86914*10000+1.79553*10000= 53825.1
The tricky part is that I don't know how many interestPaymentPeriod nodes I am going to have. There can be 1 node or 22 of them.
So far I tried to do this with a for-each loop and I have also tried to emulate a while loop with no success.
Here is my XSLT formula with the for-each loop:
It does not work, I dont retrieve any values. Could someone please take a look at it ? I am really new to XSLT, I am just an intern who has to take care of this and I am sorry if there are silly mistakes in my code.