2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:d="http://docbook.org/ns/docbook"
4 xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
5 exclude-result-prefixes="doc d"
8 <!-- ********************************************************************
10 This file is part of the XSL DocBook Stylesheet distribution.
11 See ../README or http://cdn.docbook.org/release/xsl/current/ for
12 copyright and other information.
14 ******************************************************************** -->
16 <!-- ==================================================================== -->
19 <xsl:template match="*" mode="object.title.template">
20 <xsl:call-template name="gentext.template">
21 <xsl:with-param name="context" select="'title'"/>
22 <xsl:with-param name="name">
23 <xsl:call-template name="xpath.location"/>
28 <xsl:template match="d:chapter" mode="object.title.template">
30 <xsl:when test="string($chapter.autolabel) != 0">
31 <xsl:call-template name="gentext.template">
32 <xsl:with-param name="context" select="'title-numbered'"/>
33 <xsl:with-param name="name">
34 <xsl:call-template name="xpath.location"/>
39 <xsl:call-template name="gentext.template">
40 <xsl:with-param name="context" select="'title-unnumbered'"/>
41 <xsl:with-param name="name">
42 <xsl:call-template name="xpath.location"/>
49 <xsl:template match="d:appendix" mode="object.title.template">
51 <xsl:when test="string($appendix.autolabel) != 0">
52 <xsl:call-template name="gentext.template">
53 <xsl:with-param name="context" select="'title-numbered'"/>
54 <xsl:with-param name="name">
55 <xsl:call-template name="xpath.location"/>
60 <xsl:call-template name="gentext.template">
61 <xsl:with-param name="context" select="'title-unnumbered'"/>
62 <xsl:with-param name="name">
63 <xsl:call-template name="xpath.location"/>
70 <xsl:template match="d:part" mode="object.title.template">
72 <xsl:when test="string($part.autolabel) != 0">
73 <xsl:call-template name="gentext.template">
74 <xsl:with-param name="context" select="'title-numbered'"/>
75 <xsl:with-param name="name">
76 <xsl:call-template name="xpath.location"/>
81 <xsl:call-template name="gentext.template">
82 <xsl:with-param name="context" select="'title-unnumbered'"/>
83 <xsl:with-param name="name">
84 <xsl:call-template name="xpath.location"/>
91 <xsl:template match="d:section|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:simplesect
92 |d:bridgehead|d:topic"
93 mode="object.title.template">
94 <xsl:variable name="is.numbered">
95 <xsl:call-template name="label.this.section"/>
98 <xsl:when test="$is.numbered != 0">
99 <xsl:call-template name="gentext.template">
100 <xsl:with-param name="context" select="'title-numbered'"/>
101 <xsl:with-param name="name">
102 <xsl:call-template name="xpath.location"/>
107 <xsl:call-template name="gentext.template">
108 <xsl:with-param name="context" select="'title-unnumbered'"/>
109 <xsl:with-param name="name">
110 <xsl:call-template name="xpath.location"/>
117 <xsl:template match="d:procedure" mode="object.title.template">
118 <xsl:variable name="title" select="d:title|d:blockinfo/d:title|d:info/d:title"/>
120 <xsl:when test="$formal.procedures != 0 and $title">
121 <xsl:call-template name="gentext.template">
122 <xsl:with-param name="context" select="'title'"/>
123 <xsl:with-param name="name">
124 <xsl:call-template name="xpath.location"/>
125 <xsl:text>.formal</xsl:text>
130 <xsl:call-template name="gentext.template">
131 <xsl:with-param name="context" select="'title'"/>
132 <xsl:with-param name="name">
133 <xsl:call-template name="xpath.location"/>
140 <!-- ============================================================ -->
142 <xsl:template match="*" mode="object.subtitle.template">
143 <xsl:call-template name="gentext.template">
144 <xsl:with-param name="context" select="'subtitle'"/>
145 <xsl:with-param name="name">
146 <xsl:call-template name="xpath.location"/>
151 <!-- ============================================================ -->
153 <xsl:template match="*" mode="is.autonumber">
154 <xsl:value-of select="'0'"/>
157 <xsl:template match="d:section|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5"
158 mode="is.autonumber">
159 <xsl:call-template name="label.this.section"/>
162 <xsl:template match="d:figure|d:example|d:table|d:equation" mode="is.autonumber">
163 <xsl:value-of select="'1'"/>
166 <xsl:template match="d:appendix" mode="is.autonumber">
167 <xsl:value-of select="$appendix.autolabel"/>
170 <xsl:template match="d:chapter" mode="is.autonumber">
171 <xsl:value-of select="$chapter.autolabel"/>
174 <xsl:template match="d:part" mode="is.autonumber">
175 <xsl:value-of select="$part.autolabel"/>
178 <xsl:template match="d:preface" mode="is.autonumber">
179 <xsl:value-of select="$preface.autolabel"/>
182 <xsl:template match="d:question|d:answer" mode="is.autonumber">
184 <xsl:when test="$qanda.defaultlabel = 'number'
186 <xsl:value-of select="'1'"/>
189 <xsl:value-of select="'0'"/>
194 <xsl:template match="d:qandadiv" mode="is.autonumber">
195 <xsl:value-of select="$qandadiv.autolabel"/>
198 <xsl:template match="d:bridgehead" mode="is.autonumber">
199 <!-- bridgeheads are not numbered -->
200 <xsl:text>0</xsl:text>
203 <xsl:template match="d:procedure" mode="is.autonumber">
204 <xsl:value-of select="$formal.procedures"/>
208 <xsl:template match="*" mode="object.xref.template">
209 <xsl:param name="purpose"/>
210 <xsl:param name="xrefstyle"/>
211 <xsl:param name="referrer"/>
213 <!-- Is autonumbering on? -->
214 <xsl:variable name="autonumber">
215 <xsl:apply-templates select="." mode="is.autonumber"/>
218 <xsl:variable name="number-and-title-template">
219 <xsl:call-template name="gentext.template.exists">
220 <xsl:with-param name="context" select="'xref-number-and-title'"/>
221 <xsl:with-param name="name">
222 <xsl:call-template name="xpath.location"/>
227 <xsl:variable name="number-template">
228 <xsl:call-template name="gentext.template.exists">
229 <xsl:with-param name="context" select="'xref-number'"/>
230 <xsl:with-param name="name">
231 <xsl:call-template name="xpath.location"/>
236 <xsl:variable name="context">
238 <xsl:when test="self::d:equation and not(d:title) and not(d:info/d:title)">
239 <xsl:value-of select="'xref-number'"/>
241 <xsl:when test="string($autonumber) != 0
242 and $number-and-title-template != 0
243 and $xref.with.number.and.title != 0">
244 <xsl:value-of select="'xref-number-and-title'"/>
246 <xsl:when test="string($autonumber) != 0
247 and $number-template != 0">
248 <xsl:value-of select="'xref-number'"/>
251 <xsl:value-of select="'xref'"/>
256 <xsl:call-template name="gentext.template">
257 <xsl:with-param name="context" select="$context"/>
258 <xsl:with-param name="name">
259 <xsl:call-template name="xpath.location"/>
261 <xsl:with-param name="purpose" select="$purpose"/>
262 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
263 <xsl:with-param name="referrer" select="$referrer"/>
269 <!-- ============================================================ -->
271 <xsl:template match="*" mode="object.title.markup">
272 <xsl:param name="allow-anchors" select="0"/>
273 <xsl:variable name="template">
274 <xsl:apply-templates select="." mode="object.title.template"/>
279 <xsl:text>object.title.markup: </xsl:text>
280 <xsl:value-of select="local-name(.)"/>
281 <xsl:text>: </xsl:text>
282 <xsl:value-of select="$template"/>
286 <xsl:call-template name="substitute-markup">
287 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
288 <xsl:with-param name="template" select="$template"/>
292 <xsl:template match="*" mode="object.title.markup.textonly">
293 <xsl:variable name="title">
294 <xsl:apply-templates select="." mode="object.title.markup"/>
296 <xsl:value-of select="normalize-space($title)"/>
299 <!-- ============================================================ -->
301 <xsl:template match="*" mode="object.titleabbrev.markup">
302 <xsl:param name="allow-anchors" select="0"/>
304 <!-- Just for consistency in template naming -->
306 <xsl:apply-templates select="." mode="titleabbrev.markup">
307 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
308 </xsl:apply-templates>
311 <!-- ============================================================ -->
313 <xsl:template match="*" mode="object.subtitle.markup">
314 <xsl:variable name="template">
315 <xsl:apply-templates select="." mode="object.subtitle.template"/>
318 <xsl:call-template name="substitute-markup">
319 <xsl:with-param name="template" select="$template"/>
323 <!-- ============================================================ -->
325 <xsl:template match="*" mode="object.xref.markup">
326 <xsl:param name="purpose"/>
327 <xsl:param name="xrefstyle"/>
328 <xsl:param name="referrer"/>
329 <xsl:param name="verbose" select="1"/>
331 <xsl:variable name="template">
333 <xsl:when test="starts-with(normalize-space($xrefstyle), 'select:')">
334 <xsl:call-template name="make.gentext.template">
335 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
336 <xsl:with-param name="purpose" select="$purpose"/>
337 <xsl:with-param name="referrer" select="$referrer"/>
340 <xsl:when test="starts-with(normalize-space($xrefstyle), 'template:')">
341 <xsl:value-of select="substring-after(normalize-space($xrefstyle), 'template:')"/>
344 <xsl:apply-templates select="." mode="object.xref.template">
345 <xsl:with-param name="purpose" select="$purpose"/>
346 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
347 <xsl:with-param name="referrer" select="$referrer"/>
348 </xsl:apply-templates>
355 <xsl:text>object.xref.markup: </xsl:text>
356 <xsl:value-of select="local-name(.)"/>
357 <xsl:text>(</xsl:text>
358 <xsl:value-of select="$xrefstyle"/>
359 <xsl:text>, </xsl:text>
360 <xsl:value-of select="$purpose"/>
361 <xsl:text>)</xsl:text>
362 <xsl:text>: [</xsl:text>
363 <xsl:value-of select="$template"/>
364 <xsl:text>]</xsl:text>
368 <xsl:if test="$template = '' and $verbose != 0">
370 <xsl:text>object.xref.markup: empty xref template</xsl:text>
371 <xsl:text> for linkend="</xsl:text>
372 <xsl:value-of select="@id|@xml:id"/>
373 <xsl:text>" and @xrefstyle="</xsl:text>
374 <xsl:value-of select="$xrefstyle"/>
375 <xsl:text>"</xsl:text>
379 <xsl:call-template name="substitute-markup">
380 <xsl:with-param name="purpose" select="$purpose"/>
381 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
382 <xsl:with-param name="referrer" select="$referrer"/>
383 <xsl:with-param name="template" select="$template"/>
384 <xsl:with-param name="verbose" select="$verbose"/>
388 <xsl:template match="d:listitem" mode="object.xref.markup">
389 <xsl:param name="verbose" select="1"/>
392 <xsl:when test="parent::d:orderedlist">
393 <xsl:variable name="template">
394 <xsl:apply-templates select="." mode="object.xref.template"/>
396 <xsl:call-template name="substitute-markup">
397 <xsl:with-param name="template" select="$template"/>
400 <xsl:when test="$verbose != 0">
402 <xsl:text>Xref is only supported to listitems in an</xsl:text>
403 <xsl:text> orderedlist: </xsl:text>
404 <xsl:value-of select=".//@id|.//@xml:id"/>
406 <xsl:text>???</xsl:text>
411 <xsl:template match="d:question" mode="object.xref.markup">
412 <xsl:param name="purpose"/>
413 <xsl:param name="xrefstyle"/>
414 <xsl:param name="referrer"/>
416 <xsl:variable name="deflabel">
418 <xsl:when test="ancestor-or-self::*[@defaultlabel]">
419 <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
423 <xsl:value-of select="$qanda.defaultlabel"/>
428 <xsl:variable name="template">
430 <!-- This avoids double Q: Q: in xref when defaultlabel=qanda -->
431 <xsl:when test="$deflabel = 'qanda' and not(d:label)">%n</xsl:when>
433 <xsl:apply-templates select="." mode="object.xref.template">
434 <xsl:with-param name="purpose" select="$purpose"/>
435 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
436 <xsl:with-param name="referrer" select="$referrer"/>
437 </xsl:apply-templates>
442 <xsl:call-template name="substitute-markup">
443 <xsl:with-param name="purpose" select="$purpose"/>
444 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
445 <xsl:with-param name="referrer" select="$referrer"/>
446 <xsl:with-param name="template" select="$template"/>
450 <!-- ============================================================ -->
452 <xsl:template name="substitute-markup">
453 <xsl:param name="template" select="''"/>
454 <xsl:param name="allow-anchors" select="'0'"/>
455 <xsl:param name="title" select="''"/>
456 <xsl:param name="subtitle" select="''"/>
457 <xsl:param name="docname" select="''"/>
458 <xsl:param name="label" select="''"/>
459 <xsl:param name="pagenumber" select="''"/>
460 <xsl:param name="purpose"/>
461 <xsl:param name="xrefstyle"/>
462 <xsl:param name="referrer"/>
463 <xsl:param name="verbose"/>
466 <xsl:when test="contains($template, '%')">
467 <xsl:value-of select="substring-before($template, '%')"/>
468 <xsl:variable name="candidate"
469 select="substring(substring-after($template, '%'), 1, 1)"/>
471 <xsl:when test="$candidate = 't'">
472 <xsl:apply-templates select="." mode="insert.title.markup">
473 <xsl:with-param name="purpose" select="$purpose"/>
474 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
475 <xsl:with-param name="title">
477 <xsl:when test="$title != ''">
478 <xsl:copy-of select="$title"/>
480 <xsl:when test="$purpose = 'xref'">
481 <xsl:apply-templates select="." mode="titleabbrev.markup">
482 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
483 <xsl:with-param name="verbose" select="$verbose"/>
484 </xsl:apply-templates>
487 <xsl:apply-templates select="." mode="title.markup">
488 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
489 <xsl:with-param name="verbose" select="$verbose"/>
490 </xsl:apply-templates>
494 </xsl:apply-templates>
496 <xsl:when test="$candidate = 's'">
497 <xsl:apply-templates select="." mode="insert.subtitle.markup">
498 <xsl:with-param name="purpose" select="$purpose"/>
499 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
500 <xsl:with-param name="subtitle">
502 <xsl:when test="$subtitle != ''">
503 <xsl:copy-of select="$subtitle"/>
506 <xsl:apply-templates select="." mode="subtitle.markup">
507 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
508 </xsl:apply-templates>
512 </xsl:apply-templates>
514 <xsl:when test="$candidate = 'n'">
515 <xsl:apply-templates select="." mode="insert.label.markup">
516 <xsl:with-param name="purpose" select="$purpose"/>
517 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
518 <xsl:with-param name="label">
520 <xsl:when test="$label != ''">
521 <xsl:copy-of select="$label"/>
524 <xsl:apply-templates select="." mode="label.markup"/>
528 </xsl:apply-templates>
530 <xsl:when test="$candidate = 'p'">
531 <xsl:apply-templates select="." mode="insert.pagenumber.markup">
532 <xsl:with-param name="purpose" select="$purpose"/>
533 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
534 <xsl:with-param name="pagenumber">
536 <xsl:when test="$pagenumber != ''">
537 <xsl:copy-of select="$pagenumber"/>
540 <xsl:apply-templates select="." mode="pagenumber.markup"/>
544 </xsl:apply-templates>
546 <xsl:when test="$candidate = 'o'">
547 <!-- olink target document title -->
548 <xsl:apply-templates select="." mode="insert.olink.docname.markup">
549 <xsl:with-param name="purpose" select="$purpose"/>
550 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
551 <xsl:with-param name="docname">
553 <xsl:when test="$docname != ''">
554 <xsl:copy-of select="$docname"/>
557 <xsl:apply-templates select="." mode="olink.docname.markup"/>
561 </xsl:apply-templates>
563 <xsl:when test="$candidate = 'd'">
564 <xsl:apply-templates select="." mode="insert.direction.markup">
565 <xsl:with-param name="purpose" select="$purpose"/>
566 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
567 <xsl:with-param name="direction">
569 <xsl:when test="$referrer">
570 <xsl:variable name="referent-is-below">
571 <xsl:for-each select="preceding::d:xref">
572 <xsl:if test="generate-id(.) = generate-id($referrer)">1</xsl:if>
576 <xsl:when test="$referent-is-below = ''">
577 <xsl:call-template name="gentext">
578 <xsl:with-param name="key" select="'above'"/>
582 <xsl:call-template name="gentext">
583 <xsl:with-param name="key" select="'below'"/>
589 <xsl:message>Attempt to use %d in gentext with no referrer!</xsl:message>
593 </xsl:apply-templates>
595 <xsl:when test="$candidate = '%' ">
596 <xsl:text>%</xsl:text>
599 <xsl:text>%</xsl:text><xsl:value-of select="$candidate"/>
602 <!-- recurse with the rest of the template string -->
603 <xsl:variable name="rest"
604 select="substring($template,
605 string-length(substring-before($template, '%'))+3)"/>
606 <xsl:call-template name="substitute-markup">
607 <xsl:with-param name="template" select="$rest"/>
608 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
609 <xsl:with-param name="title" select="$title"/>
610 <xsl:with-param name="subtitle" select="$subtitle"/>
611 <xsl:with-param name="docname" select="$docname"/>
612 <xsl:with-param name="label" select="$label"/>
613 <xsl:with-param name="pagenumber" select="$pagenumber"/>
614 <xsl:with-param name="purpose" select="$purpose"/>
615 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
616 <xsl:with-param name="referrer" select="$referrer"/>
617 <xsl:with-param name="verbose" select="$verbose"/>
621 <xsl:value-of select="$template"/>
626 <!-- ============================================================ -->
628 <xsl:template name="make.gentext.template">
629 <xsl:param name="xrefstyle" select="''"/>
630 <xsl:param name="purpose"/>
631 <xsl:param name="referrer"/>
632 <xsl:param name="lang">
633 <xsl:call-template name="l10n.language"/>
635 <xsl:param name="target.elem" select="local-name(.)"/>
637 <!-- Referrer's local name, if any -->
638 <xsl:variable name="referrer.local.name">
639 <xsl:if test="$referrer">
640 <xsl:value-of select="local-name($referrer)"/>
644 <!-- parse xrefstyle to get parts -->
645 <xsl:variable name="parts"
646 select="substring-after(normalize-space($xrefstyle), 'select:')"/>
648 <xsl:variable name="labeltype">
650 <xsl:when test="contains($parts, 'labelnumber')">
651 <xsl:text>labelnumber</xsl:text>
653 <xsl:when test="contains($parts, 'labelname')">
654 <xsl:text>labelname</xsl:text>
656 <xsl:when test="contains($parts, 'label')">
657 <xsl:text>label</xsl:text>
662 <xsl:variable name="titletype">
664 <xsl:when test="contains($parts, 'quotedtitle')">
665 <xsl:text>quotedtitle</xsl:text>
667 <xsl:when test="contains($parts, 'title')">
668 <xsl:text>title</xsl:text>
673 <xsl:variable name="pagetype">
675 <xsl:when test="$insert.olink.page.number = 'no' and
676 $referrer.local.name = 'olink'">
677 <!-- suppress page numbers -->
679 <xsl:when test="$insert.xref.page.number = 'no' and
680 $referrer.local.name != 'olink'">
681 <!-- suppress page numbers -->
683 <xsl:when test="contains($parts, 'nopage')">
684 <xsl:text>nopage</xsl:text>
686 <xsl:when test="contains($parts, 'pagenumber')">
687 <xsl:text>pagenumber</xsl:text>
689 <xsl:when test="contains($parts, 'pageabbrev')">
690 <xsl:text>pageabbrev</xsl:text>
692 <xsl:when test="contains($parts, 'Page')">
693 <xsl:text>Page</xsl:text>
695 <xsl:when test="contains($parts, 'page')">
696 <xsl:text>page</xsl:text>
701 <xsl:variable name="docnametype">
703 <xsl:when test="($olink.doctitle = 0 or
704 $olink.doctitle = 'no') and
705 $referrer.local.name = 'olink'">
706 <!-- suppress docname -->
708 <xsl:when test="contains($parts, 'nodocname')">
709 <xsl:text>nodocname</xsl:text>
711 <xsl:when test="contains($parts, 'docnamelong')">
712 <xsl:text>docnamelong</xsl:text>
714 <xsl:when test="contains($parts, 'docname')">
715 <xsl:text>docname</xsl:text>
720 <xsl:if test="$labeltype != ''">
722 <xsl:when test="$labeltype = 'labelname'">
723 <xsl:call-template name="gentext">
724 <xsl:with-param name="key">
726 <xsl:when test="$referrer.local.name = 'olink'">
727 <xsl:value-of select="$target.elem"/>
730 <xsl:value-of select="local-name(.)"/>
736 <xsl:when test="$labeltype = 'labelnumber'">
737 <xsl:text>%n</xsl:text>
739 <xsl:when test="$labeltype = 'label'">
740 <xsl:call-template name="gentext.template">
741 <xsl:with-param name="context" select="'xref-number'"/>
742 <xsl:with-param name="name">
744 <xsl:when test="$referrer.local.name = 'olink'">
745 <xsl:value-of select="$target.elem"/>
748 <xsl:call-template name="xpath.location"/>
752 <xsl:with-param name="purpose" select="$purpose"/>
753 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
754 <xsl:with-param name="referrer" select="$referrer"/>
760 <xsl:when test="$titletype != ''">
761 <xsl:value-of select="$xref.label-title.separator"/>
763 <xsl:when test="$pagetype != '' and $pagetype != 'nopage'">
764 <xsl:value-of select="$xref.label-page.separator"/>
769 <xsl:if test="$titletype != ''">
771 <xsl:when test="$titletype = 'title'">
772 <xsl:text>%t</xsl:text>
774 <xsl:when test="$titletype = 'quotedtitle'">
775 <xsl:call-template name="gentext.dingbat">
776 <xsl:with-param name="dingbat" select="'startquote'"/>
778 <xsl:text>%t</xsl:text>
779 <xsl:call-template name="gentext.dingbat">
780 <xsl:with-param name="dingbat" select="'endquote'"/>
786 <xsl:when test="$pagetype != '' and $pagetype != 'nopage'">
787 <xsl:value-of select="$xref.title-page.separator"/>
792 <!-- special case: use regular xref template if just turning off page -->
793 <xsl:if test="($pagetype = 'nopage' or $docnametype = 'nodocname')
794 and $referrer.local.name != 'olink'
796 and $titletype = ''">
797 <xsl:apply-templates select="." mode="object.xref.template">
798 <xsl:with-param name="purpose" select="$purpose"/>
799 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
800 <xsl:with-param name="referrer" select="$referrer"/>
801 </xsl:apply-templates>
804 <xsl:if test="$pagetype != ''">
806 <xsl:when test="$pagetype = 'page'">
807 <xsl:call-template name="gentext.template">
808 <xsl:with-param name="context" select="'xref'"/>
809 <xsl:with-param name="name" select="'page'"/>
812 <xsl:when test="$pagetype = 'Page'">
813 <xsl:call-template name="gentext.template">
814 <xsl:with-param name="context" select="'xref'"/>
815 <xsl:with-param name="name" select="'Page'"/>
818 <xsl:when test="$pagetype = 'pageabbrev'">
819 <xsl:call-template name="gentext.template">
820 <xsl:with-param name="context" select="'xref'"/>
821 <xsl:with-param name="name" select="'pageabbrev'"/>
824 <xsl:when test="$pagetype = 'pagenumber'">
825 <xsl:text>%p</xsl:text>
831 <!-- Add reference to other document title -->
832 <xsl:if test="$docnametype != '' and $referrer.local.name = 'olink'">
833 <!-- Any separator should be in the gentext template -->
835 <xsl:when test="$docnametype = 'docnamelong'">
836 <xsl:call-template name="gentext.template">
837 <xsl:with-param name="context" select="'xref'"/>
838 <xsl:with-param name="name" select="'docnamelong'"/>
841 <xsl:when test="$docnametype = 'docname'">
842 <xsl:call-template name="gentext.template">
843 <xsl:with-param name="context" select="'xref'"/>
844 <xsl:with-param name="name" select="'docname'"/>