]> granicus.if.org Git - docbook-dsssl/commitdiff
Fixed bug when context was lost due to usage of xsl:key
authorJirka Kosek <jirka@kosek.cz>
Sat, 11 Sep 2010 01:56:22 +0000 (01:56 +0000)
committerJirka Kosek <jirka@kosek.cz>
Sat, 11 Sep 2010 01:56:22 +0000 (01:56 +0000)
xsl/common/l10n.xsl

index 0f53b559b0f35643d60329993481aba1bf1ca175..0495870b132f7032bcd430592fe9b1b9e50c2a8d 100644 (file)
@@ -23,8 +23,8 @@
 <xsl:key name="l10n-gentext" match="l:l10n/l:gentext" use="@key"/>
 <xsl:key name="l10n-dingbat" match="l:l10n/l:dingbat" use="@key"/>
 <xsl:key name="l10n-context" match="l:l10n/l:context" use="@name"/>
-<xsl:key name="l10n-template" match="l:l10n/l:context/l:template[not(@style)]" use="@name"/>
-<xsl:key name="l10n-template-style" match="l:l10n/l:context/l:template[@style]" use="concat(@name, '#', @style)"/>
+<xsl:key name="l10n-template" match="l:l10n/l:context/l:template[not(@style)]" use="concat(../@name, '#', @name)"/>
+<xsl:key name="l10n-template-style" match="l:l10n/l:context/l:template[@style]" use="concat(../@name, '#', @name, '#', @style)"/>
 
 <xsl:template name="l10n.language">
   <xsl:param name="target" select="."/>
 
          <xsl:for-each select="$context.node">
            <xsl:variable name="template.node"
-                         select="(key('l10n-template-style', concat($name, '#', $xrefstyle))
-                                  |key('l10n-template', $name))[1]"/>
+                         select="(key('l10n-template-style', concat($context, '#', $name, '#', $xrefstyle))
+                                  |key('l10n-template', concat($context, '#', $name)))[1]"/>
 
            <xsl:choose>
              <xsl:when test="$template.node/@text">
 
          <xsl:for-each select="$context.node">
            <xsl:variable name="template.node"
-                         select="(key('l10n-template-style', concat($name, '#', $xrefstyle))
-                                  |key('l10n-template', $name))[1]"/>
+                         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">