title: how to increment the int variable in xslt?
body: <p>I'm working on XSLT 1.0 version I have declared an int variable that have to increase when one (if condition) condition in true. 
  So can anyone tell me how to increament that variable or any soluton to that?</p>
  
  <p>e.g. </p>
  
  <pre><code>&lt;xsl:variable name="count" select="-1" /&gt;
  </code></pre>
  
  <p>is a variable declared. Then after that I'm checking one condition</p>
  
  <pre><code>&lt;xsl:if test="$serviceP=$new"&gt;
  
  // if condition id true the i have to increment the variable value (i.e count).
  //and  again have compare that count varibale value in if condition
  
  &lt;xsl:if test="$count &amp;lt; 2"&gt;
  // runs when condition is true.
  &lt;/xsl:if&gt;
  &lt;/xsl:if&gt;
  </code></pre>
  
  <p>thanks in advance.</p>