aboutsummaryrefslogtreecommitdiffstats
path: root/stylesheets/xhtml/lfs-titles.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'stylesheets/xhtml/lfs-titles.xsl')
-rw-r--r--stylesheets/xhtml/lfs-titles.xsl37
1 files changed, 37 insertions, 0 deletions
diff --git a/stylesheets/xhtml/lfs-titles.xsl b/stylesheets/xhtml/lfs-titles.xsl
index db79fdee3..be65a93ce 100644
--- a/stylesheets/xhtml/lfs-titles.xsl
+++ b/stylesheets/xhtml/lfs-titles.xsl
@@ -7,6 +7,8 @@
<xsl:template name="part.titlepage">
<div class="titlepage">
<h1 class="{name(.)}">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ <xsl:text>. </xsl:text>
<xsl:value-of select="title"/>
</h1>
</div>
@@ -15,6 +17,8 @@
<xsl:template name="chapter.titlepage">
<div class="titlepage">
<h1 class="{name(.)}">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ <xsl:text>. </xsl:text>
<xsl:value-of select="title"/>
</h1>
</div>
@@ -28,6 +32,16 @@
</div>
</xsl:template>
+ <xsl:template name="appendix.titlepage">
+ <div class="titlepage">
+ <h1 class="{name(.)}">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ <xsl:text>. </xsl:text>
+ <xsl:value-of select="title"/>
+ </h1>
+ </div>
+ </xsl:template>
+
<xsl:template name="sect1.titlepage">
<xsl:choose>
<!-- I should find a better test -->
@@ -37,6 +51,8 @@
<a id="{@id}" name="{@id}"/>
</xsl:if>
<h2 class="{name(.)}">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ <xsl:text>. </xsl:text>
<xsl:value-of select="title"/>
</h2>
</div>
@@ -44,6 +60,8 @@
<xsl:otherwise>
<div class="titlepage">
<h1 class="{name(.)}">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ <xsl:text>. </xsl:text>
<xsl:value-of select="title"/>
</h1>
</div>
@@ -60,6 +78,8 @@
<a id="{@id}" name="{@id}"/>
</xsl:if>
<h2 class="{name(.)}">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ <xsl:text>. </xsl:text>
<xsl:value-of select="title"/>
</h2>
</div>
@@ -75,4 +95,21 @@
</div>
</xsl:template>
+ <!-- Added the role param for proper punctuation in xref calls. -->
+ <xsl:template match="*" mode="insert.title.markup">
+ <xsl:param name="purpose"/>
+ <xsl:param name="xrefstyle"/>
+ <xsl:param name="title"/>
+ <xsl:param name="role"/>
+ <xsl:choose>
+ <xsl:when test="$purpose = 'xref' and titleabbrev">
+ <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$title"/>
+ <xsl:value-of select="$role"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
</xsl:stylesheet>