1<?xml version='1.0'?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3                version='1.0'>
4
5<!-- ********************************************************************
6     $Id$
7     ********************************************************************
8
9     This file is part of the XSL DocBook Stylesheet distribution.
10     See /README or http://nwalsh.com/docbook/xsl/ for copyright
11     and other information.
12
13     ******************************************************************** -->
14
15<!-- ==================================================================== -->
16
17<xsl:template match="set">
18  <xsl:variable name="id">
19    <xsl:call-template name="object.id"/>
20  </xsl:variable>
21
22  <div class="{name(.)}" id="{$id}">
23    <xsl:call-template name="set.titlepage"/>
24    <xsl:if test="$generate.set.toc != '0'">
25      <xsl:call-template name="set.toc"/>
26    </xsl:if>
27    <xsl:apply-templates/>
28  </div>
29</xsl:template>
30
31<xsl:template match="set/setinfo"></xsl:template>
32<xsl:template match="set/title"></xsl:template>
33<xsl:template match="set/titleabbrev"></xsl:template>
34<xsl:template match="set/subtitle"></xsl:template>
35
36<!-- ==================================================================== -->
37
38<xsl:template match="book">
39  <xsl:variable name="id">
40    <xsl:call-template name="object.id"/>
41  </xsl:variable>
42
43  <div class="{name(.)}" id="{$id}">
44    <xsl:call-template name="book.titlepage"/>
45    <xsl:apply-templates select="dedication" mode="dedication"/>
46    <xsl:if test="$generate.book.toc != '0'">
47      <xsl:call-template name="division.toc"/>
48    </xsl:if>
49    <xsl:apply-templates/>
50  </div>
51</xsl:template>
52
53<xsl:template match="book/bookinfo"></xsl:template>
54<xsl:template match="book/title"></xsl:template>
55<xsl:template match="book/titleabbrev"></xsl:template>
56<xsl:template match="book/subtitle"></xsl:template>
57
58<!-- ==================================================================== -->
59
60<xsl:template match="part">
61  <xsl:variable name="id">
62    <xsl:call-template name="object.id"/>
63  </xsl:variable>
64
65  <div class="{name(.)}" id="{$id}">
66    <xsl:call-template name="part.titlepage"/>
67    <xsl:if test="not(partintro) and $generate.part.toc != '0'">
68      <xsl:call-template name="division.toc"/>
69    </xsl:if>
70    <xsl:apply-templates/>
71  </div>
72</xsl:template>
73
74<xsl:template match="part" mode="make.part.toc">
75  <xsl:call-template name="division.toc"/>
76</xsl:template>
77
78<xsl:template match="reference" mode="make.part.toc">
79  <xsl:call-template name="division.toc"/>
80</xsl:template>
81
82<xsl:template match="part/docinfo"></xsl:template>
83<xsl:template match="part/partinfo"></xsl:template>
84<xsl:template match="part/title"></xsl:template>
85<xsl:template match="part/titleabbrev"></xsl:template>
86<xsl:template match="part/subtitle"></xsl:template>
87
88<xsl:template match="partintro">
89  <div class="{name(.)}">
90    <xsl:call-template name="partintro.titlepage"/>
91    <xsl:apply-templates/>
92    <xsl:if test="$generate.part.toc != '0'">
93      <!-- not ancestor::part because partintro appears in reference -->
94      <xsl:apply-templates select="parent::*" mode="make.part.toc"/>
95    </xsl:if>
96    <xsl:call-template name="process.footnotes"/>
97  </div>
98</xsl:template>
99
100<xsl:template match="partintro/title"></xsl:template>
101<xsl:template match="partintro/titleabbrev"></xsl:template>
102<xsl:template match="partintro/subtitle"></xsl:template>
103
104<xsl:template match="partintro/title" mode="partintro.title.mode">
105  <xsl:variable name="id">
106    <xsl:call-template name="object.id">
107      <xsl:with-param name="object" select=".."/>
108    </xsl:call-template>
109  </xsl:variable>
110  <h2>
111    <a name="{$id}">
112      <xsl:apply-templates/>
113    </a>
114  </h2>
115</xsl:template>
116
117<xsl:template match="partintro/subtitle" mode="partintro.title.mode">
118  <h3>
119    <i><xsl:apply-templates/></i>
120  </h3>
121</xsl:template>
122
123<!-- ==================================================================== -->
124
125<xsl:template match="book" mode="division.number">
126  <xsl:number from="set" count="book" format="1."/>
127</xsl:template>
128
129<xsl:template match="part" mode="division.number">
130  <xsl:number from="book" count="part" format="I."/>
131</xsl:template>
132
133</xsl:stylesheet>
134
135