title: xslt self match child node but with different html div id
body: <p>I am transforming xml to html using saxon.</p>
  
  <p>I have xml like this:</p>
  
  <pre><code>&lt;abc&gt; 
    level-1 
     &lt;abc&gt; 
      level-2
        &lt;abc&gt;
           level-x 
        &lt;/abc&gt; 
     &lt;/abc&gt; 
   &lt;/abc&gt;
  </code></pre>
  
  <p>in html i want to do something like this:</p>
  
  <pre><code>&lt;div class="abc-1"&gt;
   level-1
      &lt;div class="abc-2"&gt;
       level-2
         &lt;div class="abc-3"&gt;
           level-3
          &lt;/div&gt; 
      &lt;/div&gt; 
  &lt;/div&gt;
  </code></pre>
  
  <p>Now in my xslt i want to do somthing like following, so i can have different class names in child node with same node match, but not sure what could be good and optimized way to do this in xslt.</p>
  
  <pre><code>&lt;xsl:template match = "abc"&gt;
    &lt;div class="abc&lt;x&gt;"&gt;
       &lt;xsl:apply-templates /&gt;
    &lt;/div&gt;
  &lt;/xsl:template&gt;
  </code></pre>