summaryrefslogtreecommitdiff
path: root/common/l10n.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'common/l10n.xsl')
-rw-r--r--common/l10n.xsl82
1 files changed, 43 insertions, 39 deletions
diff --git a/common/l10n.xsl b/common/l10n.xsl
index f35a0b6..50d0ab2 100644
--- a/common/l10n.xsl
+++ b/common/l10n.xsl
@@ -5,7 +5,7 @@
version='1.0'>
<!-- ********************************************************************
- $Id: l10n.xsl 8904 2010-09-11 01:56:22Z kosek $
+ $Id: l10n.xsl 9708 2013-01-22 13:41:24Z kosek $
********************************************************************
This file is part of the XSL DocBook Stylesheet distribution.
@@ -508,50 +508,54 @@
|$local.context.node/l:template[@name=$name
and not(@style)])[1]"/>
- <xsl:for-each select="$context.node">
- <xsl:variable name="template.node"
- select="(key('l10n-template-style', concat($context, '#', $name, '#', $xrefstyle))
- |key('l10n-template', concat($context, '#', $name)))[1]"/>
+ <xsl:choose>
+ <xsl:when test="$local.template.node/@text">
+ <xsl:value-of select="$local.template.node/@text"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="$context.node">
+ <xsl:variable name="template.node"
+ select="(key('l10n-template-style', concat($context, '#', $name, '#', $xrefstyle))
+ |key('l10n-template', concat($context, '#', $name)))[1]"/>
- <xsl:choose>
- <xsl:when test="$local.template.node/@text">
- <xsl:value-of select="$local.template.node/@text"/>
- </xsl:when>
- <xsl:when test="$template.node/@text">
- <xsl:value-of select="$template.node/@text"/>
- </xsl:when>
- <xsl:otherwise>
<xsl:choose>
- <xsl:when test="contains($name, '/')">
- <xsl:call-template name="gentext.template">
- <xsl:with-param name="context" select="$context"/>
- <xsl:with-param name="name" select="substring-after($name, '/')"/>
- <xsl:with-param name="origname" select="$origname"/>
- <xsl:with-param name="purpose" select="$purpose"/>
- <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
- <xsl:with-param name="referrer" select="$referrer"/>
- <xsl:with-param name="lang" select="$lang"/>
- <xsl:with-param name="verbose" select="$verbose"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$verbose = 0">
- <!-- silence -->
+ <xsl:when test="$template.node/@text">
+ <xsl:value-of select="$template.node/@text"/>
</xsl:when>
<xsl:otherwise>
- <xsl:message>
- <xsl:text>No template for "</xsl:text>
- <xsl:value-of select="$origname"/>
- <xsl:text>" (or any of its leaves) exists in the context named "</xsl:text>
- <xsl:value-of select="$context"/>
- <xsl:text>" in the "</xsl:text>
- <xsl:value-of select="$lang"/>
- <xsl:text>" localization.</xsl:text>
- </xsl:message>
+ <xsl:choose>
+ <xsl:when test="contains($name, '/')">
+ <xsl:call-template name="gentext.template">
+ <xsl:with-param name="context" select="$context"/>
+ <xsl:with-param name="name" select="substring-after($name, '/')"/>
+ <xsl:with-param name="origname" select="$origname"/>
+ <xsl:with-param name="purpose" select="$purpose"/>
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ <xsl:with-param name="referrer" select="$referrer"/>
+ <xsl:with-param name="lang" select="$lang"/>
+ <xsl:with-param name="verbose" select="$verbose"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$verbose = 0">
+ <!-- silence -->
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>No template for "</xsl:text>
+ <xsl:value-of select="$origname"/>
+ <xsl:text>" (or any of its leaves) exists in the context named "</xsl:text>
+ <xsl:value-of select="$context"/>
+ <xsl:text>" in the "</xsl:text>
+ <xsl:value-of select="$lang"/>
+ <xsl:text>" localization.</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:for-each>
</xsl:for-each>
</xsl:otherwise>