title: XSLT 1.0 adding values together from multiple nodes
body: <p>Say I have the following XML</p>
  
  <pre><code>    &lt;A&gt;100&lt;/A&gt;
      &lt;B&gt;200&lt;/B&gt;
      &lt;C&gt;300&lt;/C&gt;
  </code></pre>
  
  <p>and the following XSLT</p>
  
  <pre><code>  &lt;TEST&gt;
      &lt;xsl:value-of select="A + B + C"/&gt;
    &lt;/TEST&gt;
  </code></pre>
  
  <p>It produces the following output</p>
  
  <pre><code>&lt;TEST&gt;600&lt;/TEST&gt;
  </code></pre>
  
  <p>however, when one of the nodes is blank</p>
  
  <pre><code>    &lt;A&gt;&lt;/A&gt;
      &lt;B&gt;200&lt;/B&gt;
      &lt;C&gt;300&lt;/C&gt;
  </code></pre>
  
  <p>I get the following.</p>
  
  <pre><code>&lt;TEST&gt;NaN&lt;/TEST&gt;
  </code></pre>
  
  <p>I only want to add the nodes that are valid numbers. I could do this if xsl allowed me to dynamically replace a variable value by adding to the already existing variable, but even that would be messy. I assume there is an easy way that I'm missing?</p>
  
  <p>I want XSLT 1.0 answers only please.</p>
  
  <p>Thanks!</p>