title: XSL: output of "nested" structures
body: <p>I have an XML document of the following kind:</p>
  
  <pre><code>&lt;item&gt;
    &lt;item&gt;
      &lt;item&gt;
       ... (same elements &lt;item&gt; ... &lt;/item&gt; here) 
      &lt;/item&gt;
    &lt;/item&gt;
  &lt;/item&gt;
  </code></pre>
  
  <p>... and the following XSL-transform:</p>
  
  <pre><code>&lt;xsl:template match="item"&gt;&lt;xsl:text&gt;
  open&lt;/xsl:text&gt;
   &lt;xsl:apply-templates/&gt;&lt;xsl:text&gt;
  close&lt;/xsl:text&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>What I obtain is:</p>
  
  <pre><code>open
  open
  open
  close
  close
  close
  </code></pre>
  
  <p>So I wonder whether it is possible to somehow get an output <em>with indents</em> like this:</p>
  
  <pre><code>open
     open
        open
        close
     close
  close
  </code></pre>
  
  <p>Thanks for your help!</p>
  
  <p>P.S. It should be definitely possible to obtain what I want to by letting output method of the transformation to be HTML. However, I need to make indents "directly" in the text, not using any kind of HTML's lists etc.</p>