This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: Customizing chapter title
- From: Bob Stayton <bobs at caldera dot com>
- To: Dennis Grace <dgrace at us dot ibm dot com>, Roel Vanhout <roel at riks dot nl>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Wed, 25 Sep 2002 10:16:32 -0700
- Subject: Re: DOCBOOK-APPS: Customizing chapter title
- References: <OF94A07888.156D9942-ON85256C3F.00518C44@pok.ibm.com>
On Wed, Sep 25, 2002 at 09:57:13AM -0500, Dennis Grace wrote:
>
> You pretty much just want to drop the corrected version into your FO driver
> file. It will override the nl.xml file:
>
> <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
> <l:l10n language="nl">
>
> <l:context name="title-numbered">
> <l:template name="appendix" text="Aanhangsel %n. %t"/>
> <l:template name="chapter" text="%n. %t"/>
> <l:template name="sect1" text="%n. %t"/>
> <l:template name="sect2" text="%n. %t"/>
> <l:template name="sect3" text="%n. %t"/>
> <l:template name="sect4" text="%n. %t"/>
> <l:template name="sect5" text="%n. %t"/>
> <l:template name="section" text="%n. %t"/>
> <l:template name="simplesect" text="%n. %t"/>
> </l:context>
> </l:l10n>
> </l:i18n>
>
Actually, you also need to add this line to your
customization layer to make sure the new values
are loaded into the 'local.l10n.xml' parameter:
<xsl:param name="local.l10n.xml" select="document('')" />
This causes the XSL processor to read the current file
and load its nodes into that parameter, which the
stylesheet will use when selecting gentext.
It's a neat trick.
--
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
Caldera International, Inc. fax: (831) 429-1887
email: bobs@caldera.com
>
> Roel Vanhout
> <roel@riks.nl> To: docbook-apps@lists.oasis-open.org
> cc:
> 09/25/2002 09:30 Subject: DOCBOOK-APPS: Customizing chapter title
> AM
>
>
>
>
>
>
> Hello all,
>
> I'm new to xsl so please forgive me my newbie question :)
> I'm trying to make the chapter title different in the htmlhelp version
> and the pdf version of my document. In the htmlhelp, I'd like to make it
> look like 'Chapter 1. The simulation process', and in the pdf version it
> should look like '1. The simulation process.'. The problem is that the
> word 'Chapter' is in the file with the translations (nl.xml in my case):
>
> <l:context name="title-numbered">
> <l:template name="appendix" text="Aanhangsel %n. %t"/>
> <l:template name="chapter" text="Chapter %n. %t"/>
> <l:template name="sect1" text="%n. %t"/>
> <l:template name="sect2" text="%n. %t"/>
> <l:template name="sect3" text="%n. %t"/>
> <l:template name="sect4" text="%n. %t"/>
> <l:template name="sect5" text="%n. %t"/>
> <l:template name="section" text="%n. %t"/>
> <l:template name="simplesect" text="%n. %t"/>
> </l:context>
>
> Is there a way I can override this part in my fo driver file? Or should
> I call the template in another way in the fo stylesheets? Any hints
> would be appreciated.
>
> cheers,
>
> roel
>
>
>
> #### C.DTF has been removed from this note on September 25 2002 by Dennis
> Grace
>
>
>
>
--
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
Caldera International, Inc. fax: (831) 429-1887
email: bobs@caldera.com