|
@@ -4,12 +4,80 @@
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
version="1.0">
|
|
version="1.0">
|
|
|
|
|
|
- <!-- This stylesheet controls how sections are handled -->
|
|
|
|
|
|
+ <!-- This stylesheet controls how preface, chapter, and sections are handled -->
|
|
|
|
|
|
<!-- Chunk the first top-level section? 1 = yes, 0 = no
|
|
<!-- Chunk the first top-level section? 1 = yes, 0 = no
|
|
- If chapters TOC are generated, this must be 1. -->
|
|
|
|
|
|
+ If preface and chapters TOC are generated, this must be 1. -->
|
|
<xsl:param name="chunk.first.sections" select="1"/>
|
|
<xsl:param name="chunk.first.sections" select="1"/>
|
|
|
|
|
|
|
|
+ <!-- preface:
|
|
|
|
+ Process the child elemements before generating the TOC -->
|
|
|
|
+ <!-- The original template is in {docbook-xsl}/xhtml/components.xsl -->
|
|
|
|
+ <xsl:template match="preface">
|
|
|
|
+ <xsl:call-template name="id.warning"/>
|
|
|
|
+ <div>
|
|
|
|
+ <xsl:apply-templates select="." mode="class.attribute"/>
|
|
|
|
+ <xsl:call-template name="dir">
|
|
|
|
+ <xsl:with-param name="inherit" select="1"/>
|
|
|
|
+ </xsl:call-template>
|
|
|
|
+ <xsl:call-template name="language.attribute"/>
|
|
|
|
+ <xsl:if test="$generate.id.attributes != 0">
|
|
|
|
+ <xsl:attribute name="id">
|
|
|
|
+ <xsl:call-template name="object.id"/>
|
|
|
|
+ </xsl:attribute>
|
|
|
|
+ </xsl:if>
|
|
|
|
+ <xsl:call-template name="component.separator"/>
|
|
|
|
+ <xsl:call-template name="preface.titlepage"/>
|
|
|
|
+ <xsl:variable name="toc.params">
|
|
|
|
+ <xsl:call-template name="find.path.params">
|
|
|
|
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
|
|
|
|
+ </xsl:call-template>
|
|
|
|
+ </xsl:variable>
|
|
|
|
+ <xsl:apply-templates/>
|
|
|
|
+ <xsl:if test="contains($toc.params, 'toc')">
|
|
|
|
+ <xsl:call-template name="component.toc">
|
|
|
|
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
|
|
|
|
+ </xsl:call-template>
|
|
|
|
+ <xsl:call-template name="component.toc.separator"/>
|
|
|
|
+ </xsl:if>
|
|
|
|
+ <xsl:call-template name="process.footnotes"/>
|
|
|
|
+ </div>
|
|
|
|
+ </xsl:template>
|
|
|
|
+
|
|
|
|
+ <!-- chapter:
|
|
|
|
+ Process the child elemements before generating the TOC -->
|
|
|
|
+ <!-- The original template is in {docbook-xsl}/xhtml/components.xsl -->
|
|
|
|
+ <xsl:template match="chapter">
|
|
|
|
+ <xsl:call-template name="id.warning"/>
|
|
|
|
+ <div>
|
|
|
|
+ <xsl:apply-templates select="." mode="class.attribute"/>
|
|
|
|
+ <xsl:call-template name="dir">
|
|
|
|
+ <xsl:with-param name="inherit" select="1"/>
|
|
|
|
+ </xsl:call-template>
|
|
|
|
+ <xsl:call-template name="language.attribute"/>
|
|
|
|
+ <xsl:if test="$generate.id.attributes != 0">
|
|
|
|
+ <xsl:attribute name="id">
|
|
|
|
+ <xsl:call-template name="object.id"/>
|
|
|
|
+ </xsl:attribute>
|
|
|
|
+ </xsl:if>
|
|
|
|
+ <xsl:call-template name="component.separator"/>
|
|
|
|
+ <xsl:call-template name="chapter.titlepage"/>
|
|
|
|
+ <xsl:variable name="toc.params">
|
|
|
|
+ <xsl:call-template name="find.path.params">
|
|
|
|
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
|
|
|
|
+ </xsl:call-template>
|
|
|
|
+ </xsl:variable>
|
|
|
|
+ <xsl:apply-templates/>
|
|
|
|
+ <xsl:if test="contains($toc.params, 'toc')">
|
|
|
|
+ <xsl:call-template name="component.toc">
|
|
|
|
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
|
|
|
|
+ </xsl:call-template>
|
|
|
|
+ <xsl:call-template name="component.toc.separator"/>
|
|
|
|
+ </xsl:if>
|
|
|
|
+ <xsl:call-template name="process.footnotes"/>
|
|
|
|
+ </div>
|
|
|
|
+ </xsl:template>
|
|
|
|
+
|
|
<!-- sect1:
|
|
<!-- sect1:
|
|
When there is a role attibute, use it as the class value.
|
|
When there is a role attibute, use it as the class value.
|
|
Process the SVN keywords found in sect1info as a footnote.
|
|
Process the SVN keywords found in sect1info as a footnote.
|