OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: Re: DOCBOOK: Help - Reseting the chapter numbering

[Follow-ups to docbook-apps, please.]

/ Stéphane Bline <sbline@apsydev.com> was heard to say:
| I had a look at the stylesheets but could not spot the XSL construct that
| would allow me to do that.
| Can anybody help ?

Redefine the template that numbers chapters. This will do what you want:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

<xsl:import href="../html/docbook.xsl"/>

<xsl:template match="chapter" mode="label.content">
  <xsl:param name="punct">.</xsl:param>
    <xsl:when test="@label">
      <xsl:value-of select="@label"/>
      <xsl:value-of select="$punct"/>
    <xsl:when test="$chapter.autolabel != 0">
      <xsl:number from="book|part" count="chapter" format="1" level="any"/>
      <xsl:value-of select="$punct"/>


                                        Be seeing you,

Norman Walsh <ndw@nwalsh.com>      | He that overvalues himself will
http://www.oasis-open.org/docbook/ | undervalue others, and he that
Chair, DocBook Technical Committee | undervalues others will oppress
                                   | them.--Dr. Johnson

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC