Add the Numeric column values and inserting total in XSLT
I am  writing an XSLT script which generates an HTML output as shown below:

    Alice        	0
    Bob	   Maths	74
    	   Science	84
    Mary   Maths	80
    	   Science	90
    	   History	95
    Mark   Maths	70
    Tim		        0

I want to add a total cell for each student and the table should like

    Alice  Total	0
    Bob	   Maths	74
    	   Science	84
    	   Total	158
    Mary   Maths	80
    	   Science	90
    	   History	95
    	   Total	265
    Mark   Maths	70
    	   Total	70
    Tim	   Total	0

Other than that everything works in the script, any ideas how do I do that in the XSLT script?


 
Add the Numeric column values and inserting total in XSLT
===

I am  writing an XSLT script which generates an HTML output as shown below:

    Alice        	0
    Bob	   Maths	74
    	   Science	84
    Mary   Maths	80
    	   Science	90
    	   History	95
    Mark   Maths	70
    Tim		        0

I want to add a total cell for each student and the table should like

    Alice  Total	0
    Bob	   Maths	74
    	   Science	84
    	   Total	158
    Mary   Maths	80
    	   Science	90
    	   History	95
    	   Total	265
    Mark   Maths	70
    	   Total	70
    Tim	   Total	0

Other than that everything works in the script, any ideas how do I do that in the XSLT script?


 