diff options
Diffstat (limited to 'lib/docbook/docbook-xsl/html/division.xsl')
-rw-r--r-- | lib/docbook/docbook-xsl/html/division.xsl | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/lib/docbook/docbook-xsl/html/division.xsl b/lib/docbook/docbook-xsl/html/division.xsl new file mode 100644 index 000000000..9281df34a --- /dev/null +++ b/lib/docbook/docbook-xsl/html/division.xsl @@ -0,0 +1,134 @@ +<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id: division.xsl,v 1.1 2002/05/15 17:22:30 isberg Exp $
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="set">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <div class="{name(.)}" id="{$id}">
+ <xsl:call-template name="set.titlepage"/>
+ <xsl:if test="$generate.set.toc != '0'">
+ <xsl:call-template name="set.toc"/>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<xsl:template match="set/setinfo"></xsl:template>
+<xsl:template match="set/title"></xsl:template>
+<xsl:template match="set/titleabbrev"></xsl:template>
+<xsl:template match="set/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="book">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <div class="{name(.)}" id="{$id}">
+ <xsl:call-template name="book.titlepage"/>
+ <xsl:apply-templates select="dedication" mode="dedication"/>
+ <xsl:if test="$generate.book.toc != '0'">
+ <xsl:call-template name="division.toc"/>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<xsl:template match="book/bookinfo"></xsl:template>
+<xsl:template match="book/title"></xsl:template>
+<xsl:template match="book/titleabbrev"></xsl:template>
+<xsl:template match="book/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="part">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <div class="{name(.)}" id="{$id}">
+ <xsl:call-template name="part.titlepage"/>
+ <xsl:if test="not(partintro) and $generate.part.toc != '0'">
+ <xsl:call-template name="division.toc"/>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<xsl:template match="part" mode="make.part.toc">
+ <xsl:call-template name="division.toc"/>
+</xsl:template>
+
+<xsl:template match="reference" mode="make.part.toc">
+ <xsl:call-template name="division.toc"/>
+</xsl:template>
+
+<xsl:template match="part/docinfo"></xsl:template>
+<xsl:template match="part/partinfo"></xsl:template>
+<xsl:template match="part/title"></xsl:template>
+<xsl:template match="part/titleabbrev"></xsl:template>
+<xsl:template match="part/subtitle"></xsl:template>
+
+<xsl:template match="partintro">
+ <div class="{name(.)}">
+ <xsl:call-template name="partintro.titlepage"/>
+ <xsl:apply-templates/>
+ <xsl:if test="$generate.part.toc != '0'">
+ <!-- not ancestor::part because partintro appears in reference -->
+ <xsl:apply-templates select="parent::*" mode="make.part.toc"/>
+ </xsl:if>
+ <xsl:call-template name="process.footnotes"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="partintro/title"></xsl:template>
+<xsl:template match="partintro/titleabbrev"></xsl:template>
+<xsl:template match="partintro/subtitle"></xsl:template>
+
+<xsl:template match="partintro/title" mode="partintro.title.mode">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select=".."/>
+ </xsl:call-template>
+ </xsl:variable>
+ <h2>
+ <a name="{$id}">
+ <xsl:apply-templates/>
+ </a>
+ </h2>
+</xsl:template>
+
+<xsl:template match="partintro/subtitle" mode="partintro.title.mode">
+ <h3>
+ <i><xsl:apply-templates/></i>
+ </h3>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="book" mode="division.number">
+ <xsl:number from="set" count="book" format="1."/>
+</xsl:template>
+
+<xsl:template match="part" mode="division.number">
+ <xsl:number from="book" count="part" format="I."/>
+</xsl:template>
+
+</xsl:stylesheet>
+
|