[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: Help - Reseting the chapter numbering
> From: =?iso-8859-1?Q?St=E9phane_Bline?= <sbline@apsydev.com> > > I am using the latest DocBook XML distribution and the > latest version Norm's XSL stylesheets. Apparently the > chapter numbering is not being reset in a Part and I need > that. I had a look at the stylesheets but could not spot > the XSL construct that would allow me to do that. Can > anybody help ? In the stylesheet directory, the file common/common.xsl has this template that assembles the numbers for chapters: <xsl:template match="chapter" mode="label.content"> <xsl:param name="punct">.</xsl:param> <xsl:choose> <xsl:when test="@label"> <xsl:value-of select="@label"/> <xsl:value-of select="$punct"/> </xsl:when> <xsl:when test="$chapter.autolabel != 0"> <xsl:number from="book" count="chapter" format="1" level="any"/> <xsl:value-of select="$punct"/> </xsl:when> </xsl:choose> </xsl:template> In the 9th line of the template, change: from="book" to from="part" That way it starts counting from when a part element starts rather than from when a book element starts. You might want to make this change in a customization layer rather than altering the distribution file. I can explain that process if you need assistance. You might also suggest to Norm that this is an item that could be parameterized so you don't have to rewrite the template. bobs Bob Stayton 400 Encinal Street Publications Architect Santa Cruz, CA 95060 Technical Publications voice: (831) 427-7796 The Santa Cruz Operation, Inc. fax: (831) 429-1887 email: bobs@sco.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC