Debian Codegraph @

xslt/docbook/html/db2html-division.xsl

raw
1 <?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
2 <!--
3 This program is free software; you can redistribute it and/or modify it under
4 the terms of the GNU Lesser General Public License as published by the Free
5 Software Foundation; either version 2 of the License, or (at your option) any
6 later version.
7
8 This program is distributed in the hope that it will be useful, but WITHOUT
9 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11 details.
12
13 You should have received a copy of the GNU Lesser General Public License
14 along with this program; see the file COPYING.LGPL. If not, see <http://www.gnu.org/licenses/>.
15 -->
16 <!DOCTYPE xsl:stylesheet [
17 <!ENTITY % selectors SYSTEM "../common/db-selectors.mod">
18 %selectors;
19 ]>
20
21 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
22 xmlns:db="http://docbook.org/ns/docbook"
23 xmlns:set="http://exslt.org/sets"
24 xmlns="http://www.w3.org/1999/xhtml"
25 exclude-result-prefixes="db set"
26 version="1.0">
27
28 <!--!!==========================================================================
29 DocBook to HTML - Divisions
30 Handle division-level DocBook elements.
31 @revision[version=3.8 date=2012-11-05 status=final]
32
33 This stylesheet contains templates to process top-level and sectioning elements
34 in DocBook. It handles chunking and implements the interfaces provided by the
35 common {html} stylesheet.
36 -->
37
38
39 <!--%# html.title.mode -->
40 <xsl:template mode="html.title.mode" match="*">
41 <xsl:variable name="title">
42 <xsl:call-template name="db.title">
43 <xsl:with-param name="node" select="."/>
44 </xsl:call-template>
45 </xsl:variable>
46 <xsl:value-of select="normalize-space($title)"/>
47 </xsl:template>
48
49 <!--%# html.header.mode -->
50 <xsl:template mode="html.header.mode" match="*">
51 <xsl:call-template name="db2html.links.linktrail"/>
52 </xsl:template>
53
54 <!--%# html.footer.mode -->
55 <xsl:template mode="html.footer.mode" match="*">
56 <xsl:call-template name="db2html.division.about"/>
57 </xsl:template>
58
59 <!--%# html.sidebar.contents.mode -->
60 <xsl:template mode="html.sidebar.contents.mode" match="*">
61 <xsl:param name="side"/>
62 <div class="sidebar-contents">
63 <div class="inner">
64 <div class="title">
65 <h2>
66 <span class="title">
67 <xsl:call-template name="l10n.gettext">
68 <xsl:with-param name="msgid" select="'Contents'"/>
69 </xsl:call-template>
70 </span>
71 </h2>
72 </div>
73 <div class="region">
74 <div class="contents">
75 <ul>
76 <xsl:for-each select="/* | /*/&db_chunks;">
77 <li class="links">
78 <xsl:call-template name="db2html.xref">
79 <xsl:with-param name="linkend" select="@id | @xml:id"/>
80 <xsl:with-param name="target" select="."/>
81 <xsl:with-param name="xrefstyle" select="'role:titleabbrev'"/>
82 </xsl:call-template>
83 </li>
84 </xsl:for-each>
85 </ul>
86 </div>
87 </div>
88 </div>
89 </div>
90 </xsl:template>
91
92 <!--%# html.sidebar.sections.mode -->
93 <xsl:template mode="html.sidebar.sections.mode" match="*">
94 <xsl:param name="side"/>
95 <xsl:variable name="depth_of_chunk">
96 <xsl:call-template name="db.chunk.depth-of-chunk"/>
97 </xsl:variable>
98 <xsl:if test="count(ancestor::*) >= $db.chunk.max_depth and &db_chunks;">
99 <div class="sidebar-sections">
100 <div class="inner">
101 <div class="title">
102 <h2>
103 <span class="title">
104 <xsl:call-template name="l10n.gettext">
105 <xsl:with-param name="msgid" select="'On This Page'"/>
106 </xsl:call-template>
107 </span>
108 </h2>
109 </div>
110 <div class="region">
111 <div class="contents">
112 <ul>
113 <xsl:for-each select="&db_chunks;">
114 <li class="links">
115 <xsl:call-template name="db2html.xref">
116 <xsl:with-param name="linkend" select="@id | @xml:id"/>
117 <xsl:with-param name="target" select="."/>
118 <xsl:with-param name="xrefstyle" select="'role:titleabbrev'"/>
119 </xsl:call-template>
120 </li>
121 </xsl:for-each>
122 </ul>
123 </div>
124 </div>
125 </div>
126 </div>
127 </xsl:if>
128 </xsl:template>
129
130 <!--%# html.body.mode -->
131 <xsl:template mode="html.body.mode" match="*">
132 <xsl:call-template name="db2html.links.next"/>
133 <xsl:apply-templates select=".">
134 <xsl:with-param name="depth_in_chunk" select="0"/>
135 </xsl:apply-templates>
136 <xsl:call-template name="db2html.links.next"/>
137 <div class="clear"/>
138 </xsl:template>
139
140 <!--%# html.output.after.mode -->
141 <xsl:template mode="html.output.after.mode" match="*">
142 <xsl:param name="depth_of_chunk">
143 <xsl:call-template name="db.chunk.depth-of-chunk"/>
144 </xsl:param>
145 <xsl:if test="count(ancestor::*) &lt; $db.chunk.max_depth">
146 <xsl:for-each select="&db_chunks;">
147 <xsl:call-template name="html.output">
148 <xsl:with-param name="node" select="."/>
149 </xsl:call-template>
150 </xsl:for-each>
151 </xsl:if>
152 </xsl:template>
153
154 <!--%# html.css.mode -->
155 <xsl:template mode="html.css.mode" match="*">
156 <xsl:param name="direction">
157 <xsl:call-template name="l10n.direction"/>
158 </xsl:param>
159 <xsl:param name="left">
160 <xsl:call-template name="l10n.align.start">
161 <xsl:with-param name="direction" select="$direction"/>
162 </xsl:call-template>
163 </xsl:param>
164 <xsl:param name="right">
165 <xsl:call-template name="l10n.align.end">
166 <xsl:with-param name="direction" select="$direction"/>
167 </xsl:call-template>
168 </xsl:param>
169 <xsl:call-template name="tmpl.file">
170 <xsl:with-param name="file" select="'css/docbook.css.tmpl'"/>
171 <xsl:with-param name="node" select="."/>
172 <xsl:with-param name="direction" select="$direction"/>
173 <xsl:with-param name="left" select="$left"/>
174 <xsl:with-param name="right" select="$right"/>
175 </xsl:call-template>
176 </xsl:template>
177
178
179 <!--**==========================================================================
180 db2html.division.div
181 Renders the content of a division element, chunking children if necessary
182
183 [xsl:params]
184 $node: The element to render the content of
185 $info: The info child element of $node
186 $entries: The entry-style child elements
187 $divisions: The division-level child elements
188 $depth_in_chunk: The depth of $node in the containing chunk
189 $depth_of_chunk: The depth of the containing chunk in the document
190 $chunk_divisions: Whether to create new documents for $divisions
191
192 REMARK: Talk about some of the parameters
193 -->
194 <xsl:template name="db2html.division.div">
195 <xsl:param name="node" select="."/>
196 <xsl:param name="info" select="/false"/>
197 <xsl:param name="entries" select="/false"/>
198 <xsl:param name="divisions" select="/false"/>
199 <xsl:param name="depth_in_chunk">
200 <xsl:call-template name="db.chunk.depth-in-chunk">
201 <xsl:with-param name="node" select="$node"/>
202 </xsl:call-template>
203 </xsl:param>
204 <xsl:param name="depth_of_chunk">
205 <xsl:call-template name="db.chunk.depth-of-chunk">
206 <xsl:with-param name="node" select="$node"/>
207 </xsl:call-template>
208 </xsl:param>
209 <xsl:param name="chunk_divisions"
210 select="($depth_in_chunk = 0) and
211 ($depth_of_chunk &lt; $db.chunk.max_depth)"/>
212 <xsl:choose>
213 <xsl:when test="$depth_in_chunk != 0">
214 <section>
215 <xsl:choose>
216 <xsl:when test="$node/@xml:id">
217 <xsl:attribute name="id">
218 <xsl:value-of select="$node/@xml:id"/>
219 </xsl:attribute>
220 </xsl:when>
221 <xsl:when test="$node/@id">
222 <xsl:attribute name="id">
223 <xsl:value-of select="$node/@id"/>
224 </xsl:attribute>
225 </xsl:when>
226 </xsl:choose>
227 <xsl:call-template name="html.lang.attrs">
228 <xsl:with-param name="node" select="$node"/>
229 </xsl:call-template>
230 <xsl:call-template name="html.class.attr">
231 <xsl:with-param name="node" select="$node"/>
232 <xsl:with-param name="class" select="local-name($node)"/>
233 </xsl:call-template>
234 <div class="inner">
235 <xsl:call-template name="_db2html.division.div.inner">
236 <xsl:with-param name="node" select="$node"/>
237 <xsl:with-param name="info" select="$info"/>
238 <xsl:with-param name="entries" select="$entries"/>
239 <xsl:with-param name="divisions" select="$divisions"/>
240 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
241 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
242 <xsl:with-param name="chunk_divisions" select="$chunk_divisions"/>
243 </xsl:call-template>
244 </div>
245 </section>
246 </xsl:when>
247 <xsl:otherwise>
248 <xsl:call-template name="_db2html.division.div.inner">
249 <xsl:with-param name="node" select="$node"/>
250 <xsl:with-param name="info" select="$info"/>
251 <xsl:with-param name="entries" select="$entries"/>
252 <xsl:with-param name="divisions" select="$divisions"/>
253 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
254 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
255 <xsl:with-param name="chunk_divisions" select="$chunk_divisions"/>
256 </xsl:call-template>
257 </xsl:otherwise>
258 </xsl:choose>
259 </xsl:template>
260
261 <!--#* _db2html.division.div.inner -->
262 <xsl:template name="_db2html.division.div.inner">
263 <xsl:param name="node"/>
264 <xsl:param name="info"/>
265 <xsl:param name="entries"/>
266 <xsl:param name="divisions"/>
267 <xsl:param name="depth_in_chunk"/>
268 <xsl:param name="depth_of_chunk"/>
269 <xsl:param name="chunk_divisions"/>
270 <xsl:call-template name="db2html.hgroup">
271 <xsl:with-param name="node" select="$node"/>
272 <xsl:with-param name="info" select="$info"/>
273 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
274 </xsl:call-template>
275 <div class="region">
276 <div class="contents pagewide">
277 <xsl:call-template name="html.content.pre">
278 <xsl:with-param name="page" select="$depth_in_chunk = 0"/>
279 </xsl:call-template>
280 <xsl:apply-templates mode="db2html.division.div.content.mode" select="$node">
281 <xsl:with-param name="info" select="$info"/>
282 <xsl:with-param name="entries" select="$entries"/>
283 <xsl:with-param name="divisions" select="$divisions"/>
284 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
285 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
286 </xsl:apply-templates>
287 <xsl:if test="$depth_in_chunk = 0 and
288 not($node/processing-instruction('db2html.no_sectionlinks'))">
289 <xsl:call-template name="db2html.links.section">
290 <xsl:with-param name="node" select="$node"/>
291 <xsl:with-param name="divisions" select="$divisions"/>
292 </xsl:call-template>
293 </xsl:if>
294 <xsl:call-template name="html.content.post">
295 <xsl:with-param name="page" select="$depth_in_chunk = 0"/>
296 </xsl:call-template>
297 </div>
298 <xsl:for-each select="$divisions">
299 <xsl:if test="not($chunk_divisions) or not(self::&db_chunks;)">
300 <xsl:apply-templates select=".">
301 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/>
302 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
303 </xsl:apply-templates>
304 </xsl:if>
305 </xsl:for-each>
306 <xsl:if test="$depth_in_chunk = 0">
307 <xsl:call-template name="db2html.footnote.footer">
308 <xsl:with-param name="node" select="$node"/>
309 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
310 </xsl:call-template>
311 </xsl:if>
312 </div>
313 </xsl:template>
314
315
316 <!--%%==========================================================================
317 db2html.division.div.content.mode
318 Renders the block-level content of a division element
319
320 [xsl:params]
321 $depth_in_chunk: The depth of the context element in the containing chunk
322 $depth_of_chunk: The depth of the containing chunk in the document
323
324 REMARK: Talk about how this works with `callback`
325 -->
326 <xsl:template mode="db2html.division.div.content.mode" match="*">
327 <xsl:param name="node" select="."/>
328 <xsl:param name="info" select="/false"/>
329 <xsl:param name="entries" select="/false"/>
330 <xsl:param name="divisions" select="/false"/>
331 <xsl:param name="depth_in_chunk">
332 <xsl:call-template name="db.chunk.depth-in-chunk">
333 <xsl:with-param name="node" select="$node"/>
334 </xsl:call-template>
335 </xsl:param>
336 <xsl:param name="depth_of_chunk">
337 <xsl:call-template name="db.chunk.depth-of-chunk">
338 <xsl:with-param name="node" select="$node"/>
339 </xsl:call-template>
340 </xsl:param>
341 <xsl:variable name="nots" select="$divisions | $entries |
342 title | db:title | titleabbrev | db:titleabbrev | subtitle | db:subtitle"/>
343 <xsl:apply-templates select="set:difference(*, $nots)">
344 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/>
345 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
346 </xsl:apply-templates>
347 <xsl:if test="$entries">
348 <div>
349 <dl class="{local-name($node)}">
350 <xsl:apply-templates select="$entries">
351 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/>
352 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
353 </xsl:apply-templates>
354 </dl>
355 </div>
356 </xsl:if>
357 </xsl:template>
358
359
360 <!--**==========================================================================
361 db2html.hgroup
362 Output the title and subtitle for an element.
363
364 [xsl:params]
365 $node: The element containing the title.
366 $info: FIXME.
367 $depth_in_chunk: The depth of $node in the containing chunk.
368
369 REMARK: Talk about the different kinds of title blocks
370 -->
371 <xsl:template name="db2html.hgroup">
372 <xsl:param name="node" select="."/>
373 <xsl:param name="info" select="/false"/>
374 <xsl:param name="depth_in_chunk">
375 <xsl:call-template name="db.chunk.depth-in-chunk">
376 <xsl:with-param name="node" select="$node"/>
377 </xsl:call-template>
378 </xsl:param>
379 <xsl:variable name="title" select="($node/title | $info/title | $node/db:title | $info/db:title)[1]"/>
380 <xsl:variable name="subtitle" select="($node/subtitle | $info/subtitle | $node/db:subtitle | $info/db:subtitle)[1]"/>
381 <xsl:variable name="title_h">
382 <xsl:choose>
383 <xsl:when test="$depth_in_chunk &lt; 6">
384 <xsl:value-of select="concat('h', $depth_in_chunk + 1)"/>
385 </xsl:when>
386 <xsl:otherwise>
387 <xsl:text>h6</xsl:text>
388 </xsl:otherwise>
389 </xsl:choose>
390 </xsl:variable>
391 <xsl:variable name="subtitle_h">
392 <xsl:choose>
393 <xsl:when test="$depth_in_chunk &lt; 5">
394 <xsl:value-of select="concat('h', $depth_in_chunk + 2)"/>
395 </xsl:when>
396 <xsl:otherwise>
397 <xsl:text>h6</xsl:text>
398 </xsl:otherwise>
399 </xsl:choose>
400 </xsl:variable>
401
402 <div class="hgroup pagewide">
403 <xsl:element name="{$title_h}" namespace="{$html.namespace}">
404 <xsl:attribute name="class">
405 <xsl:text>title</xsl:text>
406 </xsl:attribute>
407 <xsl:if test="$title">
408 <xsl:call-template name="db2html.anchor">
409 <xsl:with-param name="node" select="$title"/>
410 </xsl:call-template>
411 </xsl:if>
412 <xsl:choose>
413 <xsl:when test="$title">
414 <xsl:apply-templates select="$title/node()"/>
415 </xsl:when>
416 <xsl:otherwise>
417 <xsl:call-template name="db.title">
418 <xsl:with-param name="node" select="$node"/>
419 </xsl:call-template>
420 </xsl:otherwise>
421 </xsl:choose>
422 </xsl:element>
423 <xsl:if test="$subtitle">
424 <xsl:element name="{$subtitle_h}" namespace="{$html.namespace}">
425 <xsl:attribute name="class">
426 <xsl:text>subtitle</xsl:text>
427 </xsl:attribute>
428 <xsl:apply-templates select="$subtitle/node()"/>
429 </xsl:element>
430 </xsl:if>
431 </div>
432 </xsl:template>
433
434
435 <!--**==========================================================================
436 db2html.division.about
437 Output the copyrights, credits, and license information at the bottom of a page.
438 @revision[version=3.8 date=2012-11-05 status=final]
439
440 [xsl:params]
441 $node: A division-level element a page is being created for.
442 $info: The info child element of $node
443
444 This template outputs copyright information, credits, and license information for
445 the division. By default it is called by the {html.footer.mode} implementation.
446 -->
447 <xsl:template name="db2html.division.about">
448 <xsl:param name="node" select="."/>
449 <xsl:param name="info" select="$node/ancestor-or-self::*/&db_infos;"/>
450 <xsl:variable name="copyrights" select="$info/copyright | $info/db:copyright"/>
451 <xsl:variable name="authors" select="
452 $info/author | $info/authorgroup/author |
453 $info/corpauthor | $info/authorgroup/corpauthor |
454 $info/db:author | $info/db:authorgroup/db:author"/>
455 <xsl:variable name="editors" select="
456 $info/editor | $info/authorgroup/editor |
457 $info/db:editor | $info/db:authorgroup/db:editor"/>
458 <xsl:variable name="translators" select="
459 $info/corpcredit[@role = 'translator'] |
460 $info/othercredit[@role = 'translator'] |
461 $info/authorgroup/corpcredit[@role = 'translator'] |
462 $info/authorgroup/othercredit[@role = 'translator'] |
463 $info/db:othercredit[@class = 'translator'] |
464 $info/db:authorgroup/db:othercredit[@class = 'translator']"/>
465 <xsl:variable name="publishers" select="$info/publisher | $info/db:publisher"/>
466 <xsl:variable name="othercredits" select="set:difference(
467 $info/collab | $info/authorgroup/collab | $info/db:collab |
468 $info/corpcredit | $info/authorgroup/corpcredit |
469 $info/othercredit | $info/authorgroup/othercredit |
470 $info/db:othercredit | $info/db:authorgroup/db:othercredit,
471 ($authors | $editors | $translators))"/>
472 <xsl:variable name="legal" select="$info/legalnotice | $info/db:legalnotice"/>
473 <xsl:if test="$copyrights or $authors or $editors or $translators or
474 $publishers or $othercredits or $legal">
475 <div class="about ui-expander" role="contentinfo">
476 <div class="yelp-data yelp-data-ui-expander" data-yelp-expanded="false"/>
477 <div class="inner">
478 <div class="hgroup">
479 <h2>
480 <span class="title">
481 <xsl:call-template name="l10n.gettext">
482 <xsl:with-param name="msgid" select="'About'"/>
483 </xsl:call-template>
484 </span>
485 </h2>
486 </div>
487 <div class="region">
488 <div class="contents">
489 <xsl:if test="$copyrights">
490 <div class="copyrights">
491 <xsl:for-each select="$copyrights">
492 <div class="copyright">
493 <xsl:call-template name="db.copyright"/>
494 </div>
495 </xsl:for-each>
496 </div>
497 </xsl:if>
498 <xsl:if test="$authors or $editors or $translators or $publishers or $othercredits">
499 <div class="credits">
500 <xsl:call-template name="_db2html.division.about.credits">
501 <xsl:with-param name="class" select="'credits-authors'"/>
502 <xsl:with-param name="title" select="'Written By'"/>
503 <xsl:with-param name="credits" select="$authors"/>
504 </xsl:call-template>
505 <xsl:call-template name="_db2html.division.about.credits">
506 <xsl:with-param name="class" select="'credits-editors'"/>
507 <xsl:with-param name="title" select="'Edited By'"/>
508 <xsl:with-param name="credits" select="$editors"/>
509 </xsl:call-template>
510 <xsl:call-template name="_db2html.division.about.credits">
511 <xsl:with-param name="class" select="'credits-translators'"/>
512 <xsl:with-param name="title" select="'Translated By'"/>
513 <xsl:with-param name="credits" select="$translators"/>
514 </xsl:call-template>
515 <xsl:call-template name="_db2html.division.about.credits">
516 <xsl:with-param name="class" select="'credits-publishers'"/>
517 <xsl:with-param name="title" select="'Published By'"/>
518 <xsl:with-param name="credits" select="$publishers"/>
519 </xsl:call-template>
520 <xsl:call-template name="_db2html.division.about.credits">
521 <xsl:with-param name="class" select="'credits-others'"/>
522 <xsl:with-param name="title" select="'Other Credits'"/>
523 <xsl:with-param name="credits" select="$othercredits"/>
524 </xsl:call-template>
525 </div>
526 </xsl:if>
527 <xsl:for-each select="$legal">
528 <div class="license">
529 <div class="title">
530 <span class="title">
531 <xsl:choose>
532 <xsl:when test="title">
533 <xsl:apply-templates select="title/node()"/>
534 </xsl:when>
535 <xsl:otherwise>
536 <xsl:call-template name="l10n.gettext">
537 <xsl:with-param name="msgid" select="'Legal'"/>
538 </xsl:call-template>
539 </xsl:otherwise>
540 </xsl:choose>
541 </span>
542 </div>
543 <div class="contents">
544 <xsl:apply-templates select="*[not(self::title or self::db:title or
545 self::blockinfo or self::db:info or self::db:titleabbrev)]"/>
546 </div>
547 </div>
548 </xsl:for-each>
549 </div>
550 </div>
551 </div>
552 </div>
553 </xsl:if>
554 </xsl:template>
555
556 <!--#* _db2html.division.about.credits -->
557 <xsl:template name="_db2html.division.about.credits">
558 <xsl:param name="class"/>
559 <xsl:param name="title"/>
560 <xsl:param name="credits"/>
561 <xsl:if test="$credits">
562 <div class="{$class}">
563 <div class="title">
564 <span class="title">
565 <xsl:call-template name="l10n.gettext">
566 <xsl:with-param name="msgid" select="$title"/>
567 </xsl:call-template>
568 </span>
569 </div>
570 <ul class="credits">
571 <xsl:for-each select="$credits">
572 <li>
573 <xsl:apply-templates select="."/>
574 </li>
575 </xsl:for-each>
576 </ul>
577 </div>
578 </xsl:if>
579 </xsl:template>
580
581
582
583 <!-- == Matched Templates == -->
584
585 <!-- = appendix = -->
586 <xsl:template match="appendix | db:appendix">
587 <xsl:param name="depth_in_chunk">
588 <xsl:call-template name="db.chunk.depth-in-chunk"/>
589 </xsl:param>
590 <xsl:param name="depth_of_chunk">
591 <xsl:call-template name="db.chunk.depth-of-chunk"/>
592 </xsl:param>
593 <xsl:call-template name="db2html.division.div">
594 <xsl:with-param name="divisions" select="
595 bibliography | glossary | index | lot | refentry |
596 sect1 | section | simplesect | toc |
597 db:bibliography | db:glossary | db:index |
598 db:refentry | db:sect1 | db:section |
599 db:simplesect | db:toc"/>
600 <xsl:with-param name="info" select="appendixinfo | db:info"/>
601 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
602 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
603 </xsl:call-template>
604 </xsl:template>
605
606 <!-- = article = -->
607 <xsl:template match="article | db:article">
608 <xsl:param name="depth_in_chunk">
609 <xsl:call-template name="db.chunk.depth-in-chunk"/>
610 </xsl:param>
611 <xsl:param name="depth_of_chunk">
612 <xsl:call-template name="db.chunk.depth-of-chunk"/>
613 </xsl:param>
614 <xsl:call-template name="db2html.division.div">
615 <xsl:with-param name="divisions" select="
616 appendix | bibliography | glossary | index | lot |
617 refentry | sect1 | section | simplesect | toc |
618 colophon | db:colophon |
619 db:appendix | db:bibliography | db:glossary | db:index |
620 db:refentry | db:sect1 | db:section |
621 db:simplesect | db:toc "/>
622 <xsl:with-param name="info" select="articleinfo | db:info"/>
623 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
624 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
625 </xsl:call-template>
626 </xsl:template>
627
628 <!-- = book = -->
629 <xsl:template match="book | db:book">
630 <xsl:param name="depth_in_chunk">
631 <xsl:call-template name="db.chunk.depth-in-chunk"/>
632 </xsl:param>
633 <xsl:param name="depth_of_chunk">
634 <xsl:call-template name="db.chunk.depth-of-chunk"/>
635 </xsl:param>
636 <xsl:call-template name="db2html.division.div">
637 <xsl:with-param name="divisions" select="
638 appendix | article | bibliography | chapter |
639 colophon | dedication | glossary | index |
640 lot | part | preface | reference |
641 setindex | toc |
642 db:acknowledgements | db:appendix | db:article |
643 db:bibliography | db:chapter | db:colophon |
644 db:dedication | db:glossary | db:index |
645 db:part | db:preface | db:reference |
646 db:toc"/>
647 <xsl:with-param name="info" select="bookinfo | db:info"/>
648 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
649 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
650 <xsl:with-param name="autotoc_depth" select="2"/>
651 </xsl:call-template>
652 </xsl:template>
653
654 <!-- = chapter = -->
655 <xsl:template match="chapter | db:chapter">
656 <xsl:param name="depth_in_chunk">
657 <xsl:call-template name="db.chunk.depth-in-chunk"/>
658 </xsl:param>
659 <xsl:param name="depth_of_chunk">
660 <xsl:call-template name="db.chunk.depth-of-chunk"/>
661 </xsl:param>
662 <xsl:call-template name="db2html.division.div">
663 <xsl:with-param name="divisions" select="
664 bibliography | glossary | index | lot | refentry |
665 sect1 | section | simplesect | toc |
666 db:bibliography | db:glossary | db:index |
667 db:refentry | db:sect1 | db:section |
668 db:simplesect | db:toc"/>
669 <xsl:with-param name="info" select="chapterinfo | db:info"/>
670 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
671 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
672 </xsl:call-template>
673 </xsl:template>
674
675 <!-- = colophon = -->
676 <xsl:template match="colophon | db:colophon">
677 <xsl:param name="depth_in_chunk">
678 <xsl:call-template name="db.chunk.depth-in-chunk"/>
679 </xsl:param>
680 <xsl:param name="depth_of_chunk">
681 <xsl:call-template name="db.chunk.depth-of-chunk"/>
682 </xsl:param>
683 <xsl:call-template name="db2html.division.div">
684 <xsl:with-param name="info" select="db:info"/>
685 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
686 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
687 </xsl:call-template>
688 </xsl:template>
689
690 <!-- = dedication = -->
691 <xsl:template match="dedication | db:dedication">
692 <xsl:param name="depth_in_chunk">
693 <xsl:call-template name="db.chunk.depth-in-chunk"/>
694 </xsl:param>
695 <xsl:param name="depth_of_chunk">
696 <xsl:call-template name="db.chunk.depth-of-chunk"/>
697 </xsl:param>
698 <xsl:call-template name="db2html.division.div">
699 <xsl:with-param name="info" select="db:info"/>
700 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
701 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
702 </xsl:call-template>
703 </xsl:template>
704
705 <!-- = glossary = -->
706 <xsl:template match="glossary | db:glossary">
707 <xsl:param name="depth_in_chunk">
708 <xsl:call-template name="db.chunk.depth-in-chunk"/>
709 </xsl:param>
710 <xsl:param name="depth_of_chunk">
711 <xsl:call-template name="db.chunk.depth-of-chunk"/>
712 </xsl:param>
713 <xsl:call-template name="db2html.division.div">
714 <xsl:with-param name="entries" select="glossentry | db:glossentry"/>
715 <xsl:with-param name="divisions" select="glossdiv | bibliography | db:glossdiv | db:bibliography"/>
716 <xsl:with-param name="info" select="glossaryinfo | db:info"/>
717 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
718 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
719 </xsl:call-template>
720 </xsl:template>
721
722 <!-- = glossdiv = -->
723 <xsl:template match="glossdiv | db:glossdiv">
724 <xsl:param name="depth_in_chunk">
725 <xsl:call-template name="db.chunk.depth-in-chunk"/>
726 </xsl:param>
727 <xsl:param name="depth_of_chunk">
728 <xsl:call-template name="db.chunk.depth-of-chunk"/>
729 </xsl:param>
730 <xsl:call-template name="db2html.division.div">
731 <xsl:with-param name="entries" select="glossentry | db:glossentry"/>
732 <xsl:with-param name="divisions" select="bibliography | db:bibliography"/>
733 <xsl:with-param name="info" select="db:info"/>
734 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
735 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
736 </xsl:call-template>
737 </xsl:template>
738
739 <!-- = part = -->
740 <xsl:template match="part | db:part">
741 <xsl:param name="depth_in_chunk">
742 <xsl:call-template name="db.chunk.depth-in-chunk"/>
743 </xsl:param>
744 <xsl:param name="depth_of_chunk">
745 <xsl:call-template name="db.chunk.depth-of-chunk"/>
746 </xsl:param>
747 <xsl:call-template name="db2html.division.div">
748 <xsl:with-param name="divisions" select="
749 appendix | article | bibliography | chapter |
750 glossary | index | lot | preface |
751 refentry | reference | toc | db:colophon |
752 db:appendix | db:article | db:bibliography |
753 db:chapter | db:glossary | db:index |
754 db:preface | db:refentry | db:reference |
755 db:toc"/>
756 <xsl:with-param name="info" select="partinfo | db:info"/>
757 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
758 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
759 </xsl:call-template>
760 </xsl:template>
761
762 <!-- = preface = -->
763 <xsl:template match="preface | db:preface">
764 <xsl:param name="depth_in_chunk">
765 <xsl:call-template name="db.chunk.depth-in-chunk"/>
766 </xsl:param>
767 <xsl:param name="depth_of_chunk">
768 <xsl:call-template name="db.chunk.depth-of-chunk"/>
769 </xsl:param>
770 <xsl:call-template name="db2html.division.div">
771 <xsl:with-param name="divisions" select="
772 refentry | simplesect | sect1 | section | toc |
773 lot | index | glossary | bibliography |
774 db:refentry | db:simplesect | db:sect1 | db:section |
775 db:toc | db:index | db:glossary |
776 db:bibliography "/>
777 <xsl:with-param name="info" select="prefaceinfo | db:info"/>
778 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
779 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
780 </xsl:call-template>
781 </xsl:template>
782
783 <!-- = qandadiv = -->
784 <xsl:template match="qandadiv | db:qandadiv">
785 <xsl:param name="depth_in_chunk">
786 <xsl:call-template name="db.chunk.depth-in-chunk"/>
787 </xsl:param>
788 <xsl:param name="depth_of_chunk">
789 <xsl:call-template name="db.chunk.depth-of-chunk"/>
790 </xsl:param>
791 <xsl:call-template name="db2html.division.div">
792 <xsl:with-param name="info" select="blockinfo | db:info"/>
793 <xsl:with-param name="entries" select="qandaentry | db:qandaentry"/>
794 <xsl:with-param name="divisions" select="qandadiv | db:qandadiv"/>
795 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
796 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
797 <xsl:with-param name="chunk_divisions" select="false()"/>
798 <xsl:with-param name="autotoc_divisions" select="false()"/>
799 </xsl:call-template>
800 </xsl:template>
801
802 <!-- = qandaset = -->
803 <xsl:template match="qandaset | db:qandaset">
804 <xsl:param name="depth_in_chunk">
805 <xsl:call-template name="db.chunk.depth-in-chunk"/>
806 </xsl:param>
807 <xsl:param name="depth_of_chunk">
808 <xsl:call-template name="db.chunk.depth-of-chunk"/>
809 </xsl:param>
810 <xsl:call-template name="db2html.division.div">
811 <xsl:with-param name="info" select="blockinfo | db:info"/>
812 <xsl:with-param name="entries" select="qandaentry | db:qandaentry"/>
813 <xsl:with-param name="divisions" select="qandadiv | db:qandadiv"/>
814 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
815 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
816 <xsl:with-param name="chunk_divisions" select="false()"/>
817 <xsl:with-param name="autotoc_divisions" select="true()"/>
818 </xsl:call-template>
819 </xsl:template>
820
821 <!-- = reference = -->
822 <xsl:template match="reference | db:reference">
823 <xsl:param name="depth_in_chunk">
824 <xsl:call-template name="db.chunk.depth-in-chunk"/>
825 </xsl:param>
826 <xsl:param name="depth_of_chunk">
827 <xsl:call-template name="db.chunk.depth-of-chunk"/>
828 </xsl:param>
829 <xsl:call-template name="db2html.division.div">
830 <xsl:with-param name="divisions" select="refentry | db:refentry"/>
831 <xsl:with-param name="info" select="referenceinfo | db:info"/>
832 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
833 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
834 </xsl:call-template>
835 </xsl:template>
836
837 <!-- = sect1 = -->
838 <xsl:template match="sect1 | db:sect1">
839 <xsl:param name="depth_in_chunk">
840 <xsl:call-template name="db.chunk.depth-in-chunk"/>
841 </xsl:param>
842 <xsl:param name="depth_of_chunk">
843 <xsl:call-template name="db.chunk.depth-of-chunk"/>
844 </xsl:param>
845 <xsl:call-template name="db2html.division.div">
846 <xsl:with-param name="divisions" select="
847 bibliography | glossary | index | lot |
848 refentry | sect2 | simplesect | toc |
849 db:bibliography | db:glossary | db:index |
850 db:refentry | db:sect2 | db:simplesect |
851 db:toc "/>
852 <xsl:with-param name="info" select="sect1info | db:info"/>
853 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
854 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
855 </xsl:call-template>
856 </xsl:template>
857
858 <!-- = sect2 = -->
859 <xsl:template match="sect2 | db:sect2">
860 <xsl:param name="depth_in_chunk">
861 <xsl:call-template name="db.chunk.depth-in-chunk"/>
862 </xsl:param>
863 <xsl:param name="depth_of_chunk">
864 <xsl:call-template name="db.chunk.depth-of-chunk"/>
865 </xsl:param>
866 <xsl:call-template name="db2html.division.div">
867 <xsl:with-param name="divisions" select="
868 bibliography | glossary | index | lot |
869 refentry | sect3 | simplesect | toc |
870 db:bibliography | db:glossary | db:index | db:refentry |
871 db:sect3 | db:simplesect | db:toc "/>
872 <xsl:with-param name="info" select="sect2info | db:info"/>
873 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
874 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
875 </xsl:call-template>
876 </xsl:template>
877
878 <!-- = sect3 = -->
879 <xsl:template match="sect3 | db:sect3">
880 <xsl:param name="depth_in_chunk">
881 <xsl:call-template name="db.chunk.depth-in-chunk"/>
882 </xsl:param>
883 <xsl:param name="depth_of_chunk">
884 <xsl:call-template name="db.chunk.depth-of-chunk"/>
885 </xsl:param>
886 <xsl:call-template name="db2html.division.div">
887 <xsl:with-param name="divisions" select="
888 bibliography | glossary | index | lot |
889 refentry | sect4 | simplesect | toc |
890 db:bibliography | db:glossary | db:index | db:refentry |
891 db:sect4 | db:simplesect | db:toc "/>
892 <xsl:with-param name="info" select="sect3info | db:info"/>
893 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
894 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
895 </xsl:call-template>
896 </xsl:template>
897
898 <!-- = sect4 = -->
899 <xsl:template match="sect4 | db:sect4">
900 <xsl:param name="depth_in_chunk">
901 <xsl:call-template name="db.chunk.depth-in-chunk"/>
902 </xsl:param>
903 <xsl:param name="depth_of_chunk">
904 <xsl:call-template name="db.chunk.depth-of-chunk"/>
905 </xsl:param>
906 <xsl:call-template name="db2html.division.div">
907 <xsl:with-param name="divisions" select="
908 bibliography | glossary | index | lot |
909 refentry | sect5 | simplesect | toc |
910 db:bibliography | db:glossary | db:index | db:refentry |
911 db:sect5 | db:simplesect | db:toc "/>
912 <xsl:with-param name="info" select="sect4info | db:info"/>
913 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
914 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
915 </xsl:call-template>
916 </xsl:template>
917
918 <!-- = sect5 = -->
919 <xsl:template match="sect5 | db:sect5">
920 <xsl:param name="depth_in_chunk">
921 <xsl:call-template name="db.chunk.depth-in-chunk"/>
922 </xsl:param>
923 <xsl:param name="depth_of_chunk">
924 <xsl:call-template name="db.chunk.depth-of-chunk"/>
925 </xsl:param>
926 <xsl:call-template name="db2html.division.div">
927 <xsl:with-param name="divisions" select="
928 bibliography | glossary | index | lot |
929 refentry | simplesect | toc |
930 db:bibliography | db:glossary | db:index |
931 db:refentry | db:simplesect | db:toc "/>
932 <xsl:with-param name="info" select="sect5info | db:info"/>
933 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
934 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
935 </xsl:call-template>
936 </xsl:template>
937
938 <!-- = section = -->
939 <xsl:template match="section | db:section">
940 <xsl:param name="depth_in_chunk">
941 <xsl:call-template name="db.chunk.depth-in-chunk"/>
942 </xsl:param>
943 <xsl:param name="depth_of_chunk">
944 <xsl:call-template name="db.chunk.depth-of-chunk"/>
945 </xsl:param>
946 <xsl:call-template name="db2html.division.div">
947 <xsl:with-param name="divisions" select="
948 bibliography | glossary | index | lot |
949 refentry | section | simplesect | toc |
950 db:bibliography | db:glossary | db:index | db:refentry |
951 db:section | db:simplesect | db:toc "/>
952 <xsl:with-param name="info" select="sectioninfo | db:info"/>
953 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
954 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
955 </xsl:call-template>
956 </xsl:template>
957
958 <!-- = simplesect = -->
959 <xsl:template match="simplesect | db:simplesect">
960 <xsl:param name="depth_in_chunk">
961 <xsl:call-template name="db.chunk.depth-in-chunk"/>
962 </xsl:param>
963 <xsl:param name="depth_of_chunk">
964 <xsl:call-template name="db.chunk.depth-of-chunk"/>
965 </xsl:param>
966 <xsl:call-template name="db2html.division.div">
967 <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
968 <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
969 </xsl:call-template>
970 </xsl:template>
971
972 </xsl:stylesheet>