m:gentext
m:gentext — Generate localization-specific text for an element.
Mode:
{http://docbook.org/ns/docbook/modes}gentext
Defined in:
modules/gentext.xsl (2)
Since:
2.0.0
Description
This mode is used to generate text by applying the appropriate locale-specific template, see Chapter 4, Localization. When you apply templates in this mode, there are three parameters you can pass:
group
(required)This identifies the localization group.
key
This identifies the localization key. If not provided, the local name of the context item is used.
content
The content of the element. If not provided, the empty sequence is used.
For example, in the context of a book containing several chapters,
1 |<xsl:apply-templates select="db:chapter[1]" mode="m:gentext">
| <xsl:with-param name="group" select="'title'"/>
| <xsl:with-param name="content">
| <xsl:apply-templates select="db:chapter[1]/db:info/db:title/node()"/>
5 | </xsl:with-param>
|</xsl:apply-templates>
Would generate something like Chapter 1 The Title
.
Lists are generated with the m:gentext-list
mode.