2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5
<!-- ********************************************************************
6
$Id: division.xsl 384406 2005-01-31 00:11:27Z raabe $
7
********************************************************************
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.
13
******************************************************************** -->
15
<!-- ==================================================================== -->
17
<xsl:template match="set">
18
<div class="{name(.)}">
19
<xsl:call-template name="language.attribute"/>
20
<xsl:if test="$generate.id.attributes != 0">
21
<xsl:attribute name="id">
22
<xsl:call-template name="object.id"/>
26
<xsl:call-template name="set.titlepage"/>
28
<xsl:call-template name="make.lots">
29
<xsl:with-param name="toc.params">
30
<xsl:call-template name="find.path.params">
31
<xsl:with-param name="table" select="normalize-space($generate.toc)"/>
34
<xsl:with-param name="toc">
35
<xsl:call-template name="set.toc"/>
39
<xsl:apply-templates/>
43
<xsl:template match="set/setinfo"></xsl:template>
44
<xsl:template match="set/title"></xsl:template>
45
<xsl:template match="set/titleabbrev"></xsl:template>
46
<xsl:template match="set/subtitle"></xsl:template>
48
<!-- ==================================================================== -->
50
<xsl:template match="book">
51
<div class="{name(.)}">
52
<xsl:call-template name="language.attribute"/>
53
<xsl:if test="$generate.id.attributes != 0">
54
<xsl:attribute name="id">
55
<xsl:call-template name="object.id"/>
59
<xsl:call-template name="book.titlepage"/>
61
<xsl:apply-templates select="dedication" mode="dedication"/>
63
<xsl:call-template name="make.lots">
64
<xsl:with-param name="toc.params">
65
<xsl:call-template name="find.path.params">
66
<xsl:with-param name="table" select="normalize-space($generate.toc)"/>
69
<xsl:with-param name="toc">
70
<xsl:call-template name="division.toc"/>
74
<xsl:apply-templates/>
78
<xsl:template match="book/bookinfo"></xsl:template>
79
<xsl:template match="book/title"></xsl:template>
80
<xsl:template match="book/titleabbrev"></xsl:template>
81
<xsl:template match="book/subtitle"></xsl:template>
83
<!-- ==================================================================== -->
85
<xsl:template match="part">
86
<div class="{name(.)}">
87
<xsl:call-template name="language.attribute"/>
88
<xsl:if test="$generate.id.attributes != 0">
89
<xsl:attribute name="id">
90
<xsl:call-template name="object.id"/>
94
<xsl:call-template name="part.titlepage"/>
96
<xsl:variable name="toc.params">
97
<xsl:call-template name="find.path.params">
98
<xsl:with-param name="table" select="normalize-space($generate.toc)"/>
101
<xsl:if test="not(partintro) and contains($toc.params, 'toc')">
102
<xsl:call-template name="division.toc"/>
104
<xsl:apply-templates/>
108
<xsl:template match="part" mode="make.part.toc">
109
<xsl:call-template name="division.toc"/>
112
<xsl:template match="reference" mode="make.part.toc">
113
<xsl:call-template name="division.toc"/>
116
<xsl:template match="part/docinfo"></xsl:template>
117
<xsl:template match="part/partinfo"></xsl:template>
118
<xsl:template match="part/title"></xsl:template>
119
<xsl:template match="part/titleabbrev"></xsl:template>
120
<xsl:template match="part/subtitle"></xsl:template>
122
<xsl:template match="partintro">
123
<div class="{name(.)}">
124
<xsl:call-template name="language.attribute"/>
125
<xsl:if test="$generate.id.attributes != 0">
126
<xsl:attribute name="id">
127
<xsl:call-template name="object.id"/>
131
<xsl:call-template name="partintro.titlepage"/>
132
<xsl:apply-templates/>
134
<xsl:variable name="toc.params">
135
<xsl:call-template name="find.path.params">
136
<xsl:with-param name="node" select="parent::*"/>
137
<xsl:with-param name="table" select="normalize-space($generate.toc)"/>
140
<xsl:if test="contains($toc.params, 'toc')">
141
<!-- not ancestor::part because partintro appears in reference -->
142
<xsl:apply-templates select="parent::*" mode="make.part.toc"/>
144
<xsl:call-template name="process.footnotes"/>
148
<xsl:template match="partintro/title"></xsl:template>
149
<xsl:template match="partintro/titleabbrev"></xsl:template>
150
<xsl:template match="partintro/subtitle"></xsl:template>
152
<xsl:template match="partintro/title" mode="partintro.title.mode">
154
<xsl:apply-templates/>
158
<xsl:template match="partintro/subtitle" mode="partintro.title.mode">
160
<i><xsl:apply-templates/></i>
164
<!-- ==================================================================== -->
166
<xsl:template match="book" mode="division.number">
167
<xsl:number from="set" count="book" format="1."/>
170
<xsl:template match="part" mode="division.number">
171
<xsl:number from="book" count="part" format="I."/>