]> granicus.if.org Git - docbook-dsssl/commitdiff
Added component.label.includes.part.label parameter to appendices and
authorBob Stayton <bobs@sagehill.net>
Thu, 26 Aug 2004 18:30:10 +0000 (18:30 +0000)
committerBob Stayton <bobs@sagehill.net>
Thu, 26 Aug 2004 18:30:10 +0000 (18:30 +0000)
other component elements.

xsl/common/labels.xsl

index 960d0f1ed56b01ebe6405e1d825a5db9931953b4..3b0fe27f6b13c456c661afc5e2653acd7f4092df 100644 (file)
@@ -70,6 +70,18 @@ element label.</para>
       <xsl:value-of select="@label"/>
     </xsl:when>
     <xsl:when test="$preface.autolabel != 0">
+      <xsl:if test="$component.label.includes.part.label != 0 and
+                      ancestor::part">
+        <xsl:variable name="part.label">
+          <xsl:apply-templates select="ancestor::part" 
+                               mode="label.markup"/>
+        </xsl:variable>
+        <xsl:if test="$part.label != ''">
+          <xsl:value-of select="$part.label"/>
+          <xsl:apply-templates select="ancestor::part" 
+                               mode="intralabel.punctuation"/>
+        </xsl:if>
+      </xsl:if>
       <xsl:choose>
         <xsl:when test="$label.from.part != 0 and ancestor::part">
           <xsl:number from="part" count="preface" format="1" level="any"/>
@@ -88,20 +100,20 @@ element label.</para>
       <xsl:value-of select="@label"/>
     </xsl:when>
     <xsl:when test="$chapter.autolabel != 0">
+      <xsl:if test="$component.label.includes.part.label != 0 and
+                      ancestor::part">
+        <xsl:variable name="part.label">
+          <xsl:apply-templates select="ancestor::part" 
+                               mode="label.markup"/>
+        </xsl:variable>
+        <xsl:if test="$part.label != ''">
+          <xsl:value-of select="$part.label"/>
+          <xsl:apply-templates select="ancestor::part" 
+                               mode="intralabel.punctuation"/>
+        </xsl:if>
+      </xsl:if>
       <xsl:choose>
         <xsl:when test="$label.from.part != 0 and ancestor::part">
-          <xsl:if test="$component.label.includes.part.label != 0 and
-                          ancestor::part">
-            <xsl:variable name="part.label">
-              <xsl:apply-templates select="ancestor::part" 
-                                   mode="label.markup"/>
-            </xsl:variable>
-            <xsl:if test="$part.label != ''">
-              <xsl:value-of select="$part.label"/>
-              <xsl:apply-templates select="ancestor::part" 
-                                   mode="intralabel.punctuation"/>
-            </xsl:if>
-          </xsl:if>
           <xsl:number from="part" count="chapter" format="1" level="any"/>
         </xsl:when>
         <xsl:otherwise>
@@ -118,6 +130,18 @@ element label.</para>
       <xsl:value-of select="@label"/>
     </xsl:when>
     <xsl:when test="$appendix.autolabel != 0">
+      <xsl:if test="$component.label.includes.part.label != 0 and
+                      ancestor::part">
+        <xsl:variable name="part.label">
+          <xsl:apply-templates select="ancestor::part" 
+                               mode="label.markup"/>
+        </xsl:variable>
+        <xsl:if test="$part.label != ''">
+          <xsl:value-of select="$part.label"/>
+          <xsl:apply-templates select="ancestor::part" 
+                               mode="intralabel.punctuation"/>
+        </xsl:if>
+      </xsl:if>
       <xsl:choose>
         <xsl:when test="$label.from.part != 0 and ancestor::part">
           <xsl:number from="part" count="appendix" format="A" level="any"/>