This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: Re[2]: Figure Numbers (DocBook XSL)
- To: docbook at lists dot oasis-open dot org
- Subject: Re: Re[2]: DOCBOOK: Figure Numbers (DocBook XSL)
- From: Norman Walsh <ndw at nwalsh dot com>
- Date: Thu, 23 Mar 2000 08:44:05 -0500
- References: <10003221645.aa01127@mammoth.sco.com>
- Reply-To: docbook at lists dot oasis-open dot org
/ Bob Stayton <bobs@sco.com> was heard to say:
| > From: Dave Makower <davemak@iclick.com>
| >
| > I tried your test case, and you're right: it also works fine for me
| > with XT. However, I altered it slightly and was able to reproduce my
| > symptom. Here's the XML and the resulting HTML.
|
| Your change was to put each figure inside a <section>
| element. The problem here is that Norm's XSL template for
| figure xrefs generates a figure number using
|
| <xsl:number format="1."/>
Ooops! Fixed.
| I suspect Norm has intentions of making that
| a configurable parameter. The policy gets more
Someday. For now it just does {chapter|appendix#}.figure# or simply
a global figure#.
| You can get your example to do what you want by changing
| one line the XSL stylesheet. In common/common.xsl,
| in the template starting with:
|
| <xsl:template match="figure|table|example|equation" mode="label.content">
|
| change this line:
|
| <xsl:number format="1."/>
|
| to:
|
| <xsl:number level="any" from="chapter|article" format="1."/>
|
| or to whatever policy you want to implement.
But don't change it in common/common.xsl! Instead, create a new
stylesheet that includes the base stylesheet and includes an alternate
definition for the template in question.
Be seeing you,
norm
--
Norman Walsh <ndw@nwalsh.com> | Time wounds all heels.
http://www.oasis-open.org/docbook/ |
Chair, DocBook Technical Committee |