Subject: Re: not resetting counters in a document tree
From: James Clark <jjc@xxxxxxxxxx>
Date: Wed, 28 Apr 1999 12:27:14 +0700
|
Michel Goossens wrote:
> level="any" gives a
> number that is one too large (as per the spec, it contains "one plus the
> numbers of elements at any level of the document...").
You can either do xsl:number on the chapter parent:
<xsl:for-each select="..">
<xsl:number level="any" count="chapter" format="1. "/>
</xsl:for-each>
or you can subtract one yourself:
<xsl:variable name="n">
<xsl:number level="any" count="chapter"/>
</xsl:variable>
<xsl:number expr="$n - 1" format="1. "/>
James
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|