2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5
<!-- ********************************************************************
6
$Id: chunk-common.xsl 1341 2006-08-02 16:35:13Z telrod $
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 name="chunk">
18
<xsl:param name="node" select="."/>
19
<!-- returns 1 if $node is a chunk -->
21
<!-- ==================================================================== -->
27
bibliography in article or book
31
glossary in article or book
32
index in article or book
37
sect{1,2,3,4,5} if position()>1 && depth < chunk.section.depth
38
section if position()>1 && depth < chunk.section.depth
42
<!-- ==================================================================== -->
46
<xsl:text>chunk: </xsl:text>
47
<xsl:value-of select="name($node)"/>
48
<xsl:text>(</xsl:text>
49
<xsl:value-of select="$node/@id"/>
50
<xsl:text>)</xsl:text>
51
<xsl:text> csd: </xsl:text>
52
<xsl:value-of select="$chunk.section.depth"/>
53
<xsl:text> cfs: </xsl:text>
54
<xsl:value-of select="$chunk.first.sections"/>
55
<xsl:text> ps: </xsl:text>
56
<xsl:value-of select="count($node/parent::section)"/>
57
<xsl:text> prs: </xsl:text>
58
<xsl:value-of select="count($node/preceding-sibling::section)"/>
63
<xsl:when test="not($node/parent::*)">1</xsl:when>
65
<xsl:when test="local-name($node) = 'sect1'
66
and $chunk.section.depth >= 1
67
and ($chunk.first.sections != 0
68
or count($node/preceding-sibling::sect1) > 0)">
69
<xsl:text>1</xsl:text>
71
<xsl:when test="local-name($node) = 'sect2'
72
and $chunk.section.depth >= 2
73
and ($chunk.first.sections != 0
74
or count($node/preceding-sibling::sect2) > 0)">
75
<xsl:call-template name="chunk">
76
<xsl:with-param name="node" select="$node/parent::*"/>
79
<xsl:when test="local-name($node) = 'sect3'
80
and $chunk.section.depth >= 3
81
and ($chunk.first.sections != 0
82
or count($node/preceding-sibling::sect3) > 0)">
83
<xsl:call-template name="chunk">
84
<xsl:with-param name="node" select="$node/parent::*"/>
87
<xsl:when test="local-name($node) = 'sect4'
88
and $chunk.section.depth >= 4
89
and ($chunk.first.sections != 0
90
or count($node/preceding-sibling::sect4) > 0)">
91
<xsl:call-template name="chunk">
92
<xsl:with-param name="node" select="$node/parent::*"/>
95
<xsl:when test="local-name($node) = 'sect5'
96
and $chunk.section.depth >= 5
97
and ($chunk.first.sections != 0
98
or count($node/preceding-sibling::sect5) > 0)">
99
<xsl:call-template name="chunk">
100
<xsl:with-param name="node" select="$node/parent::*"/>
103
<xsl:when test="local-name($node) = 'section'
104
and $chunk.section.depth >= count($node/ancestor::section)+1
105
and ($chunk.first.sections != 0
106
or count($node/preceding-sibling::section) > 0)">
107
<xsl:call-template name="chunk">
108
<xsl:with-param name="node" select="$node/parent::*"/>
112
<xsl:when test="name($node)='preface'">1</xsl:when>
113
<xsl:when test="name($node)='chapter'">1</xsl:when>
114
<xsl:when test="name($node)='appendix'">1</xsl:when>
115
<xsl:when test="name($node)='article'">1</xsl:when>
116
<xsl:when test="name($node)='part'">1</xsl:when>
117
<xsl:when test="name($node)='reference'">1</xsl:when>
118
<xsl:when test="name($node)='refentry'">1</xsl:when>
119
<xsl:when test="name($node)='index'
120
and (name($node/parent::*) = 'article'
121
or name($node/parent::*) = 'book')">1</xsl:when>
122
<xsl:when test="name($node)='bibliography'
123
and (name($node/parent::*) = 'article'
124
or name($node/parent::*) = 'book')">1</xsl:when>
125
<xsl:when test="name($node)='glossary'
126
and (name($node/parent::*) = 'article'
127
or name($node/parent::*) = 'book')">1</xsl:when>
128
<xsl:when test="name($node)='colophon'">1</xsl:when>
129
<xsl:when test="name($node)='book'">1</xsl:when>
130
<xsl:when test="name($node)='set'">1</xsl:when>
131
<xsl:when test="name($node)='setindex'">1</xsl:when>
132
<xsl:otherwise>0</xsl:otherwise>
136
<!-- ==================================================================== -->
138
<xsl:template match="*" mode="chunk-filename">
139
<!-- returns the filename of a chunk -->
140
<xsl:variable name="ischunk">
141
<xsl:call-template name="chunk"/>
144
<xsl:variable name="fn">
145
<xsl:apply-templates select="." mode="recursive-chunk-filename"/>
150
<xsl:value-of select="$ischunk"/>
151
<xsl:text> (</xsl:text>
152
<xsl:value-of select="local-name(.)"/>
153
<xsl:text>) </xsl:text>
154
<xsl:value-of select="$fn"/>
155
<xsl:text>, </xsl:text>
156
<xsl:call-template name="dbhtml-dir"/>
160
<!-- 2003-11-25 by ndw:
161
The following test used to read test="$ischunk != 0 and $fn != ''"
162
I've removed the ischunk part of the test so that href.to.uri and
163
href.from.uri will be fully qualified even if the source or target
164
isn't a chunk. I *think* that if $fn != '' then it's appropriate
165
to put the directory on the front, even if the element isn't a
166
chunk. I could be wrong. -->
168
<xsl:if test="$fn != ''">
169
<xsl:call-template name="dbhtml-dir"/>
172
<xsl:value-of select="$fn"/>
173
<!-- You can't add the html.ext here because dbhtml filename= may already -->
174
<!-- have added it. It really does have to be handled in the recursive template -->
177
<xsl:template match="*" mode="recursive-chunk-filename">
178
<xsl:param name="recursive" select="false()"/>
180
<!-- returns the filename of a chunk -->
181
<xsl:variable name="ischunk">
182
<xsl:call-template name="chunk"/>
185
<xsl:variable name="dbhtml-filename">
186
<xsl:call-template name="dbhtml-filename"/>
189
<xsl:variable name="filename">
191
<xsl:when test="$dbhtml-filename != ''">
192
<xsl:value-of select="$dbhtml-filename"/>
194
<!-- if this is the root element, use the root.filename -->
195
<xsl:when test="not(parent::*) and $root.filename != ''">
196
<xsl:value-of select="$root.filename"/>
197
<xsl:value-of select="$html.ext"/>
199
<!-- if there's no dbhtml filename, and if we're to use IDs as -->
200
<!-- filenames, then use the ID to generate the filename. -->
201
<xsl:when test="@id and $use.id.as.filename != 0">
202
<xsl:value-of select="@id"/>
203
<xsl:value-of select="$html.ext"/>
205
<xsl:otherwise></xsl:otherwise>
210
<xsl:when test="$ischunk='0'">
211
<!-- if called on something that isn't a chunk, walk up... -->
213
<xsl:when test="count(parent::*)>0">
214
<xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
215
<xsl:with-param name="recursive" select="$recursive"/>
216
</xsl:apply-templates>
218
<!-- unless there is no up, in which case return "" -->
219
<xsl:otherwise></xsl:otherwise>
223
<xsl:when test="not($recursive) and $filename != ''">
224
<!-- if this chunk has an explicit name, use it -->
225
<xsl:value-of select="$filename"/>
228
<xsl:when test="self::set">
229
<xsl:value-of select="$root.filename"/>
230
<xsl:if test="not($recursive)">
231
<xsl:value-of select="$html.ext"/>
235
<xsl:when test="self::book">
236
<xsl:text>bk</xsl:text>
237
<xsl:number level="any" format="01"/>
238
<xsl:if test="not($recursive)">
239
<xsl:value-of select="$html.ext"/>
243
<xsl:when test="self::article">
245
<!-- in a set, make sure we inherit the right book info... -->
246
<xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
247
<xsl:with-param name="recursive" select="true()"/>
248
</xsl:apply-templates>
251
<xsl:text>ar</xsl:text>
252
<xsl:number level="any" format="01" from="book"/>
253
<xsl:if test="not($recursive)">
254
<xsl:value-of select="$html.ext"/>
258
<xsl:when test="self::preface">
260
<!-- in a set, make sure we inherit the right book info... -->
261
<xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
262
<xsl:with-param name="recursive" select="true()"/>
263
</xsl:apply-templates>
266
<xsl:text>pr</xsl:text>
267
<xsl:number level="any" format="01" from="book"/>
268
<xsl:if test="not($recursive)">
269
<xsl:value-of select="$html.ext"/>
273
<xsl:when test="self::chapter">
275
<!-- in a set, make sure we inherit the right book info... -->
276
<xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
277
<xsl:with-param name="recursive" select="true()"/>
278
</xsl:apply-templates>
281
<xsl:text>ch</xsl:text>
282
<xsl:number level="any" format="01" from="book"/>
283
<xsl:if test="not($recursive)">
284
<xsl:value-of select="$html.ext"/>
288
<xsl:when test="self::appendix">
290
<!-- in a set, make sure we inherit the right book info... -->
291
<xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
292
<xsl:with-param name="recursive" select="true()"/>
293
</xsl:apply-templates>
296
<xsl:text>ap</xsl:text>
297
<xsl:number level="any" format="a" from="book"/>
298
<xsl:if test="not($recursive)">
299
<xsl:value-of select="$html.ext"/>
303
<xsl:when test="self::part">
305
<xsl:when test="/set">
306
<!-- in a set, make sure we inherit the right book info... -->
307
<xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
308
<xsl:with-param name="recursive" select="true()"/>
309
</xsl:apply-templates>
315
<xsl:text>pt</xsl:text>
316
<xsl:number level="any" format="01" from="book"/>
317
<xsl:if test="not($recursive)">
318
<xsl:value-of select="$html.ext"/>
322
<xsl:when test="self::reference">
324
<xsl:when test="/set">
325
<!-- in a set, make sure we inherit the right book info... -->
326
<xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
327
<xsl:with-param name="recursive" select="true()"/>
328
</xsl:apply-templates>
334
<xsl:text>rn</xsl:text>
335
<xsl:number level="any" format="01" from="book"/>
336
<xsl:if test="not($recursive)">
337
<xsl:value-of select="$html.ext"/>
341
<xsl:when test="self::refentry">
343
<xsl:when test="parent::reference">
344
<xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
345
<xsl:with-param name="recursive" select="true()"/>
346
</xsl:apply-templates>
352
<xsl:text>re</xsl:text>
353
<xsl:number level="any" format="01" from="book"/>
354
<xsl:if test="not($recursive)">
355
<xsl:value-of select="$html.ext"/>
359
<xsl:when test="self::colophon">
361
<xsl:when test="/set">
362
<!-- in a set, make sure we inherit the right book info... -->
363
<xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
364
<xsl:with-param name="recursive" select="true()"/>
365
</xsl:apply-templates>
371
<xsl:text>co</xsl:text>
372
<xsl:number level="any" format="01" from="book"/>
373
<xsl:if test="not($recursive)">
374
<xsl:value-of select="$html.ext"/>
378
<xsl:when test="self::sect1
384
<xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
385
<xsl:with-param name="recursive" select="true()"/>
386
</xsl:apply-templates>
387
<xsl:text>s</xsl:text>
388
<xsl:number format="01"/>
389
<xsl:if test="not($recursive)">
390
<xsl:value-of select="$html.ext"/>
394
<xsl:when test="self::bibliography">
396
<xsl:when test="/set">
397
<!-- in a set, make sure we inherit the right book info... -->
398
<xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
399
<xsl:with-param name="recursive" select="true()"/>
400
</xsl:apply-templates>
406
<xsl:text>bi</xsl:text>
407
<xsl:number level="any" format="01" from="book"/>
408
<xsl:if test="not($recursive)">
409
<xsl:value-of select="$html.ext"/>
413
<xsl:when test="self::glossary">
415
<xsl:when test="/set">
416
<!-- in a set, make sure we inherit the right book info... -->
417
<xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
418
<xsl:with-param name="recursive" select="true()"/>
419
</xsl:apply-templates>
425
<xsl:text>go</xsl:text>
426
<xsl:number level="any" format="01" from="book"/>
427
<xsl:if test="not($recursive)">
428
<xsl:value-of select="$html.ext"/>
432
<xsl:when test="self::index">
434
<xsl:when test="/set">
435
<!-- in a set, make sure we inherit the right book info... -->
436
<xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
437
<xsl:with-param name="recursive" select="true()"/>
438
</xsl:apply-templates>
444
<xsl:text>ix</xsl:text>
445
<xsl:number level="any" format="01" from="book"/>
446
<xsl:if test="not($recursive)">
447
<xsl:value-of select="$html.ext"/>
451
<xsl:when test="self::setindex">
452
<xsl:text>si</xsl:text>
453
<xsl:number level="any" format="01" from="set"/>
454
<xsl:if test="not($recursive)">
455
<xsl:value-of select="$html.ext"/>
460
<xsl:text>chunk-filename-error-</xsl:text>
461
<xsl:value-of select="name(.)"/>
462
<xsl:number level="any" format="01" from="set"/>
463
<xsl:if test="not($recursive)">
464
<xsl:value-of select="$html.ext"/>
470
<!-- ==================================================================== -->
472
<xsl:template name="href.target.uri">
473
<xsl:param name="object" select="."/>
474
<xsl:variable name="ischunk">
475
<xsl:call-template name="chunk">
476
<xsl:with-param name="node" select="$object"/>
480
<xsl:apply-templates mode="chunk-filename" select="$object"/>
482
<xsl:if test="$ischunk='0'">
483
<xsl:text>#</xsl:text>
484
<xsl:call-template name="object.id">
485
<xsl:with-param name="object" select="$object"/>
490
<xsl:template name="href.target">
491
<xsl:param name="context" select="."/>
492
<xsl:param name="object" select="."/>
494
<xsl:variable name="href.to.uri">
495
<xsl:call-template name="href.target.uri">
496
<xsl:with-param name="object" select="$object"/>
500
<xsl:variable name="href.from.uri">
501
<xsl:call-template name="href.target.uri">
502
<xsl:with-param name="object" select="$context"/>
507
<xsl:message>href.to.uri: <xsl:value-of select="$href.to.uri"/></xsl:message>
508
<xsl:message>href.from.uri: <xsl:value-of select="$href.from.uri"/></xsl:message>
511
<xsl:variable name="href.to">
512
<xsl:call-template name="trim.common.uri.paths">
513
<xsl:with-param name="uriA" select="$href.to.uri"/>
514
<xsl:with-param name="uriB" select="$href.from.uri"/>
515
<xsl:with-param name="return" select="'A'"/>
519
<xsl:variable name="href.from">
520
<xsl:call-template name="trim.common.uri.paths">
521
<xsl:with-param name="uriA" select="$href.to.uri"/>
522
<xsl:with-param name="uriB" select="$href.from.uri"/>
523
<xsl:with-param name="return" select="'B'"/>
527
<xsl:variable name="depth">
528
<xsl:call-template name="count.uri.path.depth">
529
<xsl:with-param name="filename" select="$href.from"/>
533
<xsl:variable name="href">
534
<xsl:call-template name="copy-string">
535
<xsl:with-param name="string" select="'../'"/>
536
<xsl:with-param name="count" select="$depth"/>
538
<xsl:value-of select="$href.to"/>
543
<xsl:text>In </xsl:text>
544
<xsl:value-of select="name(.)"/>
545
<xsl:text> (</xsl:text>
546
<xsl:value-of select="$href.from"/>
547
<xsl:text>,</xsl:text>
548
<xsl:value-of select="$depth"/>
549
<xsl:text>) </xsl:text>
550
<xsl:value-of select="name($object)"/>
551
<xsl:text> href=</xsl:text>
552
<xsl:value-of select="$href"/>
556
<xsl:value-of select="$href"/>
559
<!-- ==================================================================== -->
561
<xsl:template name="html.head">
562
<xsl:param name="prev" select="/foo"/>
563
<xsl:param name="next" select="/foo"/>
564
<xsl:variable name="this" select="."/>
565
<xsl:variable name="home" select="/*[1]"/>
566
<xsl:variable name="up" select="parent::*"/>
569
<xsl:call-template name="system.head.content"/>
570
<xsl:call-template name="head.content"/>
572
<xsl:if test="$home">
574
<xsl:attribute name="href">
575
<xsl:call-template name="href.target">
576
<xsl:with-param name="object" select="$home"/>
579
<xsl:attribute name="title">
580
<xsl:apply-templates select="$home"
581
mode="object.title.markup.textonly"/>
588
<xsl:attribute name="href">
589
<xsl:call-template name="href.target">
590
<xsl:with-param name="object" select="$up"/>
593
<xsl:attribute name="title">
594
<xsl:apply-templates select="$up" mode="object.title.markup.textonly"/>
599
<xsl:if test="$prev">
600
<link rel="previous">
601
<xsl:attribute name="href">
602
<xsl:call-template name="href.target">
603
<xsl:with-param name="object" select="$prev"/>
606
<xsl:attribute name="title">
607
<xsl:apply-templates select="$prev" mode="object.title.markup.textonly"/>
612
<xsl:if test="$next">
614
<xsl:attribute name="href">
615
<xsl:call-template name="href.target">
616
<xsl:with-param name="object" select="$next"/>
619
<xsl:attribute name="title">
620
<xsl:apply-templates select="$next" mode="object.title.markup.textonly"/>
625
<xsl:if test="$html.extra.head.links != 0">
626
<xsl:for-each select="//part
632
|//appendix[not(parent::article)]|appendix
633
|//glossary[not(parent::article)]|glossary
634
|//index[not(parent::article)]|index">
635
<link rel="{local-name(.)}">
636
<xsl:attribute name="href">
637
<xsl:call-template name="href.target">
638
<xsl:with-param name="context" select="$this"/>
639
<xsl:with-param name="object" select="."/>
642
<xsl:attribute name="title">
643
<xsl:apply-templates select="." mode="object.title.markup.textonly"/>
648
<xsl:for-each select="section|sect1|refsection|refsect1">
650
<xsl:attribute name="rel">
652
<xsl:when test="local-name($this) = 'section'
653
or local-name($this) = 'refsection'">
654
<xsl:value-of select="'subsection'"/>
657
<xsl:value-of select="'section'"/>
661
<xsl:attribute name="href">
662
<xsl:call-template name="href.target">
663
<xsl:with-param name="context" select="$this"/>
664
<xsl:with-param name="object" select="."/>
667
<xsl:attribute name="title">
668
<xsl:apply-templates select="." mode="object.title.markup.textonly"/>
673
<xsl:for-each select="sect2|sect3|sect4|sect5|refsect2|refsect3">
674
<link rel="subsection">
675
<xsl:attribute name="href">
676
<xsl:call-template name="href.target">
677
<xsl:with-param name="context" select="$this"/>
678
<xsl:with-param name="object" select="."/>
681
<xsl:attribute name="title">
682
<xsl:apply-templates select="." mode="object.title.markup.textonly"/>
688
<xsl:call-template name="user.head.content"/>
692
<!-- ==================================================================== -->
694
<xsl:template name="header.navigation">
695
<xsl:param name="prev" select="/foo"/>
696
<xsl:param name="next" select="/foo"/>
697
<xsl:param name="nav.context"/>
699
<xsl:variable name="home" select="/*[1]"/>
700
<xsl:variable name="up" select="parent::*"/>
702
<xsl:variable name="row1" select="$navig.showtitles != 0"/>
703
<xsl:variable name="row2" select="count($prev) > 0
704
or (count($up) > 0
705
and generate-id($up) != generate-id($home)
706
and $navig.showtitles != 0)
707
or count($next) > 0"/>
709
<xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0'">
710
<div class="navheader">
711
<xsl:if test="$row1 or $row2">
712
<table width="100%" summary="Navigation header">
713
<xsl:if test="$row1">
715
<th colspan="3" align="center">
716
<xsl:apply-templates select="." mode="object.title.markup"/>
721
<xsl:if test="$row2">
723
<td width="20%" align="left">
724
<xsl:if test="count($prev)>0">
726
<xsl:attribute name="href">
727
<xsl:call-template name="href.target">
728
<xsl:with-param name="object" select="$prev"/>
731
<xsl:call-template name="navig.content">
732
<xsl:with-param name="direction" select="'prev'"/>
736
<xsl:text> </xsl:text>
738
<th width="60%" align="center">
740
<xsl:when test="count($up) > 0
741
and generate-id($up) != generate-id($home)
742
and $navig.showtitles != 0">
743
<xsl:apply-templates select="$up" mode="object.title.markup"/>
745
<xsl:otherwise> </xsl:otherwise>
748
<td width="20%" align="right">
749
<xsl:text> </xsl:text>
750
<xsl:if test="count($next)>0">
752
<xsl:attribute name="href">
753
<xsl:call-template name="href.target">
754
<xsl:with-param name="object" select="$next"/>
757
<xsl:call-template name="navig.content">
758
<xsl:with-param name="direction" select="'next'"/>
767
<xsl:if test="$header.rule != 0">
774
<!-- ==================================================================== -->
776
<xsl:template name="footer.navigation">
777
<xsl:param name="prev" select="/foo"/>
778
<xsl:param name="next" select="/foo"/>
779
<xsl:param name="nav.context"/>
781
<xsl:variable name="home" select="/*[1]"/>
782
<xsl:variable name="up" select="parent::*"/>
784
<xsl:variable name="row1" select="count($prev) > 0
786
or count($next) > 0"/>
788
<xsl:variable name="row2" select="($prev and $navig.showtitles != 0)
789
or (generate-id($home) != generate-id(.)
790
or $nav.context = 'toc')
791
or ($chunk.tocs.and.lots != 0
792
and $nav.context != 'toc')
793
or ($next and $navig.showtitles != 0)"/>
795
<xsl:if test="$suppress.navigation = '0' and $suppress.footer.navigation = '0'">
796
<div class="navfooter">
797
<xsl:if test="$footer.rule != 0">
801
<xsl:if test="$row1 or $row2">
802
<table width="100%" summary="Navigation footer">
803
<xsl:if test="$row1">
805
<td width="40%" align="left">
806
<xsl:if test="count($prev)>0">
808
<xsl:attribute name="href">
809
<xsl:call-template name="href.target">
810
<xsl:with-param name="object" select="$prev"/>
813
<xsl:call-template name="navig.content">
814
<xsl:with-param name="direction" select="'prev'"/>
818
<xsl:text> </xsl:text>
820
<td width="20%" align="center">
822
<xsl:when test="count($up)>0">
824
<xsl:attribute name="href">
825
<xsl:call-template name="href.target">
826
<xsl:with-param name="object" select="$up"/>
829
<xsl:call-template name="navig.content">
830
<xsl:with-param name="direction" select="'up'"/>
834
<xsl:otherwise> </xsl:otherwise>
837
<td width="40%" align="right">
838
<xsl:text> </xsl:text>
839
<xsl:if test="count($next)>0">
841
<xsl:attribute name="href">
842
<xsl:call-template name="href.target">
843
<xsl:with-param name="object" select="$next"/>
846
<xsl:call-template name="navig.content">
847
<xsl:with-param name="direction" select="'next'"/>
855
<xsl:if test="$row2">
857
<td width="40%" align="left" valign="top">
858
<xsl:if test="$navig.showtitles != 0">
859
<xsl:apply-templates select="$prev" mode="object.title.markup"/>
861
<xsl:text> </xsl:text>
863
<td width="20%" align="center">
865
<xsl:when test="$home != . or $nav.context = 'toc'">
867
<xsl:attribute name="href">
868
<xsl:call-template name="href.target">
869
<xsl:with-param name="object" select="$home"/>
872
<xsl:call-template name="navig.content">
873
<xsl:with-param name="direction" select="'home'"/>
876
<xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
877
<xsl:text> | </xsl:text>
880
<xsl:otherwise> </xsl:otherwise>
883
<xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
885
<xsl:attribute name="href">
886
<xsl:apply-templates select="/*[1]"
887
mode="recursive-chunk-filename"/>
888
<xsl:text>-toc</xsl:text>
889
<xsl:value-of select="$html.ext"/>
891
<xsl:call-template name="gentext">
892
<xsl:with-param name="key" select="'nav-toc'"/>
897
<td width="40%" align="right" valign="top">
898
<xsl:text> </xsl:text>
899
<xsl:if test="$navig.showtitles != 0">
900
<xsl:apply-templates select="$next" mode="object.title.markup"/>
911
<!-- ==================================================================== -->
913
<xsl:template name="navig.content">
914
<xsl:param name="direction" select="next"/>
915
<xsl:variable name="navtext">
917
<xsl:when test="$direction = 'prev'">
918
<xsl:call-template name="gentext.nav.prev"/>
920
<xsl:when test="$direction = 'next'">
921
<xsl:call-template name="gentext.nav.next"/>
923
<xsl:when test="$direction = 'up'">
924
<xsl:call-template name="gentext.nav.up"/>
926
<xsl:when test="$direction = 'home'">
927
<xsl:call-template name="gentext.nav.home"/>
930
<xsl:text>xxx</xsl:text>
936
<xsl:when test="$navig.graphics != 0">
938
<xsl:attribute name="src">
939
<xsl:value-of select="$navig.graphics.path"/>
940
<xsl:value-of select="$direction"/>
941
<xsl:value-of select="$navig.graphics.extension"/>
943
<xsl:attribute name="alt">
944
<xsl:value-of select="$navtext"/>
949
<xsl:value-of select="$navtext"/>
954
<!-- ==================================================================== -->
956
<xsl:template match="processing-instruction('dbhtml')">
960
<!-- ==================================================================== -->
962
<xsl:template name="chunk-element-content">
963
<xsl:param name="prev"/>
964
<xsl:param name="next"/>
965
<xsl:param name="nav.context"/>
966
<xsl:param name="content">
971
<xsl:call-template name="html.head">
972
<xsl:with-param name="prev" select="$prev"/>
973
<xsl:with-param name="next" select="$next"/>
977
<xsl:call-template name="body.attributes"/>
978
<xsl:call-template name="user.header.navigation"/>
980
<xsl:call-template name="header.navigation">
981
<xsl:with-param name="prev" select="$prev"/>
982
<xsl:with-param name="next" select="$next"/>
983
<xsl:with-param name="nav.context" select="$nav.context"/>
986
<xsl:call-template name="user.header.content"/>
988
<xsl:copy-of select="$content"/>
990
<xsl:call-template name="user.footer.content"/>
992
<xsl:call-template name="footer.navigation">
993
<xsl:with-param name="prev" select="$prev"/>
994
<xsl:with-param name="next" select="$next"/>
995
<xsl:with-param name="nav.context" select="$nav.context"/>
998
<xsl:call-template name="user.footer.navigation"/>