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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

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


Subject: Re: [docbook] Localization - How to overwrite a single property in all 45 languages


Hi,
I don't know of a way to do it at the gentext template level, but it can be 
done pretty easily at the xsl template level.

To fetch a gentext template, the stylesheet applies templates to the target 
element in mode="object.xref.template", which is to return the value of the 
@text attribute in the gentext l:template element.  In the stock 
stylesheets, there is a single template in that mode with match="*" to 
handle all elements.  It determines the current language, checks for local 
definitions, checks for numbering context, and finally picks the best fit.

Because it is a mode, you can add your own template with match="section" to 
override it.  In your case, something as simple as this should work 
(untested):

<xsl:template match="section" mode="object.xref.template">
  <xsl:text>%t</xsl:text>
</xsl:template>

Since it isn't selective based on language, it should work for all 
languages.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- 
From: "Tobias Anstett [k15t.com]" <tobias@k15t.com>
To: <docbook@lists.oasis-open.org>
Sent: Wednesday, April 15, 2009 4:47 AM
Subject: [docbook] Localization - How to overwrite a single property in all 
45 languages


> Hi,
>
> Does anybody know how to overwrite a gentext value for all 45
> languages? It would be very displeasing to do it manually...
>
> <l:l10n language="XXXXXXXX">
>    <l:context name="xref">
>        <l:template name="section" text="%t"/>
>    </l:context>
> </l:l10n>
>
> Cheers,
> Tobias
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-help@lists.oasis-open.org
>
>
> 



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