> It works, but it's not smart and far from beautiful. There is
> a better way
> to do it, isn't it? :-)
<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>
Jarno
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|