Re: [docbook-apps] customize generated text

From
"Cob Rtayton"
Date
2005-01-22T00:01:31+00:00
ID
09bd01c50015$838609c0$6400a8c0@toshiro
Thread
Re: [docbook-apps] customize generated text
You are close.  By using the context="xref", you have changed the generated
text for cross references, but not for the title.  The chapter title is
handled in the contexts with names "title", "title-numbered" and
"title-unnumbered" in the gentext files.

Bob Stayton
Sagehill Enterprises
DocBook Consulting


----- Original Message ----- 
From: "Jacques" <>
To: "docbook-apps" <>
Sent: Thursday, January 20, 2005 12:50 AM
Subject: [docbook-apps] customize generated text

Hello,

I've read with attention the chapter 8 of the Bob's book about
customization methods.

I think I interstood how to change for example the generated text
"Chapter" into "Article", but it doesn't work.

I made my customization layer like that :

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

href="file:/Users/jacques/Applications/eclipse/plugins/com.oxygenxml.
editor_5.0.0/frameworks/docbook/xsl/fo/docbook.xsl"/>
    <xsl:param name="local.l10n.xml" select="document('')"/>
    <l:i8n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
        <l:l10n language="fr">
            <l:context name="xref">
                <l:template name="chapter"
                    text="Article %n: &#8220;%t&#8821;"/>
            </l:context>
            <l:context name="xref-number">
                <l:template name="chapter"
                    text="Article %n: &#8220;%t&#8821;"/>
            </l:context>
            <l:context name="xref-number-and-title">
                <l:template name="chapter"
                    text="Article %n: &#8220;%t&#8821;"/>
            </l:context>
        </l:l10n>
    </l:i8n>
    <xsl:param name="paper.type">A4</xsl:param>
</xsl:stylesheet>

And my docbook file look's like

<book language="fr">
    <title>My title</title>
    <chapter>
        <title>The first article</title>
            <para>blah blah blah</para>
    </chapter>
</book>

My customization layer is called because my result PDF is a A4 page
size, but the word before the chapter title still "Chapitre".

I miss something, but what ?

Thanks in advance,
Jacques
-- 
Il n'y a d'autre enfer pour l'homme que la bêtise ou la méchanceté de ses
semblables.
                               Marquis de Sade