title: XSLT 1.0 how to sum values with commas using sum() - walking in xpath
body: <p>I have an XSLT 1.0 transformation to write and I am not finding online good solutions for my problem. I have the following XML example: </p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  
      &lt;MainDoc&gt;
      &lt;node1&gt;
              &lt;node2&gt;
                      &lt;User&gt;jsmith&lt;/User&gt;
                      &lt;Amount&gt;1,23&lt;/Amount&gt;
              &lt;/node2&gt;
              &lt;node2&gt;
                      &lt;User&gt;abrown&lt;/User&gt;
                      &lt;Amount&gt;4,56&lt;/Amount&gt;
              &lt;/node2&gt;
      &lt;/node1&gt;
  </code></pre>
  
  <p></p>
  
  <p>As you can see the sum function would not work due to the comma. What I need is to sum all the Amount values, i.e. 1,23 + 4,56 + etc... </p>
  
  <p>I tried various solutions without any success. Mostly I found basic examples but nothing like this case.</p>
  
  <p>The problem is that I would like a transformation to call from the XSLT code, something like:</p>
  
  <pre><code>    &lt;xsl:call-template name="sumAll"&gt;
          &lt;xsl:with-param name="node" select="/MainDoc/node1/node2/Amount"/&gt; 
      &lt;/xsl:call-template&gt;
  </code></pre>
  
  <p>So that, it will sum all the value of "Amount" in the /MainDoc/node1/node2 path. </p>
  
  <p>Any help is appreciated</p>