2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 exclude-result-prefixes="doc"
8 <!-- ********************************************************************
9 $Id: titles.xsl 9920 2014-07-23 17:55:51Z bobstayton $
10 ********************************************************************
12 This file is part of the XSL DocBook Stylesheet distribution.
13 See ../README or http://docbook.sf.net/release/xsl/current/ for
14 copyright and other information.
16 ******************************************************************** -->
18 <!-- ==================================================================== -->
22 <doc:mode mode="title.markup" xmlns="">
23 <refpurpose>Provides access to element titles</refpurpose>
24 <refdescription id="title.markup-desc">
25 <para>Processing an element in the
26 <literal role="mode">title.markup</literal> mode produces the
27 title of the element. This does not include the label.
32 <xsl:template match="*" mode="title.markup">
33 <xsl:param name="allow-anchors" select="0"/>
34 <xsl:param name="verbose" select="1"/>
36 <!-- * FIXME: this should handle other *info elements as well -->
37 <!-- * but this is good enough for now. -->
38 <xsl:when test="title|info/title">
39 <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
40 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
41 </xsl:apply-templates>
43 <xsl:when test="local-name(.) = 'partintro'">
44 <!-- partintro's don't have titles, use the parent (part or reference)
46 <xsl:apply-templates select="parent::*" mode="title.markup"/>
49 <xsl:if test="$verbose != 0">
51 <xsl:text>Request for title of element with no title: </xsl:text>
52 <xsl:value-of select="local-name(.)"/>
55 <xsl:text> (id="</xsl:text>
56 <xsl:value-of select="@id"/>
57 <xsl:text>")</xsl:text>
59 <xsl:when test="@xml:id">
60 <xsl:text> (xml:id="</xsl:text>
61 <xsl:value-of select="@xml:id"/>
62 <xsl:text>")</xsl:text>
65 <xsl:text> (contained in </xsl:text>
66 <xsl:value-of select="local-name(..)"/>
67 <xsl:if test="../@id or ../@xml:id">
68 <xsl:text> with id </xsl:text>
69 <xsl:value-of select="../@id | ../@xml:id"/>
71 <xsl:text>)</xsl:text>
76 <xsl:text>???TITLE???</xsl:text>
81 <xsl:template match="title" mode="title.markup">
82 <xsl:param name="allow-anchors" select="0"/>
85 <xsl:when test="$allow-anchors != 0">
86 <xsl:apply-templates/>
89 <xsl:apply-templates mode="no.anchor.mode"/>
94 <!-- only occurs in HTML Tables! -->
95 <xsl:template match="caption" mode="title.markup">
96 <xsl:param name="allow-anchors" select="0"/>
99 <xsl:when test="$allow-anchors != 0">
100 <xsl:apply-templates/>
103 <xsl:apply-templates mode="no.anchor.mode"/>
108 <xsl:template match="set" mode="title.markup">
109 <xsl:param name="allow-anchors" select="0"/>
110 <xsl:apply-templates select="(setinfo/title|info/title|title)[1]"
112 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
113 </xsl:apply-templates>
116 <xsl:template match="book" mode="title.markup">
117 <xsl:param name="allow-anchors" select="0"/>
118 <xsl:apply-templates select="(bookinfo/title|info/title|title)[1]"
120 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
121 </xsl:apply-templates>
124 <xsl:template match="part" mode="title.markup">
125 <xsl:param name="allow-anchors" select="0"/>
126 <xsl:apply-templates select="(partinfo/title|info/title|docinfo/title|title)[1]"
128 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
129 </xsl:apply-templates>
132 <xsl:template match="preface|chapter|appendix" mode="title.markup">
133 <xsl:param name="allow-anchors" select="0"/>
137 <xsl:value-of select="local-name(.)"/>
138 <xsl:text> </xsl:text>
139 <xsl:value-of select="$allow-anchors"/>
143 <xsl:variable name="title" select="(docinfo/title
149 <xsl:apply-templates select="$title" mode="title.markup">
150 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
151 </xsl:apply-templates>
154 <xsl:template match="dedication" mode="title.markup">
155 <xsl:param name="allow-anchors" select="0"/>
157 <xsl:when test="title|info/title">
158 <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
159 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
160 </xsl:apply-templates>
163 <xsl:call-template name="gentext">
164 <xsl:with-param name="key" select="'Dedication'"/>
170 <xsl:template match="acknowledgements" mode="title.markup">
171 <xsl:param name="allow-anchors" select="0"/>
173 <xsl:when test="title|info/title">
174 <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
175 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
176 </xsl:apply-templates>
179 <xsl:call-template name="gentext">
180 <xsl:with-param name="key" select="'Acknowledgements'"/>
186 <xsl:template match="colophon" mode="title.markup">
187 <xsl:param name="allow-anchors" select="0"/>
189 <xsl:when test="title|info/title">
190 <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
191 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
192 </xsl:apply-templates>
195 <xsl:call-template name="gentext">
196 <xsl:with-param name="key" select="'Colophon'"/>
202 <xsl:template match="article" mode="title.markup">
203 <xsl:param name="allow-anchors" select="0"/>
204 <xsl:variable name="title" select="(artheader/title
209 <xsl:apply-templates select="$title" mode="title.markup">
210 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
211 </xsl:apply-templates>
214 <xsl:template match="reference" mode="title.markup">
215 <xsl:param name="allow-anchors" select="0"/>
216 <xsl:apply-templates select="(referenceinfo/title|docinfo/title|info/title|title)[1]"
218 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
219 </xsl:apply-templates>
222 <xsl:template match="refentry" mode="title.markup">
223 <xsl:param name="allow-anchors" select="0"/>
224 <xsl:variable name="refmeta" select=".//refmeta"/>
225 <xsl:variable name="refentrytitle" select="$refmeta//refentrytitle"/>
226 <xsl:variable name="refnamediv" select=".//refnamediv"/>
227 <xsl:variable name="refname" select="$refnamediv//refname"/>
228 <xsl:variable name="refdesc" select="$refnamediv//refdescriptor"/>
230 <xsl:variable name="title">
232 <xsl:when test="$refentrytitle">
233 <xsl:apply-templates select="$refentrytitle[1]" mode="title.markup"/>
235 <xsl:when test="$refdesc">
236 <xsl:apply-templates select="$refdesc" mode="title.markup"/>
238 <xsl:when test="$refname">
239 <xsl:apply-templates select="$refname[1]" mode="title.markup"/>
241 <xsl:otherwise>REFENTRY WITHOUT TITLE???</xsl:otherwise>
245 <xsl:copy-of select="$title"/>
248 <xsl:template match="refentrytitle|refname|refdescriptor" mode="title.markup">
249 <xsl:param name="allow-anchors" select="0"/>
251 <xsl:when test="$allow-anchors != 0">
252 <xsl:apply-templates/>
255 <xsl:apply-templates mode="no.anchor.mode"/>
260 <xsl:template match="section
261 |sect1|sect2|sect3|sect4|sect5
262 |refsect1|refsect2|refsect3|refsection
266 <xsl:param name="allow-anchors" select="0"/>
267 <xsl:variable name="title" select="(info/title
277 |refsectioninfo/title
280 <xsl:apply-templates select="$title" mode="title.markup">
281 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
282 </xsl:apply-templates>
285 <xsl:template match="bridgehead" mode="title.markup">
286 <xsl:apply-templates/>
289 <xsl:template match="refsynopsisdiv" mode="title.markup">
290 <xsl:param name="allow-anchors" select="0"/>
292 <xsl:when test="title|info/title">
293 <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
294 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
295 </xsl:apply-templates>
298 <xsl:call-template name="gentext">
299 <xsl:with-param name="key" select="'RefSynopsisDiv'"/>
305 <xsl:template match="bibliography" mode="title.markup">
306 <xsl:param name="allow-anchors" select="0"/>
307 <xsl:variable name="title" select="(bibliographyinfo/title|info/title|title)[1]"/>
309 <xsl:when test="$title">
310 <xsl:apply-templates select="$title" mode="title.markup">
311 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
312 </xsl:apply-templates>
315 <xsl:call-template name="gentext">
316 <xsl:with-param name="key" select="'Bibliography'"/>
322 <xsl:template match="glossary" mode="title.markup">
323 <xsl:param name="allow-anchors" select="0"/>
324 <xsl:variable name="title" select="(glossaryinfo/title|info/title|title)[1]"/>
326 <xsl:when test="$title">
327 <xsl:apply-templates select="$title" mode="title.markup">
328 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
329 </xsl:apply-templates>
332 <xsl:call-template name="gentext.element.name">
333 <xsl:with-param name="element.name" select="local-name(.)"/>
339 <xsl:template match="glossdiv" mode="title.markup">
340 <xsl:param name="allow-anchors" select="0"/>
341 <xsl:variable name="title" select="(info/title|title)[1]"/>
343 <xsl:when test="$title">
344 <xsl:apply-templates select="$title" mode="title.markup">
345 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
346 </xsl:apply-templates>
349 <xsl:message>ERROR: glossdiv missing its required title</xsl:message>
354 <xsl:template match="glossentry" mode="title.markup">
355 <xsl:param name="allow-anchors" select="0"/>
356 <xsl:apply-templates select="glossterm" mode="title.markup">
357 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
358 </xsl:apply-templates>
361 <xsl:template match="glossterm|firstterm" mode="title.markup">
362 <xsl:param name="allow-anchors" select="0"/>
365 <xsl:when test="$allow-anchors != 0">
366 <xsl:apply-templates/>
369 <xsl:apply-templates mode="no.anchor.mode"/>
374 <xsl:template match="index" mode="title.markup">
375 <xsl:param name="allow-anchors" select="0"/>
376 <xsl:variable name="title" select="(indexinfo/title|info/title|title)[1]"/>
378 <xsl:when test="$title">
379 <xsl:apply-templates select="$title" mode="title.markup">
380 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
381 </xsl:apply-templates>
384 <xsl:call-template name="gentext">
385 <xsl:with-param name="key" select="'Index'"/>
391 <xsl:template match="setindex" mode="title.markup">
392 <xsl:param name="allow-anchors" select="0"/>
393 <xsl:variable name="title" select="(setindexinfo/title|info/title|title)[1]"/>
395 <xsl:when test="$title">
396 <xsl:apply-templates select="$title" mode="title.markup">
397 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
398 </xsl:apply-templates>
401 <xsl:call-template name="gentext">
402 <xsl:with-param name="key" select="'SetIndex'"/>
408 <xsl:template match="figure|example|equation" mode="title.markup">
409 <xsl:param name="allow-anchors" select="0"/>
410 <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
411 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
412 </xsl:apply-templates>
415 <xsl:template match="table" mode="title.markup">
416 <xsl:param name="allow-anchors" select="0"/>
417 <xsl:apply-templates select="(title|info/title|caption)[1]" mode="title.markup">
418 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
419 </xsl:apply-templates>
422 <xsl:template match="procedure" mode="title.markup">
423 <xsl:param name="allow-anchors" select="0"/>
424 <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
425 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
426 </xsl:apply-templates>
429 <xsl:template match="task" mode="title.markup">
430 <xsl:param name="allow-anchors" select="0"/>
431 <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
432 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
433 </xsl:apply-templates>
436 <xsl:template match="sidebar" mode="title.markup">
437 <xsl:param name="allow-anchors" select="0"/>
438 <xsl:apply-templates select="(info/title|sidebarinfo/title|title)[1]"
440 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
441 </xsl:apply-templates>
444 <xsl:template match="abstract" mode="title.markup">
445 <xsl:param name="allow-anchors" select="0"/>
447 <xsl:when test="title|info/title">
448 <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
449 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
450 </xsl:apply-templates>
453 <xsl:call-template name="gentext">
454 <xsl:with-param name="key" select="'Abstract'"/>
460 <xsl:template match="caution|tip|warning|important|note" mode="title.markup">
461 <xsl:param name="allow-anchors" select="0"/>
462 <xsl:variable name="title" select="(title|info/title)[1]"/>
464 <xsl:when test="$title">
465 <xsl:apply-templates select="$title" mode="title.markup">
466 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
467 </xsl:apply-templates>
470 <xsl:call-template name="gentext">
471 <xsl:with-param name="key">
473 <xsl:when test="local-name(.)='note'">Note</xsl:when>
474 <xsl:when test="local-name(.)='important'">Important</xsl:when>
475 <xsl:when test="local-name(.)='caution'">Caution</xsl:when>
476 <xsl:when test="local-name(.)='warning'">Warning</xsl:when>
477 <xsl:when test="local-name(.)='tip'">Tip</xsl:when>
485 <xsl:template match="question" mode="title.markup">
486 <!-- questions don't have titles -->
487 <xsl:call-template name="gentext">
488 <xsl:with-param name="key">question</xsl:with-param>
492 <xsl:template match="answer" mode="title.markup">
493 <!-- answers don't have titles -->
494 <xsl:call-template name="gentext">
495 <xsl:with-param name="key">answer</xsl:with-param>
499 <xsl:template match="qandaentry" mode="title.markup">
500 <!-- qandaentrys are represented by the first question in them -->
501 <xsl:apply-templates select="question" mode="title.markup"/>
504 <xsl:template match="qandaset" mode="title.markup">
505 <xsl:param name="allow-anchors" select="0"/>
506 <xsl:variable name="title" select="(info/title|
510 <xsl:when test="$title">
511 <xsl:apply-templates select="$title" mode="title.markup">
512 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
513 </xsl:apply-templates>
516 <xsl:call-template name="gentext">
517 <xsl:with-param name="key" select="'QandASet'"/>
523 <xsl:template match="legalnotice" mode="title.markup">
524 <xsl:param name="allow-anchors" select="0"/>
526 <xsl:when test="title|info/title">
527 <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
528 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
529 </xsl:apply-templates>
532 <xsl:call-template name="gentext">
533 <xsl:with-param name="key" select="'LegalNotice'"/>
539 <!-- ============================================================ -->
541 <!-- titleabbrev is always processed in a mode -->
542 <xsl:template match="titleabbrev"/>
544 <xsl:template match="*" mode="titleabbrev.markup">
545 <xsl:param name="allow-anchors" select="0"/>
546 <xsl:param name="verbose" select="1"/>
549 <xsl:when test="titleabbrev">
550 <xsl:apply-templates select="titleabbrev[1]" mode="title.markup">
551 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
552 </xsl:apply-templates>
554 <xsl:when test="info/titleabbrev">
555 <xsl:apply-templates select="info/titleabbrev[1]" mode="title.markup">
556 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
557 </xsl:apply-templates>
560 <xsl:apply-templates select="." mode="title.markup">
561 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
562 <xsl:with-param name="verbose" select="$verbose"/>
563 </xsl:apply-templates>
568 <xsl:template match="book|part|set|preface|chapter|appendix" mode="titleabbrev.markup">
569 <xsl:param name="allow-anchors" select="0"/>
570 <xsl:param name="verbose" select="1"/>
572 <xsl:variable name="titleabbrev" select="(docinfo/titleabbrev
573 |bookinfo/titleabbrev
575 |prefaceinfo/titleabbrev
577 |partinfo/titleabbrev
578 |chapterinfo/titleabbrev
579 |appendixinfo/titleabbrev
583 <xsl:when test="$titleabbrev">
584 <xsl:apply-templates select="$titleabbrev" mode="title.markup">
585 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
586 </xsl:apply-templates>
589 <xsl:apply-templates select="." mode="title.markup">
590 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
591 <xsl:with-param name="verbose" select="$verbose"/>
592 </xsl:apply-templates>
597 <xsl:template match="article" mode="titleabbrev.markup">
598 <xsl:param name="allow-anchors" select="0"/>
599 <xsl:param name="verbose" select="1"/>
601 <xsl:variable name="titleabbrev" select="(artheader/titleabbrev
602 |articleinfo/titleabbrev
607 <xsl:when test="$titleabbrev">
608 <xsl:apply-templates select="$titleabbrev" mode="title.markup">
609 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
610 </xsl:apply-templates>
613 <xsl:apply-templates select="." mode="title.markup">
614 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
615 <xsl:with-param name="verbose" select="$verbose"/>
616 </xsl:apply-templates>
621 <xsl:template match="section
622 |sect1|sect2|sect3|sect4|sect5
623 |refsect1|refsect2|refsect3
626 mode="titleabbrev.markup">
627 <xsl:param name="allow-anchors" select="0"/>
628 <xsl:param name="verbose" select="1"/>
630 <xsl:variable name="titleabbrev" select="(info/titleabbrev
631 |sectioninfo/titleabbrev
632 |sect1info/titleabbrev
633 |sect2info/titleabbrev
634 |sect3info/titleabbrev
635 |sect4info/titleabbrev
636 |sect5info/titleabbrev
637 |refsect1info/titleabbrev
638 |refsect2info/titleabbrev
639 |refsect3info/titleabbrev
643 <xsl:when test="$titleabbrev">
644 <xsl:apply-templates select="$titleabbrev" mode="title.markup">
645 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
646 </xsl:apply-templates>
649 <xsl:apply-templates select="." mode="title.markup">
650 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
651 <xsl:with-param name="verbose" select="$verbose"/>
652 </xsl:apply-templates>
657 <xsl:template match="titleabbrev" mode="title.markup">
658 <xsl:param name="allow-anchors" select="0"/>
661 <xsl:when test="$allow-anchors != 0">
662 <xsl:apply-templates/>
665 <xsl:apply-templates mode="no.anchor.mode"/>
670 <!-- ============================================================ -->
672 <xsl:template match="*" mode="no.anchor.mode">
673 <!-- Switch to normal mode if no links -->
675 <xsl:when test="descendant-or-self::footnote or
676 descendant-or-self::anchor or
677 descendant-or-self::ulink or
678 descendant-or-self::link or
679 descendant-or-self::olink or
680 descendant-or-self::xref or
681 descendant-or-self::indexterm or
682 (ancestor::title and (@id or @xml:id))">
684 <xsl:apply-templates mode="no.anchor.mode"/>
687 <xsl:apply-templates select="."/>
692 <xsl:template match="footnote" mode="no.anchor.mode">
693 <!-- nop, suppressed -->
696 <xsl:template match="anchor" mode="no.anchor.mode">
697 <!-- nop, suppressed -->
700 <xsl:template match="ulink" mode="no.anchor.mode">
701 <xsl:param name="url" select="@url"/>
703 <xsl:when test="count(child::node())=0">
704 <xsl:value-of select="$url"/>
707 <xsl:apply-templates/>
712 <xsl:template match="link" mode="no.anchor.mode">
714 <xsl:when test="count(child::node()) > 0">
715 <!-- If it has content, use it -->
716 <xsl:apply-templates/>
718 <!-- look for an endterm -->
719 <xsl:when test="@endterm">
720 <xsl:variable name="etargets" select="key('id',@endterm)"/>
721 <xsl:variable name="etarget" select="$etargets[1]"/>
723 <xsl:when test="count($etarget) = 0">
725 <xsl:value-of select="count($etargets)"/>
726 <xsl:text>Endterm points to nonexistent ID: </xsl:text>
727 <xsl:value-of select="@endterm"/>
729 <xsl:text>???</xsl:text>
732 <xsl:apply-templates select="$etarget" mode="endterm"/>
737 <xsl:apply-templates/>
742 <xsl:template match="olink" mode="no.anchor.mode">
743 <xsl:apply-templates/>
746 <xsl:template match="indexterm" mode="no.anchor.mode">
747 <!-- nop, suppressed -->
750 <xsl:template match="xref" mode="no.anchor.mode">
751 <xsl:variable name="referrer" select="."/>
752 <xsl:variable name="targets" select="key('id',@linkend)|key('id',substring-after(@xlink:href,'#'))"/>
753 <xsl:variable name="target" select="$targets[1]"/>
754 <xsl:variable name="refelem" select="local-name($target)"/>
755 <xsl:variable name="xrefstyle">
756 <xsl:apply-templates select="." mode="xrefstyle">
757 <xsl:with-param name="target" select="$target"/>
758 <xsl:with-param name="referrer" select="$referrer"/>
759 </xsl:apply-templates>
762 <xsl:call-template name="check.id.unique">
763 <xsl:with-param name="linkend" select="@linkend"/>
767 <xsl:when test="count($target) = 0">
769 <xsl:text>XRef to nonexistent id: </xsl:text>
770 <xsl:value-of select="@linkend"/>
771 <xsl:value-of select="@xlink:href"/>
773 <xsl:text>???</xsl:text>
776 <xsl:when test="@endterm">
777 <xsl:variable name="etargets" select="key('id',@endterm)"/>
778 <xsl:variable name="etarget" select="$etargets[1]"/>
780 <xsl:when test="count($etarget) = 0">
782 <xsl:value-of select="count($etargets)"/>
783 <xsl:text>Endterm points to nonexistent ID: </xsl:text>
784 <xsl:value-of select="@endterm"/>
786 <xsl:text>???</xsl:text>
789 <xsl:apply-templates select="$etarget" mode="endterm"/>
794 <xsl:when test="$target/@xreflabel">
795 <xsl:call-template name="xref.xreflabel">
796 <xsl:with-param name="target" select="$target"/>
803 <!-- Watch out for the case when there is a xref or link inside
804 a title. See bugs #1811721 and #1838136. -->
805 <xsl:when test="not(ancestor::*[@id = $target/@id] or ancestor::*[@xml:id = $target/@xml:id])">
807 <xsl:apply-templates select="$target" mode="xref-to-prefix">
808 <xsl:with-param name="referrer" select="."/>
809 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
810 </xsl:apply-templates>
812 <xsl:apply-templates select="$target" mode="xref-to">
813 <xsl:with-param name="referrer" select="."/>
814 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
815 </xsl:apply-templates>
817 <xsl:apply-templates select="$target" mode="xref-to-suffix">
818 <xsl:with-param name="referrer" select="."/>
819 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
820 </xsl:apply-templates>
824 <xsl:apply-templates/>
833 <!-- ============================================================ -->
835 <xsl:template mode="title.markup" match="toc">
836 <xsl:param name="allow-anchors" select="0"/>
837 <xsl:param name="verbose" select="1"/>
839 <xsl:when test="title|info/title">
840 <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
841 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
842 </xsl:apply-templates>
845 <xsl:call-template name="gentext">
846 <xsl:with-param name="key" select="'TableofContents'"/>