title: Easiest way to find the sum of the values in a table in XSL FO
body: <p>I want to sum the number column in a table,, I can't able to understand how can I do that in XSL FO? Can anyone explain me in an easy manner<br>
  Here is my XML input code:</p>
  
  <pre><code>&lt;Studies&gt;
  &lt;Study&gt;
  &lt;name&gt;name1&lt;/name&gt;
  &lt;amount&gt;500&lt;/amount&gt;
  &lt;age&gt;5&lt;/age&gt;
  &lt;/Study&gt;
  &lt;Study&gt;
  &lt;name&gt;name1&lt;/name&gt;
  &lt;amount&gt;500&lt;/amount&gt;
  &lt;age&gt;15&lt;/age&gt;
  &lt;/Study&gt;
  &lt;Study&gt;
  &lt;name&gt;name1&lt;/name&gt;
  &lt;amount&gt;500&lt;/amount&gt;
  &lt;age&gt;20&lt;/age&gt;
  &lt;/Study&gt;
  &lt;/studies&gt;
  </code></pre>
  
  <p>I want the output as, Total:1500(ie., sum the amount)
  see also this related question: <a href="https://stackoverflow.com/questions/7931266/how-can-i-sum-up-some-values-per-page-in-a-table-in-xsl-fo">How can I sum up some values per page in a table in XSL-FO?</a></p>