]> granicus.if.org Git - docbook-dsssl/commitdiff
Only label.from.part if there actually is a part
authorNorman Walsh <ndw@nwalsh.com>
Mon, 16 Apr 2001 13:00:47 +0000 (13:00 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Mon, 16 Apr 2001 13:00:47 +0000 (13:00 +0000)
xsl/common/labels.xsl

index af85d8faac7dfe99d936768a1bf4d64b578bd843..ee59da22fc88a94a5d8af601bb0777afece2a6a2 100644 (file)
@@ -55,7 +55,7 @@ element label.</para>
     </xsl:when>
     <xsl:when test="$preface.autolabel != 0">
       <xsl:choose>
-        <xsl:when test="$label.from.part != 0">
+        <xsl:when test="$label.from.part != 0 and ancestor::part">
           <xsl:number from="part" count="preface" format="1" level="any"/>
         </xsl:when>
         <xsl:otherwise>
@@ -73,7 +73,7 @@ element label.</para>
     </xsl:when>
     <xsl:when test="$chapter.autolabel != 0">
       <xsl:choose>
-        <xsl:when test="$label.from.part != 0">
+        <xsl:when test="$label.from.part != 0 and ancestor::part">
           <xsl:number from="part" count="chapter" format="1" level="any"/>
         </xsl:when>
         <xsl:otherwise>
@@ -91,7 +91,7 @@ element label.</para>
     </xsl:when>
     <xsl:when test="$appendix.autolabel != 0">
       <xsl:choose>
-        <xsl:when test="$label.from.part != 0">
+        <xsl:when test="$label.from.part != 0 and ancestor::part">
           <xsl:number from="part" count="appendix" format="A" level="any"/>
         </xsl:when>
         <xsl:otherwise>