|
Subject: RE: [xsl] TOC indents in XHTML? From: Jarno.Elovirta@xxxxxxxxx Date: Tue, 27 Nov 2001 16:44:14 +0200 |
> 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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] TOC indents in XHTML?, Don Bruey | Thread | RE: [xsl] TOC indents in XHTML?, Don Bruey |
| RE: [xsl] TOC indents in XHTML?, Don Bruey | Date | Re: [xsl] TOC indents in XHTML?, David Carlisle |
| Month |