Don Bruey You can write a named template that accepts as a parameter 
 the value of your
 $level variable.  Have it create the output you want for a single
 indentation, then call itself recursively for each remaining level.
 Probably you can find some similar things if you dig through the FAQ.
 Something like this:  <xsl:template name="indent">
 	<xsl:param name="level"/>
 	<xsl:if test="$level > 0" >
   		<!-- put your output here for one indentation level -->
 		<xsl:call-template name="indent">
    			<xsl:with-param name="level" 
                       select="$level - 1" />
 		</xsl:call-template>
 	</xsl:if>
 </xsl:template>Jarno Elovirta offers, for indent proportional to depth,   <xsl:template name="toc-indent">
    <xsl:call-template name="indent">
      <xsl:with-param name="level" select="count(ancestor::part)" />
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template name="indent">
    <xsl:param name="level" />
    <xsl:if test="$level">
      <xsl:text>  </xsl:text>
      <xsl:call-template name="indent">
        <xsl:with-param name="level" select="$level - 1" />
      </xsl:call-template>
    </xsl:if>
 </xsl:template>and David Carlisle offers the minimal  <xsl:template name="toc-indent">
   <xsl:for-each select="ancestor::part"> </xsl:for-each>
 </xsl:template>
   |