Help needed with computations in XSL / xPATH...

wxdqz

New Member
hi,

i was wondering if someone could help me out with some xml/xsl stuff.

i have this xml file (click here (<!-- m --><a class="postlink" href="http://www.ofeliamateescu.com/alin/TEST/xsl/cap.xml">http://www.ofeliamateescu.com/alin/TEST/xsl/cap.xml</a><!-- m -->)) with some player info, and an xsl file (click here (<!-- m --><a class="postlink" href="http://www.ofeliamateescu.com/alin/TEST/xsl/cap06.xsl">http://www.ofeliamateescu.com/alin/TEST/xsl/cap06.xsl</a><!-- m -->)) that styles the xml file, and contains some comutations, as well.

what i'm trying to do, is to find each player's average salary (i.e. add every value found in between the <peryear> tags, divided by the number of <peryear> nodes), AND then add everything up. the sum would go in the "TOTALS" table, next to the "Payroll" lable (see output (<!-- m --><a class="postlink" href="http://www.ofeliamateescu.com/alin/TEST/xsl/output.jpg">http://www.ofeliamateescu.com/alin/TEST/xsl/output.jpg</a><!-- m -->)).

i've tried everything, and nothing seems to work. if someone could help me out, that would be great. also, if there are any suggestions on how i can clean up my xsl file, that would be much appreciated as well.


thanks!




PS: here is the (zipped) asp file (click here (<!-- m --><a class="postlink" href="http://www.ofeliamateescu.com/alin/TEST/xsl/cap06.rar">http://www.ofeliamateescu.com/alin/TEST/xsl/cap06.rar</a><!-- m -->)) that converts the xml/xsl server-side.
 
Back
Top