]> granicus.if.org Git - docbook-dsssl/commitdiff
Fixed bug in lang selection from ancestor-or-self predicate.
authorBob Stayton <bobs@sagehill.net>
Thu, 18 Nov 2004 17:25:15 +0000 (17:25 +0000)
committerBob Stayton <bobs@sagehill.net>
Thu, 18 Nov 2004 17:25:15 +0000 (17:25 +0000)
xsl/common/l10n.xsl

index a643fdcdf76547649b290a9b60d6fc7c03f54553..4a9657473f45916b2e6c36fd56ebad3f82310a57 100644 (file)
@@ -32,7 +32,7 @@
         <!-- can't do this one step: attributes are unordered! -->
         <xsl:variable name="lang-scope"
                       select="$target/ancestor-or-self::*
-                              [@lang or @xml:lang][last()]"/>
+                              [@lang or @xml:lang][1]"/>
         <xsl:variable name="lang-attr"
                       select="($lang-scope/@lang | $lang-scope/@xml:lang)[1]"/>
         <xsl:choose>
@@ -49,7 +49,7 @@
         <!-- can't do this one step: attributes are unordered! -->
         <xsl:variable name="lang-scope"
                       select="$target/ancestor-or-self::*
-                              [@lang or @xml:lang][last()]"/>
+                              [@lang or @xml:lang][1]"/>
         <xsl:variable name="lang-attr"
                       select="($lang-scope/@lang | $lang-scope/@xml:lang)[1]"/>
 
         <!-- can't do this one step: attributes are unordered! -->
         <xsl:variable name="lang-scope"
                       select="$node/ancestor-or-self::*
-                              [@lang or @xml:lang][last()]"/>
+                              [@lang or @xml:lang][1]"/>
         <xsl:variable name="lang-attr"
                       select="($lang-scope/@lang | $lang-scope/@xml:lang)[1]"/>