]> granicus.if.org Git - docbook-dsssl/commitdiff
Fixed bug #3598963
authorJirka Kosek <jirka@kosek.cz>
Tue, 22 Jan 2013 13:41:24 +0000 (13:41 +0000)
committerJirka Kosek <jirka@kosek.cz>
Tue, 22 Jan 2013 13:41:24 +0000 (13:41 +0000)
xsl/common/l10n.xsl

index 0495870b132f7032bcd430592fe9b1b9e50c2a8d..c22fa79ca9a85125f7c5977ad3a4480636e22722 100644 (file)
                                |$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>