Re: [docbook-apps] XSL Appendix titles

From
Bob Stayton <>
Date
2009-03-30T16:44:27+00:00
ID
00a101c9b156$c56b30d0$6400a8c0@pazu
Thread
Re: [docbook-apps] XSL Appendix titles
OK, but just for future reference, here is the scoop on appendix *in* 
article.
The title is generated from a gentext template located in common/en.xml, 
contained in the l:context name="title-numbered" that looks like this:

   <l:template name="article/appendix" text="%n. %t"/>

The gentext template for just name="appendix" looks like this:

   <l:template name="appendix" text="Appendix %n. %t"/>

To add "Appendix" to the appendix in article, you could use the 
local.l10n.xml parameter to customize it to:

   <l:template name="article/appendix" text="Appendix %n. %t"/>

That process is described here:

http://www.sagehill.net/docbookxsl/CustomGentext.html

This "article/appendix" gentext template is the only example in the 
stylesheets that shows how you can specify a lineage on an element to modify 
its gentext output for different contexts.

Bob Stayton
Sagehill Enterprises



----- Original Message ----- 
From: "Richard Tector" <>
To: "Bob Stayton" <>
Cc: <>
Sent: Monday, March 30, 2009 9:15 AM
Subject: Re: [docbook-apps] XSL Appendix titles


> Richard Tector wrote:
>> Processing my article either using xsl/docbook/html/docbook.xsl or going
>> to PDF via XSL-FO produces
>> A: Blah
>> for both the title for the secion AND in the ToC.
>>
>> Perhaps it's because it's an article. I'll go and retry as a book.
>>
>
> As a book containing an article followed by the appendix, it is
> processed as Appendix A: Blah
>
> This will do fine, and has the advantage that the appendix starts on a
> new page. Thanks anyway.
>
>
> Richard
>