title: XSLT add number to variable
body: <p>i have XSLT, where i have variables (DPH5 and DPH22). On start the variables are null.
  After that i add tu this variables sum od DPH.
  This is part of my XML:</p>
  
  <pre><code>&lt;TeloTR&gt;
     &lt;TYP_CASTKY&gt;DP&lt;/TYP_CASTKY&gt;
     &lt;PROCENTO_DANE&gt;21.0&lt;/PROCENTO_DANE&gt;
     &lt;CASTKA&gt;100.720&lt;/CASTKA&gt;
  &lt;/TeloTR&gt;
  &lt;TeloTR&gt;
     &lt;TYP_CASTKY&gt;DP&lt;/TYP_CASTKY&gt;
     &lt;PROCENTO_DANE&gt;15.0&lt;/PROCENTO_DANE&gt;
     &lt;CASTKA&gt;562.720&lt;/CASTKA&gt;
  &lt;/TeloTR&gt;
  &lt;TeloTR&gt;
     &lt;TYP_CASTKY&gt;DP&lt;/TYP_CASTKY&gt;
     &lt;PROCENTO_DANE&gt;15.0&lt;/PROCENTO_DANE&gt;
     &lt;CASTKA&gt;66375.720&lt;/CASTKA&gt;
  &lt;/TeloTR&gt;
  &lt;TeloTR&gt;
     &lt;TYP_CASTKY&gt;DP&lt;/TYP_CASTKY&gt;
     &lt;PROCENTO_DANE&gt;15.0&lt;/PROCENTO_DANE&gt;
     &lt;CASTKA&gt;845.720&lt;/CASTKA&gt;
  &lt;/TeloTR&gt;
  </code></pre>
  
  <p>This is my variables:</p>
  
  <pre><code>&lt;xsl:variable name="DPH5" select="0" /&gt;
  &lt;xsl:variable name="DPH22" select="0" /&gt;
  </code></pre>
  
  <p>This is part of my code:</p>
  
  <pre><code>&lt;xsl:for-each select="TeloTR"&gt;
      &lt;xsl:if test="TYP_CASTKY='DP'"&gt;
         &lt;xsl:if test="PROCENTO_DANE='15.0'"&gt;
            &lt;xsl:variable name="DPH5" select="$DPH5 + number(@CASTKA) " /&gt;  
         &lt;/xsl:if&gt;
         &lt;xsl:if test="PROCENTO_DANE='21.0'"&gt;
            &lt;xsl:variable name="DPH22" select="$DPH22 + number(@CASTKA) " /&gt;  
         &lt;/xsl:if&gt;                    
      &lt;/xsl:if&gt;
  &lt;/xsl:for-each&gt;
  </code></pre>
  
  <p>But i have this error:</p>
  
  <pre><code>Error:XSLTProcessor::transformToXml() [&lt;a href='xsltprocessor.transformtoxml'&gt;
  xsltprocessor.transformtoxml&lt;/a&gt;]: XSLT-variable: Redefinition of variable 'DPH5'.
  </code></pre>
  
  <p>Have you any ideas how could i add values to variables? Thanks</p>