aboutsummaryrefslogtreecommitdiffstats
path: root/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/labels.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'stylesheets/lfs-xsl/docbook-xsl-snapshot/common/labels.xsl')
-rw-r--r--stylesheets/lfs-xsl/docbook-xsl-snapshot/common/labels.xsl21
1 files changed, 20 insertions, 1 deletions
diff --git a/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/labels.xsl b/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/labels.xsl
index 98050d012..38b123a35 100644
--- a/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/labels.xsl
+++ b/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/labels.xsl
@@ -193,12 +193,31 @@ element label.</para>
<xsl:value-of select="@label"/>
</xsl:when>
<xsl:when test="string($reference.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:variable name="format">
<xsl:call-template name="autolabel.format">
<xsl:with-param name="format" select="$reference.autolabel"/>
</xsl:call-template>
</xsl:variable>
- <xsl:number from="book" count="reference" format="{$format}" level="any"/>
+ <xsl:choose>
+ <xsl:when test="$label.from.part != 0 and ancestor::part">
+ <xsl:number from="part" count="reference" format="{$format}" level="any"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:number from="book" count="reference" format="{$format}" level="any"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:template>