2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 <!-- ********************************************************************
6 $Id: division.xsl 8421 2009-05-04 07:49:49Z bobstayton $
7 ********************************************************************
9 This file is part of the XSL DocBook Stylesheet distribution.
10 See ../README or http://docbook.sf.net/release/xsl/current/ for
11 copyright and other information.
13 ******************************************************************** -->
15 <!-- ==================================================================== -->
17 <xsl:template match="set">
18 <xsl:call-template name="id.warning"/>
21 <xsl:apply-templates select="." mode="common.html.attributes"/>
22 <xsl:call-template name="dir">
23 <xsl:with-param name="inherit" select="1"/>
25 <xsl:call-template name="language.attribute"/>
26 <xsl:if test="$generate.id.attributes != 0">
27 <xsl:attribute name="id">
28 <xsl:call-template name="object.id"/>
32 <xsl:call-template name="set.titlepage"/>
34 <xsl:variable name="toc.params">
35 <xsl:call-template name="find.path.params">
36 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
40 <xsl:call-template name="make.lots">
41 <xsl:with-param name="toc.params" select="$toc.params"/>
42 <xsl:with-param name="toc">
43 <xsl:call-template name="set.toc">
44 <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
49 <xsl:apply-templates/>
53 <xsl:template match="set/setinfo"></xsl:template>
54 <xsl:template match="set/title"></xsl:template>
55 <xsl:template match="set/titleabbrev"></xsl:template>
56 <xsl:template match="set/subtitle"></xsl:template>
58 <!-- ==================================================================== -->
60 <xsl:template match="book">
61 <xsl:call-template name="id.warning"/>
64 <xsl:apply-templates select="." mode="common.html.attributes"/>
65 <xsl:if test="$generate.id.attributes != 0">
66 <xsl:attribute name="id">
67 <xsl:call-template name="object.id"/>
71 <xsl:call-template name="book.titlepage"/>
73 <xsl:apply-templates select="dedication" mode="dedication"/>
74 <xsl:apply-templates select="acknowledgements" mode="acknowledgements"/>
76 <xsl:variable name="toc.params">
77 <xsl:call-template name="find.path.params">
78 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
82 <xsl:call-template name="make.lots">
83 <xsl:with-param name="toc.params" select="$toc.params"/>
84 <xsl:with-param name="toc">
85 <xsl:call-template name="division.toc">
86 <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
91 <xsl:apply-templates/>
95 <xsl:template match="book/bookinfo"></xsl:template>
96 <xsl:template match="book/info"></xsl:template>
97 <xsl:template match="book/title"></xsl:template>
98 <xsl:template match="book/titleabbrev"></xsl:template>
99 <xsl:template match="book/subtitle"></xsl:template>
101 <!-- ==================================================================== -->
103 <xsl:template match="part">
104 <xsl:call-template name="id.warning"/>
107 <xsl:apply-templates select="." mode="common.html.attributes"/>
108 <xsl:if test="$generate.id.attributes != 0">
109 <xsl:attribute name="id">
110 <xsl:call-template name="object.id"/>
114 <xsl:call-template name="part.titlepage"/>
116 <xsl:variable name="toc.params">
117 <xsl:call-template name="find.path.params">
118 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
121 <xsl:if test="not(partintro) and contains($toc.params, 'toc')">
122 <xsl:call-template name="division.toc"/>
124 <xsl:apply-templates/>
128 <xsl:template match="part" mode="make.part.toc">
129 <xsl:call-template name="division.toc"/>
132 <xsl:template match="reference" mode="make.part.toc">
133 <xsl:call-template name="division.toc"/>
136 <xsl:template match="part/docinfo"></xsl:template>
137 <xsl:template match="part/partinfo"></xsl:template>
138 <xsl:template match="part/info"></xsl:template>
139 <xsl:template match="part/title"></xsl:template>
140 <xsl:template match="part/titleabbrev"></xsl:template>
141 <xsl:template match="part/subtitle"></xsl:template>
143 <xsl:template match="partintro">
144 <xsl:call-template name="id.warning"/>
147 <xsl:call-template name="common.html.attributes"/>
148 <xsl:if test="$generate.id.attributes != 0">
149 <xsl:attribute name="id">
150 <xsl:call-template name="object.id"/>
154 <xsl:call-template name="partintro.titlepage"/>
155 <xsl:apply-templates/>
157 <xsl:variable name="toc.params">
158 <xsl:call-template name="find.path.params">
159 <xsl:with-param name="node" select="parent::*"/>
160 <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
163 <xsl:if test="contains($toc.params, 'toc')">
164 <!-- not ancestor::part because partintro appears in reference -->
165 <xsl:apply-templates select="parent::*" mode="make.part.toc"/>
167 <xsl:call-template name="process.footnotes"/>
171 <xsl:template match="partintro/title"></xsl:template>
172 <xsl:template match="partintro/titleabbrev"></xsl:template>
173 <xsl:template match="partintro/subtitle"></xsl:template>
175 <xsl:template match="partintro/title" mode="partintro.title.mode">
177 <xsl:apply-templates/>
181 <xsl:template match="partintro/subtitle" mode="partintro.title.mode">
183 <i><xsl:apply-templates/></i>
187 <!-- ==================================================================== -->
189 <xsl:template match="book" mode="division.number">
190 <xsl:number from="set" count="book" format="1."/>
193 <xsl:template match="part" mode="division.number">
194 <xsl:number from="book" count="part" format="I."/>
197 <!-- ==================================================================== -->
199 <xsl:template name="division.title">
200 <xsl:param name="node" select="."/>
203 <xsl:attribute name="class">title</xsl:attribute>
204 <xsl:if test="$generate.id.attributes = 0">
205 <xsl:call-template name="anchor">
206 <xsl:with-param name="node" select="$node"/>
207 <xsl:with-param name="conditional" select="0"/>
210 <xsl:apply-templates select="$node" mode="object.title.markup">
211 <xsl:with-param name="allow-anchors" select="1"/>
212 </xsl:apply-templates>