Author: manuel
Date: 2007-04-17 13:40:35 -0600 (Tue, 17 Apr 2007)
New Revision: 8079
Modified:
branches/new-xsl/xhtml/lfs-sections.xsl
Log:
In preface and chapter pages, output the introductory text, if any, before the
TOC.
Modified: branches/new-xsl/xhtml/lfs-sections.xsl
===================================================================
--- branches/new-xsl/xhtml/lfs-sections.xsl 2007-04-17 18:28:38 UTC (rev
8078)
+++ branches/new-xsl/xhtml/lfs-sections.xsl 2007-04-17 19:40:35 UTC (rev
8079)
@@ -4,12 +4,80 @@
xmlns="http://www.w3.org/1999/xhtml"
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
- 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"/>
+ <!-- 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:
When there is a role attibute, use it as the class value.
Process the SVN keywords found in sect1info as a footnote.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page