|
@@ -4,17 +4,26 @@
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
version="1.0">
|
|
version="1.0">
|
|
|
|
|
|
- <xsl:template name="part.titlepage">
|
|
|
|
|
|
+ <!-- REVISED -->
|
|
|
|
+
|
|
|
|
+ <!-- This stylesheet controls the h* xhtml tags used for several titles -->
|
|
|
|
+
|
|
|
|
+ <!-- preface.titlepage:
|
|
|
|
+ Uses h1 and removed a lot of unneeded code.
|
|
|
|
+ No label in preface. -->
|
|
|
|
+ <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
|
|
|
|
+ <xsl:template name="preface.titlepage">
|
|
<div class="titlepage">
|
|
<div class="titlepage">
|
|
<h1 class="{name(.)}">
|
|
<h1 class="{name(.)}">
|
|
- <xsl:apply-templates select="." mode="label.markup"/>
|
|
|
|
- <xsl:text>. </xsl:text>
|
|
|
|
<xsl:value-of select="title"/>
|
|
<xsl:value-of select="title"/>
|
|
</h1>
|
|
</h1>
|
|
</div>
|
|
</div>
|
|
</xsl:template>
|
|
</xsl:template>
|
|
|
|
|
|
- <xsl:template name="chapter.titlepage">
|
|
|
|
|
|
+ <!-- part.titlepage:
|
|
|
|
+ Uses h1 and removed a lot of unneeded code. -->
|
|
|
|
+ <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
|
|
|
|
+ <xsl:template name="part.titlepage">
|
|
<div class="titlepage">
|
|
<div class="titlepage">
|
|
<h1 class="{name(.)}">
|
|
<h1 class="{name(.)}">
|
|
<xsl:apply-templates select="." mode="label.markup"/>
|
|
<xsl:apply-templates select="." mode="label.markup"/>
|
|
@@ -24,15 +33,23 @@
|
|
</div>
|
|
</div>
|
|
</xsl:template>
|
|
</xsl:template>
|
|
|
|
|
|
- <xsl:template name="preface.titlepage">
|
|
|
|
|
|
+ <!-- appendix.titlepage:
|
|
|
|
+ Uses h1 and removed a lot of unneeded code. -->
|
|
|
|
+ <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
|
|
|
|
+ <xsl:template name="appendix.titlepage">
|
|
<div class="titlepage">
|
|
<div class="titlepage">
|
|
<h1 class="{name(.)}">
|
|
<h1 class="{name(.)}">
|
|
|
|
+ <xsl:apply-templates select="." mode="label.markup"/>
|
|
|
|
+ <xsl:text>. </xsl:text>
|
|
<xsl:value-of select="title"/>
|
|
<xsl:value-of select="title"/>
|
|
</h1>
|
|
</h1>
|
|
</div>
|
|
</div>
|
|
</xsl:template>
|
|
</xsl:template>
|
|
|
|
|
|
- <xsl:template name="appendix.titlepage">
|
|
|
|
|
|
+ <!-- chapter.titlepage:
|
|
|
|
+ Uses h1 and removed a lot of unneeded code. -->
|
|
|
|
+ <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
|
|
|
|
+ <xsl:template name="chapter.titlepage">
|
|
<div class="titlepage">
|
|
<div class="titlepage">
|
|
<h1 class="{name(.)}">
|
|
<h1 class="{name(.)}">
|
|
<xsl:apply-templates select="." mode="label.markup"/>
|
|
<xsl:apply-templates select="." mode="label.markup"/>
|
|
@@ -42,9 +59,13 @@
|
|
</div>
|
|
</div>
|
|
</xsl:template>
|
|
</xsl:template>
|
|
|
|
|
|
|
|
+ <!-- sect1.titlepage:
|
|
|
|
+ Uses h1 except for the first section, and removed a lot of unneeded code. -->
|
|
|
|
+ <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
|
|
<xsl:template name="sect1.titlepage">
|
|
<xsl:template name="sect1.titlepage">
|
|
<xsl:choose>
|
|
<xsl:choose>
|
|
- <!-- I should find a better test -->
|
|
|
|
|
|
+ <!-- I should find a better test, but if chapter TOC is readded
|
|
|
|
+ h1 will be used always, thus no need to worry for now. -->
|
|
<xsl:when test="position() = 4">
|
|
<xsl:when test="position() = 4">
|
|
<div class="titlepage">
|
|
<div class="titlepage">
|
|
<xsl:if test="@id">
|
|
<xsl:if test="@id">
|
|
@@ -69,6 +90,11 @@
|
|
</xsl:choose>
|
|
</xsl:choose>
|
|
</xsl:template>
|
|
</xsl:template>
|
|
|
|
|
|
|
|
+ <!-- sect2.titlepage:
|
|
|
|
+ Uses h2 and removed a lot of unneeded code.
|
|
|
|
+ Skip empty titles.
|
|
|
|
+ No label in preface. -->
|
|
|
|
+ <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
|
|
<xsl:template name="sect2.titlepage">
|
|
<xsl:template name="sect2.titlepage">
|
|
<xsl:choose>
|
|
<xsl:choose>
|
|
<xsl:when test="string-length(title) = 0"/>
|
|
<xsl:when test="string-length(title) = 0"/>
|
|
@@ -89,29 +115,26 @@
|
|
</xsl:choose>
|
|
</xsl:choose>
|
|
</xsl:template>
|
|
</xsl:template>
|
|
|
|
|
|
- <xsl:template name="dedication.titlepage">
|
|
|
|
- <div class="titlepage">
|
|
|
|
- <h2 class="{name(.)}">
|
|
|
|
- <xsl:value-of select="title"/>
|
|
|
|
- </h2>
|
|
|
|
- </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>
|
|
|
|
|
|
+ <!-- bridgehead:
|
|
|
|
+ When use always renderas attributes and want the output h* level
|
|
|
|
+ matching the defined sect* level. -->
|
|
|
|
+ <!-- The original template is in {docbook-xsl}/xhtml/sections.xsl -->
|
|
|
|
+ <xsl:template match="bridgehead">
|
|
|
|
+ <xsl:variable name="hlevel">
|
|
|
|
+ <xsl:choose>
|
|
|
|
+ <xsl:when test="@renderas = 'sect1'">1</xsl:when>
|
|
|
|
+ <xsl:when test="@renderas = 'sect2'">2</xsl:when>
|
|
|
|
+ <xsl:when test="@renderas = 'sect3'">3</xsl:when>
|
|
|
|
+ <xsl:when test="@renderas = 'sect4'">4</xsl:when>
|
|
|
|
+ <xsl:when test="@renderas = 'sect5'">5</xsl:when>
|
|
|
|
+ </xsl:choose>
|
|
|
|
+ </xsl:variable>
|
|
|
|
+ <xsl:element name="h{$hlevel}" namespace="http://www.w3.org/1999/xhtml">
|
|
|
|
+ <xsl:call-template name="anchor">
|
|
|
|
+ <xsl:with-param name="conditional" select="0"/>
|
|
|
|
+ </xsl:call-template>
|
|
|
|
+ <xsl:apply-templates/>
|
|
|
|
+ </xsl:element>
|
|
</xsl:template>
|
|
</xsl:template>
|
|
|
|
|
|
</xsl:stylesheet>
|
|
</xsl:stylesheet>
|