1
<?xml version='1.0' encoding='utf-8'?><!-- -*- indent-tabs-mode: nil -*- -->
1
<?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
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
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
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, write to the
15
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3
19
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4
20
xmlns:doc="http://www.gnome.org/~shaunm/xsldoc"
88
104
<xsl:param name="db.chunk.extension"/>
107
<!-- == db.chunk.info_chunk ================================================ -->
109
<parameter xmlns="http://www.gnome.org/~shaunm/xsldoc">
110
<name>db.chunk.info_chunk</name>
112
Whether to create a chunk for the titlepage
116
<xsl:param name="db.chunk.info_chunk"
117
select="$db.chunk.max_depth != 0 and $db.chunk.info_basename != ''"/>
91
120
<!-- == db.chunk.info_basename ============================================= -->
93
122
<parameter xmlns="http://www.gnome.org/~shaunm/xsldoc">
161
190
<xsl:with-param name="node" select="$node"/>
162
191
</xsl:call-template>
164
<xsl:if test="string($template) = ''">
165
<xsl:call-template name="db.chunk.children">
166
<xsl:with-param name="node" select="$node"/>
167
<xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
170
193
<exsl:document href="{$href}">
171
194
<xsl:call-template name="db.chunk.content">
172
195
<xsl:with-param name="node" select="$node"/>
268
297
</xsl:call-template>
270
299
<xsl:if test="$depth_of_chunk < $db.chunk.max_depth">
271
<xsl:for-each select="$node/*[contains($db.chunk.chunks_,
272
concat(' ', local-name(.), ' '))]">
300
<xsl:for-each select="
301
$node/appendix | $node/article | $node/bibliography |
302
$node/book | $node/chapter | $node/colophon |
303
$node/dedication | $node/glossary | $node/glossdiv |
304
$node/index | $node/lot | $node/part |
305
$node/preface | $node/refentry | $node/reference |
306
$node/sect1 | $node/sect2 | $node/sect3 |
307
$node/sect4 | $node/sect5 | $node/section |
308
$node/setindex | $node/simplesect | $node/toc ">
273
309
<xsl:call-template name="db.chunk">
274
310
<xsl:with-param name="depth_of_chunk" select="$depth_of_chunk + 1"/>
275
311
</xsl:call-template>
278
<xsl:if test="$depth_of_chunk = 0">
314
<xsl:if test="$db.chunk.info_chunk and $depth_of_chunk = 0">
279
315
<xsl:call-template name="db.chunk">
280
316
<xsl:with-param name="node" select="$node"/>
281
317
<xsl:with-param name="template" select="'info'"/>
303
339
<xsl:template name="db.chunk.depth-in-chunk">
304
340
<xsl:param name="node" select="."/>
305
341
<xsl:variable name="divs"
343
count( $node/ancestor-or-self::appendix ) +
344
count( $node/ancestor-or-self::article ) +
345
count( $node/ancestor-or-self::bibliography ) +
346
count( $node/ancestor-or-self::book ) +
347
count( $node/ancestor-or-self::chapter ) +
348
count( $node/ancestor-or-self::colophon ) +
349
count( $node/ancestor-or-self::dedication ) +
350
count( $node/ancestor-or-self::glossary ) +
351
count( $node/ancestor-or-self::glossdiv ) +
352
count( $node/ancestor-or-self::index ) +
353
count( $node/ancestor-or-self::lot ) +
354
count( $node/ancestor-or-self::part ) +
355
count( $node/ancestor-or-self::preface ) +
356
count( $node/ancestor-or-self::refentry ) +
357
count( $node/ancestor-or-self::reference ) +
358
count( $node/ancestor-or-self::sect1 ) +
359
count( $node/ancestor-or-self::sect2 ) +
360
count( $node/ancestor-or-self::sect3 ) +
361
count( $node/ancestor-or-self::sect4 ) +
362
count( $node/ancestor-or-self::sect5 ) +
363
count( $node/ancestor-or-self::section ) +
364
count( $node/ancestor-or-self::setindex ) +
365
count( $node/ancestor-or-self::simplesect ) +
366
count( $node/ancestor-or-self::toc )"/>
368
<xsl:variable name="divs"
369
select="count($node/ancestor-or-self::*[
370
self::appendix or self::article or
371
self::bibliography or self::book or
372
self::chapter or self::colophon or
373
self::dedication or self::glossary or
374
self::glossdiv or self::index or
375
self::lot or self::part or
376
self::preface or self::refentry or
377
self::reference or self::sect1 or
378
self::sect2 or self::sect3 or
379
self::sect4 or self::sect5 or
380
self::section or self::setindex or
381
self::simplesect or self::toc ])"/>
384
<xsl:variable name="divs"
306
385
select="count($node/ancestor-or-self::*
307
386
[contains($db.chunk.chunks_,
308
387
concat(' ', local-name(.), ' '))] )"/>
310
390
<xsl:when test="$divs < ($db.chunk.max_depth + 1)">
311
391
<xsl:value-of select="count($node/ancestor-or-self::*) - $divs"/>
338
418
select="count($node/ancestor::*
339
419
[contains($db.chunk.chunks_,
340
420
concat(' ', local-name(.), ' '))] )"/>
422
<xsl:variable name="divs"
423
select="count($node/ancestor::*[
424
self::appendix or self::article or
425
self::bibliography or self::book or
426
self::chapter or self::colophon or
427
self::dedication or self::glossary or
428
self::glossdiv or self::index or
429
self::lot or self::part or
430
self::preface or self::refentry or
431
self::reference or self::sect1 or
432
self::sect2 or self::sect3 or
433
self::sect4 or self::sect5 or
434
self::section or self::setindex or
435
self::simplesect or self::toc ])"/>
342
438
<xsl:when test="$divs < $db.chunk.max_depth">
343
439
<xsl:value-of select="$divs"/>