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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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


Subject: Re: DOCBOOK-APPS: customizing stylesheet with language specific text


On Thu, Dec 12, 2002 at 07:40:25PM +0100, Marko Petersen wrote:
> Hi,
> 
> I have to add some application specific things to the stylesheet and
> I would like to use the internationalization that is used in docbook. I
> need some language specific files containing the text to embed,
> because I don't want to edit the existing ones so that an upgrade to a
> new style is possible without modifications.
> 
> Can anyone tell me how to include this files and how to reference the
> language specific text? I took a look at the different stylesheets but I
> don't understand how these call the language specific text, for example
> for index if no title is set.

If you are using the XSL stylesheets, you can add
localization entries to your customization layer without
touching the distribution files.  See:

  http://www.sagehill.net/xml/docbookxsl/CustomMethods.html#CustomGentext

Entries like this define general text for each language file:

   <l:gentext key="abstract" text="Abstract"/>

The key attribute is the identifier, and the text attribute
is the printable text.  To call the text from an XSL
template, you use the gentext template with the key
parameter specified:

 <xsl:call-template name="gentext">
   <xsl:with-param name="key" select="'abstract'"/>
 </xsl:call-template>

This will return the value of the text attribute,
which is 'Abstract' in this example.

-- 

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887
                                            email: bobs@sco.com


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


Powered by eList eXpress LLC