title: for loop and use the value
body: <p>I've the below line in XML.</p>
  
  <pre><code>&lt;tb class="3"&gt;
      &lt;tr&gt;
        &lt;td&gt;
          &lt;b&gt;English words &lt;/b&gt;
        &lt;/td&gt;
        &lt;td&gt;
          &lt;b&gt;Arabic &lt;/b&gt;
        &lt;/td&gt;
        &lt;td al="r"&gt;
          &lt;b&gt;Arabic&lt;/b&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;bear &lt;/td&gt;
        &lt;td&gt;ḍam&lt;/td&gt;
        &lt;td al="r"&gt;new&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tb&gt;
  </code></pre>
  
  <p>Here is my xslt.</p>
  
  <pre><code>&lt;xsl:template name="table" match="tb"&gt;
      &lt;table class="frame-all"&gt;
          &lt;xsl:call-template name="cols"/&gt;
          &lt;xsl:apply-templates/&gt;
      &lt;/table&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template name="cols"&gt;
      &lt;xsl:variable name="numbr" select="number(./@class)"/&gt;
      &lt;xsl:variable name="colcnt" select="format-number(100 div $numbr,'##.#')"/&gt;
      &lt;colgroup&gt;
          &lt;!-- I want the condition here--&gt;
      &lt;/colgroup&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>This gives me output of <code>33.3</code>. And I want to create 3 cols(the class attribute value). And for each <code>col</code> the name should be increment value. as below.</p>
  
  <pre><code>&lt;col name="1" width="33.3"/&gt;
  &lt;col name="2" width="33.3"/&gt;
  &lt;col name="3" width="33.3"/&gt;
  </code></pre>
  
  <p>please let me know, how can i get the above result.</p>
  
  <p>Thanks</p>