1 <?xml version="1.0" encoding="ASCII"?><!--This file was created automatically by html2xhtml--><!--from the HTML stylesheets.--><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://docbook.org/ns/docbook" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="d" version="1.0">
3 <!-- ********************************************************************
5 This file is part of the XSL DocBook Stylesheet distribution.
6 See ../README or http://cdn.docbook.org/release/xsl/current/ for
7 copyright and other information.
9 ******************************************************************** -->
11 <xsl:variable name="toc.listitem.type">
13 <xsl:when test="$toc.list.type = 'dl'">dt</xsl:when>
14 <xsl:otherwise>li</xsl:otherwise>
18 <!-- this is just hack because dl and ul aren't completely isomorphic -->
19 <xsl:variable name="toc.dd.type">
21 <xsl:when test="$toc.list.type = 'dl'">dd</xsl:when>
26 <xsl:template name="make.toc">
27 <xsl:param name="toc-context" select="."/>
28 <xsl:param name="toc.title.p" select="true()"/>
29 <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/>
31 <xsl:variable name="nodes.plus" select="$nodes | d:qandaset"/>
33 <xsl:variable name="toc.title">
34 <xsl:if test="$toc.title.p">
36 <xsl:when test="$make.clean.html != 0">
37 <div class="toc-title">
38 <xsl:call-template name="gentext">
39 <xsl:with-param name="key">TableofContents</xsl:with-param>
46 <xsl:call-template name="gentext">
47 <xsl:with-param name="key">TableofContents</xsl:with-param>
57 <xsl:when test="$manual.toc != ''">
58 <xsl:variable name="id">
59 <xsl:call-template name="object.id"/>
61 <xsl:variable name="toc" select="document($manual.toc, .)"/>
62 <xsl:variable name="tocentry" select="$toc//d:tocentry[@linkend=$id]"/>
63 <xsl:if test="$tocentry and $tocentry/*">
65 <xsl:copy-of select="$toc.title"/>
66 <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
67 <xsl:call-template name="toc.list.attributes">
68 <xsl:with-param name="toc-context" select="$toc-context"/>
69 <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
70 <xsl:with-param name="nodes" select="$nodes"/>
72 <xsl:call-template name="manual-toc">
73 <xsl:with-param name="tocentry" select="$tocentry/*[1]"/>
81 <xsl:when test="$qanda.in.toc != 0">
82 <xsl:if test="$nodes.plus">
84 <xsl:copy-of select="$toc.title"/>
85 <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
86 <xsl:call-template name="toc.list.attributes">
87 <xsl:with-param name="toc-context" select="$toc-context"/>
88 <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
89 <xsl:with-param name="nodes" select="$nodes"/>
91 <xsl:apply-templates select="$nodes.plus" mode="toc">
92 <xsl:with-param name="toc-context" select="$toc-context"/>
93 </xsl:apply-templates>
99 <xsl:if test="$nodes">
101 <xsl:copy-of select="$toc.title"/>
102 <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
103 <xsl:call-template name="toc.list.attributes">
104 <xsl:with-param name="toc-context" select="$toc-context"/>
105 <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
106 <xsl:with-param name="nodes" select="$nodes"/>
108 <xsl:apply-templates select="$nodes" mode="toc">
109 <xsl:with-param name="toc-context" select="$toc-context"/>
110 </xsl:apply-templates>
121 <xsl:template name="toc.list.attributes">
122 <xsl:param name="toc-context" select="."/>
123 <xsl:param name="toc.title.p" select="true()"/>
124 <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/>
126 <xsl:attribute name="class">toc</xsl:attribute>
129 <xsl:template name="make.lots">
130 <xsl:param name="toc.params" select="''"/>
131 <xsl:param name="toc"/>
133 <xsl:if test="contains($toc.params, 'toc')">
134 <xsl:copy-of select="$toc"/>
137 <xsl:if test="contains($toc.params, 'figure')">
138 <xsl:call-template name="list.of.titles">
139 <xsl:with-param name="titles" select="'figure'"/>
140 <xsl:with-param name="nodes" select=".//d:figure"/>
144 <xsl:if test="contains($toc.params, 'table')">
145 <xsl:call-template name="list.of.titles">
146 <xsl:with-param name="titles" select="'table'"/>
147 <xsl:with-param name="nodes" select=".//d:table[not(@tocentry = 0)]"/>
151 <xsl:if test="contains($toc.params, 'example')">
152 <xsl:call-template name="list.of.titles">
153 <xsl:with-param name="titles" select="'example'"/>
154 <xsl:with-param name="nodes" select=".//d:example"/>
158 <xsl:if test="contains($toc.params, 'equation')">
159 <xsl:call-template name="list.of.titles">
160 <xsl:with-param name="titles" select="'equation'"/>
161 <xsl:with-param name="nodes" select=".//d:equation[d:title or d:info/d:title]"/>
165 <xsl:if test="contains($toc.params, 'procedure')">
166 <xsl:call-template name="list.of.titles">
167 <xsl:with-param name="titles" select="'procedure'"/>
168 <xsl:with-param name="nodes" select=".//d:procedure[d:title]"/>
173 <!-- ====================================================================== -->
175 <xsl:template name="set.toc">
176 <xsl:param name="toc-context" select="."/>
177 <xsl:param name="toc.title.p" select="true()"/>
179 <xsl:call-template name="make.toc">
180 <xsl:with-param name="toc-context" select="$toc-context"/>
181 <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
182 <xsl:with-param name="nodes" select="d:book|d:setindex|d:set|d:article"/>
186 <xsl:template name="division.toc">
187 <xsl:param name="toc-context" select="."/>
188 <xsl:param name="toc.title.p" select="true()"/>
190 <xsl:call-template name="make.toc">
191 <xsl:with-param name="toc-context" select="$toc-context"/>
192 <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
193 <xsl:with-param name="nodes" select="d:part|d:reference |d:preface|d:chapter|d:appendix |d:article |d:topic |d:bibliography|d:glossary|d:index |d:refentry |d:bridgehead[$bridgehead.in.toc != 0]"/>
198 <xsl:template name="component.toc">
199 <xsl:param name="toc-context" select="."/>
200 <xsl:param name="toc.title.p" select="true()"/>
202 <xsl:call-template name="make.toc">
203 <xsl:with-param name="toc-context" select="$toc-context"/>
204 <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
205 <xsl:with-param name="nodes" select="d:section|d:sect1 |d:simplesect[$simplesect.in.toc != 0] |d:topic |d:refentry |d:article|d:bibliography|d:glossary |d:appendix|d:index |d:bridgehead[not(@renderas) and $bridgehead.in.toc != 0] |.//d:bridgehead[@renderas='sect1' and $bridgehead.in.toc != 0]"/>
209 <xsl:template name="component.toc.separator">
210 <!-- Customize to output something between
211 component.toc and first output -->
214 <xsl:template name="section.toc">
215 <xsl:param name="toc-context" select="."/>
216 <xsl:param name="toc.title.p" select="true()"/>
218 <xsl:call-template name="make.toc">
219 <xsl:with-param name="toc-context" select="$toc-context"/>
220 <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
221 <xsl:with-param name="nodes" select="d:section|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:refentry |d:bridgehead[$bridgehead.in.toc != 0]"/>
226 <xsl:template name="section.toc.separator">
227 <!-- Customize to output something between
228 section.toc and first output -->
230 <!-- ==================================================================== -->
232 <xsl:template name="subtoc">
233 <xsl:param name="toc-context" select="."/>
234 <xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
236 <xsl:variable name="nodes.plus" select="$nodes | d:qandaset"/>
238 <xsl:variable name="subtoc">
239 <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
241 <xsl:when test="$qanda.in.toc != 0">
242 <xsl:apply-templates mode="toc" select="$nodes.plus">
243 <xsl:with-param name="toc-context" select="$toc-context"/>
244 </xsl:apply-templates>
247 <xsl:apply-templates mode="toc" select="$nodes">
248 <xsl:with-param name="toc-context" select="$toc-context"/>
249 </xsl:apply-templates>
255 <xsl:variable name="depth">
257 <xsl:when test="local-name(.) = 'section'">
258 <xsl:value-of select="count(ancestor::d:section) + 1"/>
260 <xsl:when test="local-name(.) = 'sect1'">1</xsl:when>
261 <xsl:when test="local-name(.) = 'sect2'">2</xsl:when>
262 <xsl:when test="local-name(.) = 'sect3'">3</xsl:when>
263 <xsl:when test="local-name(.) = 'sect4'">4</xsl:when>
264 <xsl:when test="local-name(.) = 'sect5'">5</xsl:when>
265 <xsl:when test="local-name(.) = 'refsect1'">1</xsl:when>
266 <xsl:when test="local-name(.) = 'refsect2'">2</xsl:when>
267 <xsl:when test="local-name(.) = 'refsect3'">3</xsl:when>
268 <xsl:when test="local-name(.) = 'topic'">1</xsl:when>
269 <xsl:when test="local-name(.) = 'simplesect'">
272 <xsl:when test="local-name(..) = 'section'">
273 <xsl:value-of select="count(ancestor::d:section)"/>
275 <xsl:when test="local-name(..) = 'sect1'">2</xsl:when>
276 <xsl:when test="local-name(..) = 'sect2'">3</xsl:when>
277 <xsl:when test="local-name(..) = 'sect3'">4</xsl:when>
278 <xsl:when test="local-name(..) = 'sect4'">5</xsl:when>
279 <xsl:when test="local-name(..) = 'sect5'">6</xsl:when>
280 <xsl:when test="local-name(..) = 'topic'">2</xsl:when>
281 <xsl:when test="local-name(..) = 'refsect1'">2</xsl:when>
282 <xsl:when test="local-name(..) = 'refsect2'">3</xsl:when>
283 <xsl:when test="local-name(..) = 'refsect3'">4</xsl:when>
284 <xsl:otherwise>1</xsl:otherwise>
287 <xsl:otherwise>0</xsl:otherwise>
291 <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
293 <xsl:variable name="subtoc.list">
295 <xsl:when test="$toc.dd.type = ''">
296 <xsl:copy-of select="$subtoc"/>
299 <xsl:element name="{$toc.dd.type}" namespace="http://www.w3.org/1999/xhtml">
300 <xsl:copy-of select="$subtoc"/>
306 <xsl:element name="{$toc.listitem.type}" namespace="http://www.w3.org/1999/xhtml">
307 <xsl:call-template name="toc.line">
308 <xsl:with-param name="toc-context" select="$toc-context"/>
310 <xsl:if test="$toc.listitem.type = 'li' and ( (self::d:set or self::d:book or self::d:part) or $toc.section.depth > $depth) and ( ($qanda.in.toc = 0 and count($nodes)>0) or ($qanda.in.toc != 0 and count($nodes.plus)>0) ) and $toc.max.depth > $depth.from.context">
311 <xsl:copy-of select="$subtoc.list"/>
314 <xsl:if test="$toc.listitem.type != 'li' and ( (self::d:set or self::d:book or self::d:part) or $toc.section.depth > $depth) and ( ($qanda.in.toc = 0 and count($nodes)>0) or ($qanda.in.toc != 0 and count($nodes.plus)>0) ) and $toc.max.depth > $depth.from.context">
315 <xsl:copy-of select="$subtoc.list"/>
319 <xsl:template name="toc.line">
320 <xsl:param name="toc-context" select="."/>
321 <xsl:param name="depth" select="1"/>
322 <xsl:param name="depth.from.context" select="8"/>
325 <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
327 <!-- * if $autotoc.label.in.hyperlink is zero, then output the label -->
328 <!-- * before the hyperlinked title (as the DSSSL stylesheet does) -->
329 <xsl:if test="$autotoc.label.in.hyperlink = 0">
330 <xsl:variable name="label">
331 <xsl:apply-templates select="." mode="label.markup"/>
333 <xsl:copy-of select="$label"/>
334 <xsl:if test="$label != ''">
335 <xsl:value-of select="$autotoc.label.separator"/>
340 <xsl:attribute name="href">
341 <xsl:call-template name="href.target">
342 <xsl:with-param name="context" select="$toc-context"/>
343 <xsl:with-param name="toc-context" select="$toc-context"/>
347 <!-- * if $autotoc.label.in.hyperlink is non-zero, then output the label -->
348 <!-- * as part of the hyperlinked title -->
349 <xsl:if test="not($autotoc.label.in.hyperlink = 0)">
350 <xsl:variable name="label">
351 <xsl:apply-templates select="." mode="label.markup"/>
353 <xsl:copy-of select="$label"/>
354 <xsl:if test="$label != ''">
355 <xsl:value-of select="$autotoc.label.separator"/>
359 <xsl:apply-templates select="." mode="titleabbrev.markup"/>
364 <xsl:template match="d:set" mode="toc">
365 <xsl:param name="toc-context" select="."/>
367 <xsl:call-template name="subtoc">
368 <xsl:with-param name="toc-context" select="$toc-context"/>
369 <xsl:with-param name="nodes" select="d:set|d:book|d:setindex|d:article"/>
373 <xsl:template match="d:book" mode="toc">
374 <xsl:param name="toc-context" select="."/>
376 <xsl:call-template name="subtoc">
377 <xsl:with-param name="toc-context" select="$toc-context"/>
378 <xsl:with-param name="nodes" select="d:part|d:reference |d:preface|d:chapter|d:appendix |d:article |d:topic |d:bibliography|d:glossary|d:index |d:refentry |d:bridgehead[$bridgehead.in.toc != 0]"/>
382 <xsl:template match="d:setindex" mode="toc">
383 <xsl:param name="toc-context" select="."/>
385 <!-- If the setindex tag is not empty, it should be it in the TOC -->
386 <xsl:if test="* or $generate.index != 0">
387 <xsl:call-template name="subtoc">
388 <xsl:with-param name="toc-context" select="$toc-context"/>
393 <xsl:template match="d:part|d:reference" mode="toc">
394 <xsl:param name="toc-context" select="."/>
396 <xsl:call-template name="subtoc">
397 <xsl:with-param name="toc-context" select="$toc-context"/>
398 <xsl:with-param name="nodes" select="d:appendix|d:chapter|d:article|d:topic |d:index|d:glossary|d:bibliography |d:preface|d:reference|d:refentry |d:bridgehead[$bridgehead.in.toc != 0]"/>
402 <xsl:template match="d:preface|d:chapter|d:appendix|d:article|d:topic" mode="toc">
403 <xsl:param name="toc-context" select="."/>
405 <xsl:call-template name="subtoc">
406 <xsl:with-param name="toc-context" select="$toc-context"/>
407 <xsl:with-param name="nodes" select="d:section|d:sect1 |d:simplesect[$simplesect.in.toc != 0] |d:topic |d:refentry |d:glossary|d:bibliography|d:index |d:bridgehead[$bridgehead.in.toc != 0]"/>
411 <xsl:template match="d:sect1" mode="toc">
412 <xsl:param name="toc-context" select="."/>
413 <xsl:call-template name="subtoc">
414 <xsl:with-param name="toc-context" select="$toc-context"/>
415 <xsl:with-param name="nodes" select="d:sect2 |d:bridgehead[$bridgehead.in.toc != 0]"/>
419 <xsl:template match="d:sect2" mode="toc">
420 <xsl:param name="toc-context" select="."/>
422 <xsl:call-template name="subtoc">
423 <xsl:with-param name="toc-context" select="$toc-context"/>
424 <xsl:with-param name="nodes" select="d:sect3 |d:bridgehead[$bridgehead.in.toc != 0]"/>
428 <xsl:template match="d:sect3" mode="toc">
429 <xsl:param name="toc-context" select="."/>
431 <xsl:call-template name="subtoc">
432 <xsl:with-param name="toc-context" select="$toc-context"/>
433 <xsl:with-param name="nodes" select="d:sect4 |d:bridgehead[$bridgehead.in.toc != 0]"/>
437 <xsl:template match="d:sect4" mode="toc">
438 <xsl:param name="toc-context" select="."/>
440 <xsl:call-template name="subtoc">
441 <xsl:with-param name="toc-context" select="$toc-context"/>
442 <xsl:with-param name="nodes" select="d:sect5 |d:bridgehead[$bridgehead.in.toc != 0]"/>
446 <xsl:template match="d:sect5" mode="toc">
447 <xsl:param name="toc-context" select="."/>
449 <xsl:call-template name="subtoc">
450 <xsl:with-param name="toc-context" select="$toc-context"/>
454 <xsl:template match="d:simplesect" mode="toc">
455 <xsl:param name="toc-context" select="."/>
457 <xsl:call-template name="subtoc">
458 <xsl:with-param name="toc-context" select="$toc-context"/>
462 <xsl:template match="d:section" mode="toc">
463 <xsl:param name="toc-context" select="."/>
465 <xsl:call-template name="subtoc">
466 <xsl:with-param name="toc-context" select="$toc-context"/>
467 <xsl:with-param name="nodes" select="d:section|d:refentry |d:simplesect[$simplesect.in.toc != 0] |d:bridgehead[$bridgehead.in.toc != 0]"/>
471 <xsl:template match="d:topic" mode="toc">
472 <xsl:param name="toc-context" select="."/>
474 <xsl:call-template name="subtoc">
475 <xsl:with-param name="toc-context" select="$toc-context"/>
476 <xsl:with-param name="nodes" select="d:section|d:refentry |d:simplesect[$simplesect.in.toc != 0] |d:bridgehead[$bridgehead.in.toc != 0]"/>
480 <xsl:template match="d:bridgehead" mode="toc">
481 <xsl:param name="toc-context" select="."/>
483 <xsl:if test="$bridgehead.in.toc != 0">
484 <xsl:call-template name="subtoc">
485 <xsl:with-param name="toc-context" select="$toc-context"/>
490 <xsl:template match="d:bibliography|d:glossary" mode="toc">
491 <xsl:param name="toc-context" select="."/>
493 <xsl:call-template name="subtoc">
494 <xsl:with-param name="toc-context" select="$toc-context"/>
498 <xsl:template match="d:index" mode="toc">
499 <xsl:param name="toc-context" select="."/>
501 <!-- If the index tag is not empty, it should be it in the TOC -->
502 <xsl:if test="* or $generate.index != 0">
503 <xsl:call-template name="subtoc">
504 <xsl:with-param name="toc-context" select="$toc-context"/>
509 <xsl:template match="d:refentry" mode="toc">
510 <xsl:param name="toc-context" select="."/>
512 <xsl:variable name="refmeta" select=".//d:refmeta"/>
513 <xsl:variable name="refentrytitle" select="$refmeta//d:refentrytitle"/>
514 <xsl:variable name="refnamediv" select=".//d:refnamediv"/>
515 <xsl:variable name="refname" select="$refnamediv//d:refname"/>
516 <xsl:variable name="refdesc" select="$refnamediv//d:refdescriptor"/>
517 <xsl:variable name="title">
519 <xsl:when test="$refentrytitle">
520 <xsl:apply-templates select="$refentrytitle[1]" mode="titleabbrev.markup"/>
522 <xsl:when test="$refdesc">
523 <xsl:apply-templates select="$refdesc" mode="titleabbrev.markup"/>
525 <xsl:when test="$refname">
526 <xsl:apply-templates select="$refname[1]" mode="titleabbrev.markup"/>
531 <xsl:element name="{$toc.listitem.type}" namespace="http://www.w3.org/1999/xhtml">
532 <span class="refentrytitle">
534 <xsl:attribute name="href">
535 <xsl:call-template name="href.target">
536 <xsl:with-param name="toc-context" select="$toc-context"/>
539 <xsl:copy-of select="$title"/>
542 <span class="refpurpose">
543 <xsl:if test="$annotate.toc != 0">
544 <!-- * DocBook 5 says inlinemediaobject (among other things) -->
545 <!-- * is allowed in refpurpose; so we need to run -->
546 <!-- * apply-templates on refpurpose here, instead of value-of -->
547 <xsl:apply-templates select="d:refnamediv/d:refpurpose" mode="no.anchor.mode"/>
553 <xsl:template match="d:title" mode="toc">
554 <xsl:param name="toc-context" select="."/>
557 <xsl:attribute name="href">
558 <xsl:call-template name="href.target">
559 <xsl:with-param name="object" select=".."/>
560 <xsl:with-param name="toc-context" select="$toc-context"/>
563 <xsl:apply-templates/>
567 <xsl:template name="manual-toc">
568 <xsl:param name="toc-context" select="."/>
569 <xsl:param name="tocentry"/>
570 <xsl:param name="toc.title.p" select="true()"/>
571 <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/>
573 <!-- be careful, we don't want to change the current document to the other tree! -->
575 <xsl:if test="$tocentry">
576 <xsl:variable name="node" select="key('id', $tocentry/@linkend)"/>
578 <xsl:element name="{$toc.listitem.type}" namespace="http://www.w3.org/1999/xhtml">
579 <xsl:variable name="label">
580 <xsl:apply-templates select="$node" mode="label.markup"/>
582 <xsl:copy-of select="$label"/>
583 <xsl:if test="$label != ''">
584 <xsl:value-of select="$autotoc.label.separator"/>
587 <xsl:attribute name="href">
588 <xsl:call-template name="href.target">
589 <xsl:with-param name="object" select="$node"/>
590 <xsl:with-param name="toc-context" select="$toc-context"/>
593 <xsl:apply-templates select="$node" mode="titleabbrev.markup"/>
597 <xsl:if test="$tocentry/*">
598 <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
599 <xsl:call-template name="toc.list.attributes">
600 <xsl:with-param name="toc-context" select="$toc-context"/>
601 <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
602 <xsl:with-param name="nodes" select="$nodes"/>
604 <xsl:call-template name="manual-toc">
605 <xsl:with-param name="tocentry" select="$tocentry/*[1]"/>
610 <xsl:if test="$tocentry/following-sibling::*">
611 <xsl:call-template name="manual-toc">
612 <xsl:with-param name="tocentry" select="$tocentry/following-sibling::*[1]"/>
618 <!-- ==================================================================== -->
620 <xsl:template name="list.of.titles">
621 <xsl:param name="toc-context" select="."/>
622 <xsl:param name="titles" select="'table'"/>
623 <xsl:param name="nodes" select=".//d:table"/>
625 <xsl:if test="$nodes">
626 <div class="list-of-{$titles}s">
628 <xsl:when test="$make.clean.html != 0">
629 <div class="toc-title">
630 <xsl:call-template name="gentext">
631 <xsl:with-param name="key">
633 <xsl:when test="$titles='table'">ListofTables</xsl:when>
634 <xsl:when test="$titles='figure'">ListofFigures</xsl:when>
635 <xsl:when test="$titles='equation'">ListofEquations</xsl:when>
636 <xsl:when test="$titles='example'">ListofExamples</xsl:when>
637 <xsl:when test="$titles='procedure'">ListofProcedures</xsl:when>
638 <xsl:otherwise>ListofUnknown</xsl:otherwise>
647 <xsl:call-template name="gentext">
648 <xsl:with-param name="key">
650 <xsl:when test="$titles='table'">ListofTables</xsl:when>
651 <xsl:when test="$titles='figure'">ListofFigures</xsl:when>
652 <xsl:when test="$titles='equation'">ListofEquations</xsl:when>
653 <xsl:when test="$titles='example'">ListofExamples</xsl:when>
654 <xsl:when test="$titles='procedure'">ListofProcedures</xsl:when>
655 <xsl:otherwise>ListofUnknown</xsl:otherwise>
664 <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
665 <xsl:apply-templates select="$nodes" mode="toc">
666 <xsl:with-param name="toc-context" select="$toc-context"/>
667 </xsl:apply-templates>
673 <xsl:template match="d:figure|d:table|d:example|d:equation|d:procedure" mode="toc">
674 <xsl:param name="toc-context" select="."/>
676 <xsl:element name="{$toc.listitem.type}" namespace="http://www.w3.org/1999/xhtml">
677 <xsl:variable name="label">
678 <xsl:apply-templates select="." mode="label.markup"/>
680 <xsl:copy-of select="$label"/>
681 <xsl:if test="$label != ''">
682 <xsl:value-of select="$autotoc.label.separator"/>
685 <xsl:attribute name="href">
686 <xsl:call-template name="href.target">
687 <xsl:with-param name="toc-context" select="$toc-context"/>
690 <xsl:apply-templates select="." mode="titleabbrev.markup"/>
695 <!-- Used only if qanda.in.toc parameter is non-zero -->
696 <xsl:template match="d:qandaset" mode="toc">
697 <xsl:param name="toc-context" select="."/>
698 <xsl:call-template name="subtoc">
699 <xsl:with-param name="toc-context" select="$toc-context"/>
700 <xsl:with-param name="nodes" select="d:qandadiv | d:qandaentry"/>
704 <xsl:template match="d:qandadiv|d:qandaentry" mode="toc">
705 <xsl:apply-templates select="." mode="qandatoc.mode"/>