m:gentext-list
m:gentext-list — Generate localization-specific list for a sequence.
Mode:
{http://docbook.org/ns/docbook/modes}gentext-list
Defined in:
modules/l10n.xsl
Since:
2.0.0
Description
This mode is used to generate a list with local-specific separators, see Chapter 4, Localization. When you apply templates in this mode, there are two parameters you can pass:
list
(required)A sequence of one or more items.
name
This identifies the localization key. If not provided, the local name of the context item is used.
For example, in the context of an authorgroup
,
1 |<xsl:apply-templates select="." mode="m:gentext-list">
| <xsl:with-param name="list" as="item()+">
| <xsl:apply-templates select="*"/>
| </xsl:with-param>
5 |</xsl:apply-templates>
Would generate different markup depending on the number of authors. For example, in the English localization, it would generate:
- Author Name
for a single author
- Author Name and Second Author
for two authors
- Author Name, Second Author, and Third Author
for three authors
- Author Name, Second Author, Third Author, and Fourth Author
for four authors
And so on.
Generated text not associated with lists is generated with the
m:gentext
mode.