]> granicus.if.org Git - docbook-dsssl/commitdiff
Fix bug in labelling figure inside appendix inside article inside book.
authorBob Stayton <bobs@sagehill.net>
Sat, 21 Feb 2009 20:10:14 +0000 (20:10 +0000)
committerBob Stayton <bobs@sagehill.net>
Sat, 21 Feb 2009 20:10:14 +0000 (20:10 +0000)
xsl/common/labels.xsl

index 38b123a3561c590def7c30d1e4b2be09e0034ea4..4cfeae94ec182dc36e31de3a25c6464561ee627a 100644 (file)
@@ -631,9 +631,9 @@ element label.</para>
 
 <xsl:template match="figure|table|example" mode="label.markup">
   <xsl:variable name="pchap"
-                select="ancestor::chapter
+                select="(ancestor::chapter
                         |ancestor::appendix
-                        |ancestor::article[ancestor::book]"/>
+                        |ancestor::article[ancestor::book])[last()]"/>
 
   <xsl:variable name="prefix">
     <xsl:if test="count($pchap) &gt; 0">