2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
4 exclude-result-prefixes="doc"
7 <!-- ********************************************************************
8 $Id: gentext.xsl 8396 2009-04-07 07:41:35Z bobstayton $
9 ********************************************************************
11 This file is part of the XSL DocBook Stylesheet distribution.
12 See ../README or http://docbook.sf.net/release/xsl/current/ for
13 copyright and other information.
15 ******************************************************************** -->
17 <!-- ==================================================================== -->
20 <xsl:template match="*" mode="object.title.template">
21 <xsl:call-template name="gentext.template">
22 <xsl:with-param name="context" select="'title'"/>
23 <xsl:with-param name="name">
24 <xsl:call-template name="xpath.location"/>
29 <xsl:template match="chapter" mode="object.title.template">
31 <xsl:when test="string($chapter.autolabel) != 0">
32 <xsl:call-template name="gentext.template">
33 <xsl:with-param name="context" select="'title-numbered'"/>
34 <xsl:with-param name="name">
35 <xsl:call-template name="xpath.location"/>
40 <xsl:call-template name="gentext.template">
41 <xsl:with-param name="context" select="'title-unnumbered'"/>
42 <xsl:with-param name="name">
43 <xsl:call-template name="xpath.location"/>
50 <xsl:template match="appendix" mode="object.title.template">
52 <xsl:when test="string($appendix.autolabel) != 0">
53 <xsl:call-template name="gentext.template">
54 <xsl:with-param name="context" select="'title-numbered'"/>
55 <xsl:with-param name="name">
56 <xsl:call-template name="xpath.location"/>
61 <xsl:call-template name="gentext.template">
62 <xsl:with-param name="context" select="'title-unnumbered'"/>
63 <xsl:with-param name="name">
64 <xsl:call-template name="xpath.location"/>
71 <xsl:template match="part" mode="object.title.template">
73 <xsl:when test="string($part.autolabel) != 0">
74 <xsl:call-template name="gentext.template">
75 <xsl:with-param name="context" select="'title-numbered'"/>
76 <xsl:with-param name="name">
77 <xsl:call-template name="xpath.location"/>
82 <xsl:call-template name="gentext.template">
83 <xsl:with-param name="context" select="'title-unnumbered'"/>
84 <xsl:with-param name="name">
85 <xsl:call-template name="xpath.location"/>
92 <xsl:template match="section|sect1|sect2|sect3|sect4|sect5|simplesect
94 mode="object.title.template">
95 <xsl:variable name="is.numbered">
96 <xsl:call-template name="label.this.section"/>
99 <xsl:when test="$is.numbered != 0">
100 <xsl:call-template name="gentext.template">
101 <xsl:with-param name="context" select="'title-numbered'"/>
102 <xsl:with-param name="name">
103 <xsl:call-template name="xpath.location"/>
108 <xsl:call-template name="gentext.template">
109 <xsl:with-param name="context" select="'title-unnumbered'"/>
110 <xsl:with-param name="name">
111 <xsl:call-template name="xpath.location"/>
118 <xsl:template match="procedure" mode="object.title.template">
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="section|sect1|sect2|sect3|sect4|sect5"
158 mode="is.autonumber">
159 <xsl:call-template name="label.this.section"/>
162 <xsl:template match="figure|example|table|equation" mode="is.autonumber">
163 <xsl:value-of select="'1'"/>
166 <xsl:template match="appendix" mode="is.autonumber">
167 <xsl:value-of select="$appendix.autolabel"/>
170 <xsl:template match="chapter" mode="is.autonumber">
171 <xsl:value-of select="$chapter.autolabel"/>
174 <xsl:template match="part" mode="is.autonumber">
175 <xsl:value-of select="$part.autolabel"/>
178 <xsl:template match="preface" mode="is.autonumber">
179 <xsl:value-of select="$preface.autolabel"/>
182 <xsl:template match="question|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="qandadiv" mode="is.autonumber">
195 <xsl:value-of select="$qandadiv.autolabel"/>
198 <xsl:template match="bridgehead" mode="is.autonumber">
199 <xsl:value-of select="$section.autolabel"/>
202 <xsl:template match="procedure" mode="is.autonumber">
203 <xsl:value-of select="$formal.procedures"/>
207 <xsl:template match="*" mode="object.xref.template">
208 <xsl:param name="purpose"/>
209 <xsl:param name="xrefstyle"/>
210 <xsl:param name="referrer"/>
212 <!-- Is autonumbering on? -->
213 <xsl:variable name="autonumber">
214 <xsl:apply-templates select="." mode="is.autonumber"/>
217 <xsl:variable name="number-and-title-template">
218 <xsl:call-template name="gentext.template.exists">
219 <xsl:with-param name="context" select="'xref-number-and-title'"/>
220 <xsl:with-param name="name">
221 <xsl:call-template name="xpath.location"/>
226 <xsl:variable name="number-template">
227 <xsl:call-template name="gentext.template.exists">
228 <xsl:with-param name="context" select="'xref-number'"/>
229 <xsl:with-param name="name">
230 <xsl:call-template name="xpath.location"/>
235 <xsl:variable name="context">
237 <xsl:when test="string($autonumber) != 0
238 and $number-and-title-template != 0
239 and $xref.with.number.and.title != 0">
240 <xsl:value-of select="'xref-number-and-title'"/>
242 <xsl:when test="string($autonumber) != 0
243 and $number-template != 0">
244 <xsl:value-of select="'xref-number'"/>
247 <xsl:value-of select="'xref'"/>
252 <xsl:call-template name="gentext.template">
253 <xsl:with-param name="context" select="$context"/>
254 <xsl:with-param name="name">
255 <xsl:call-template name="xpath.location"/>
257 <xsl:with-param name="purpose" select="$purpose"/>
258 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
259 <xsl:with-param name="referrer" select="$referrer"/>
265 <!-- ============================================================ -->
267 <xsl:template match="*" mode="object.title.markup">
268 <xsl:param name="allow-anchors" select="0"/>
269 <xsl:variable name="template">
270 <xsl:apply-templates select="." mode="object.title.template"/>
275 <xsl:text>object.title.markup: </xsl:text>
276 <xsl:value-of select="local-name(.)"/>
277 <xsl:text>: </xsl:text>
278 <xsl:value-of select="$template"/>
282 <xsl:call-template name="substitute-markup">
283 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
284 <xsl:with-param name="template" select="$template"/>
288 <xsl:template match="*" mode="object.title.markup.textonly">
289 <xsl:variable name="title">
290 <xsl:apply-templates select="." mode="object.title.markup"/>
292 <xsl:value-of select="normalize-space($title)"/>
295 <!-- ============================================================ -->
297 <xsl:template match="*" mode="object.titleabbrev.markup">
298 <xsl:param name="allow-anchors" select="0"/>
300 <!-- Just for consistency in template naming -->
302 <xsl:apply-templates select="." mode="titleabbrev.markup">
303 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
304 </xsl:apply-templates>
307 <!-- ============================================================ -->
309 <xsl:template match="*" mode="object.subtitle.markup">
310 <xsl:variable name="template">
311 <xsl:apply-templates select="." mode="object.subtitle.template"/>
314 <xsl:call-template name="substitute-markup">
315 <xsl:with-param name="template" select="$template"/>
319 <!-- ============================================================ -->
321 <xsl:template match="*" mode="object.xref.markup">
322 <xsl:param name="purpose"/>
323 <xsl:param name="xrefstyle"/>
324 <xsl:param name="referrer"/>
325 <xsl:param name="verbose" select="1"/>
327 <xsl:variable name="template">
329 <xsl:when test="starts-with(normalize-space($xrefstyle), 'select:')">
330 <xsl:call-template name="make.gentext.template">
331 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
332 <xsl:with-param name="purpose" select="$purpose"/>
333 <xsl:with-param name="referrer" select="$referrer"/>
336 <xsl:when test="starts-with(normalize-space($xrefstyle), 'template:')">
337 <xsl:value-of select="substring-after(normalize-space($xrefstyle), 'template:')"/>
340 <xsl:apply-templates select="." mode="object.xref.template">
341 <xsl:with-param name="purpose" select="$purpose"/>
342 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
343 <xsl:with-param name="referrer" select="$referrer"/>
344 </xsl:apply-templates>
351 <xsl:text>object.xref.markup: </xsl:text>
352 <xsl:value-of select="local-name(.)"/>
353 <xsl:text>(</xsl:text>
354 <xsl:value-of select="$xrefstyle"/>
355 <xsl:text>, </xsl:text>
356 <xsl:value-of select="$purpose"/>
357 <xsl:text>)</xsl:text>
358 <xsl:text>: [</xsl:text>
359 <xsl:value-of select="$template"/>
360 <xsl:text>]</xsl:text>
364 <xsl:if test="$template = '' and $verbose != 0">
366 <xsl:text>object.xref.markup: empty xref template</xsl:text>
367 <xsl:text> for linkend="</xsl:text>
368 <xsl:value-of select="@id|@xml:id"/>
369 <xsl:text>" and @xrefstyle="</xsl:text>
370 <xsl:value-of select="$xrefstyle"/>
371 <xsl:text>"</xsl:text>
375 <xsl:call-template name="substitute-markup">
376 <xsl:with-param name="purpose" select="$purpose"/>
377 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
378 <xsl:with-param name="referrer" select="$referrer"/>
379 <xsl:with-param name="template" select="$template"/>
380 <xsl:with-param name="verbose" select="$verbose"/>
384 <xsl:template match="listitem" mode="object.xref.markup">
385 <xsl:param name="verbose" select="1"/>
388 <xsl:when test="parent::orderedlist">
389 <xsl:variable name="template">
390 <xsl:apply-templates select="." mode="object.xref.template"/>
392 <xsl:call-template name="substitute-markup">
393 <xsl:with-param name="template" select="$template"/>
396 <xsl:when test="$verbose != 0">
398 <xsl:text>Xref is only supported to listitems in an</xsl:text>
399 <xsl:text> orderedlist: </xsl:text>
400 <xsl:value-of select="@id|@xml:id"/>
402 <xsl:text>???</xsl:text>
407 <xsl:template match="question" mode="object.xref.markup">
408 <xsl:param name="purpose"/>
409 <xsl:param name="xrefstyle"/>
410 <xsl:param name="referrer"/>
412 <xsl:variable name="deflabel">
414 <xsl:when test="ancestor-or-self::*[@defaultlabel]">
415 <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
419 <xsl:value-of select="$qanda.defaultlabel"/>
424 <xsl:variable name="template">
426 <!-- This avoids double Q: Q: in xref when defaultlabel=qanda -->
427 <xsl:when test="$deflabel = 'qanda' and not(label)">%n</xsl:when>
429 <xsl:apply-templates select="." mode="object.xref.template">
430 <xsl:with-param name="purpose" select="$purpose"/>
431 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
432 <xsl:with-param name="referrer" select="$referrer"/>
433 </xsl:apply-templates>
438 <xsl:call-template name="substitute-markup">
439 <xsl:with-param name="purpose" select="$purpose"/>
440 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
441 <xsl:with-param name="referrer" select="$referrer"/>
442 <xsl:with-param name="template" select="$template"/>
446 <!-- ============================================================ -->
448 <xsl:template name="substitute-markup">
449 <xsl:param name="template" select="''"/>
450 <xsl:param name="allow-anchors" select="'0'"/>
451 <xsl:param name="title" select="''"/>
452 <xsl:param name="subtitle" select="''"/>
453 <xsl:param name="docname" select="''"/>
454 <xsl:param name="label" select="''"/>
455 <xsl:param name="pagenumber" select="''"/>
456 <xsl:param name="purpose"/>
457 <xsl:param name="xrefstyle"/>
458 <xsl:param name="referrer"/>
459 <xsl:param name="verbose"/>
462 <xsl:when test="contains($template, '%')">
463 <xsl:value-of select="substring-before($template, '%')"/>
464 <xsl:variable name="candidate"
465 select="substring(substring-after($template, '%'), 1, 1)"/>
467 <xsl:when test="$candidate = 't'">
468 <xsl:apply-templates select="." mode="insert.title.markup">
469 <xsl:with-param name="purpose" select="$purpose"/>
470 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
471 <xsl:with-param name="title">
473 <xsl:when test="$title != ''">
474 <xsl:copy-of select="$title"/>
477 <xsl:apply-templates select="." mode="title.markup">
478 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
479 <xsl:with-param name="verbose" select="$verbose"/>
480 </xsl:apply-templates>
484 </xsl:apply-templates>
486 <xsl:when test="$candidate = 's'">
487 <xsl:apply-templates select="." mode="insert.subtitle.markup">
488 <xsl:with-param name="purpose" select="$purpose"/>
489 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
490 <xsl:with-param name="subtitle">
492 <xsl:when test="$subtitle != ''">
493 <xsl:copy-of select="$subtitle"/>
496 <xsl:apply-templates select="." mode="subtitle.markup">
497 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
498 </xsl:apply-templates>
502 </xsl:apply-templates>
504 <xsl:when test="$candidate = 'n'">
505 <xsl:apply-templates select="." mode="insert.label.markup">
506 <xsl:with-param name="purpose" select="$purpose"/>
507 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
508 <xsl:with-param name="label">
510 <xsl:when test="$label != ''">
511 <xsl:copy-of select="$label"/>
514 <xsl:apply-templates select="." mode="label.markup"/>
518 </xsl:apply-templates>
520 <xsl:when test="$candidate = 'p'">
521 <xsl:apply-templates select="." mode="insert.pagenumber.markup">
522 <xsl:with-param name="purpose" select="$purpose"/>
523 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
524 <xsl:with-param name="pagenumber">
526 <xsl:when test="$pagenumber != ''">
527 <xsl:copy-of select="$pagenumber"/>
530 <xsl:apply-templates select="." mode="pagenumber.markup"/>
534 </xsl:apply-templates>
536 <xsl:when test="$candidate = 'o'">
537 <!-- olink target document title -->
538 <xsl:apply-templates select="." mode="insert.olink.docname.markup">
539 <xsl:with-param name="purpose" select="$purpose"/>
540 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
541 <xsl:with-param name="docname">
543 <xsl:when test="$docname != ''">
544 <xsl:copy-of select="$docname"/>
547 <xsl:apply-templates select="." mode="olink.docname.markup"/>
551 </xsl:apply-templates>
553 <xsl:when test="$candidate = 'd'">
554 <xsl:apply-templates select="." mode="insert.direction.markup">
555 <xsl:with-param name="purpose" select="$purpose"/>
556 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
557 <xsl:with-param name="direction">
559 <xsl:when test="$referrer">
560 <xsl:variable name="referent-is-below">
561 <xsl:for-each select="preceding::xref">
562 <xsl:if test="generate-id(.) = generate-id($referrer)">1</xsl:if>
566 <xsl:when test="$referent-is-below = ''">
567 <xsl:call-template name="gentext">
568 <xsl:with-param name="key" select="'above'"/>
572 <xsl:call-template name="gentext">
573 <xsl:with-param name="key" select="'below'"/>
579 <xsl:message>Attempt to use %d in gentext with no referrer!</xsl:message>
583 </xsl:apply-templates>
585 <xsl:when test="$candidate = '%' ">
586 <xsl:text>%</xsl:text>
589 <xsl:text>%</xsl:text><xsl:value-of select="$candidate"/>
592 <!-- recurse with the rest of the template string -->
593 <xsl:variable name="rest"
594 select="substring($template,
595 string-length(substring-before($template, '%'))+3)"/>
596 <xsl:call-template name="substitute-markup">
597 <xsl:with-param name="template" select="$rest"/>
598 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
599 <xsl:with-param name="title" select="$title"/>
600 <xsl:with-param name="subtitle" select="$subtitle"/>
601 <xsl:with-param name="docname" select="$docname"/>
602 <xsl:with-param name="label" select="$label"/>
603 <xsl:with-param name="pagenumber" select="$pagenumber"/>
604 <xsl:with-param name="purpose" select="$purpose"/>
605 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
606 <xsl:with-param name="referrer" select="$referrer"/>
607 <xsl:with-param name="verbose" select="$verbose"/>
611 <xsl:value-of select="$template"/>
616 <!-- ============================================================ -->
618 <xsl:template name="make.gentext.template">
619 <xsl:param name="xrefstyle" select="''"/>
620 <xsl:param name="purpose"/>
621 <xsl:param name="referrer"/>
622 <xsl:param name="lang">
623 <xsl:call-template name="l10n.language"/>
625 <xsl:param name="target.elem" select="local-name(.)"/>
627 <!-- parse xrefstyle to get parts -->
628 <xsl:variable name="parts"
629 select="substring-after(normalize-space($xrefstyle), 'select:')"/>
631 <xsl:variable name="labeltype">
633 <xsl:when test="contains($parts, 'labelnumber')">
634 <xsl:text>labelnumber</xsl:text>
636 <xsl:when test="contains($parts, 'labelname')">
637 <xsl:text>labelname</xsl:text>
639 <xsl:when test="contains($parts, 'label')">
640 <xsl:text>label</xsl:text>
645 <xsl:variable name="titletype">
647 <xsl:when test="contains($parts, 'quotedtitle')">
648 <xsl:text>quotedtitle</xsl:text>
650 <xsl:when test="contains($parts, 'title')">
651 <xsl:text>title</xsl:text>
656 <xsl:variable name="pagetype">
658 <xsl:when test="$insert.olink.page.number = 'no' and
659 local-name($referrer) = 'olink'">
660 <!-- suppress page numbers -->
662 <xsl:when test="$insert.xref.page.number = 'no' and
663 local-name($referrer) != 'olink'">
664 <!-- suppress page numbers -->
666 <xsl:when test="contains($parts, 'nopage')">
667 <xsl:text>nopage</xsl:text>
669 <xsl:when test="contains($parts, 'pagenumber')">
670 <xsl:text>pagenumber</xsl:text>
672 <xsl:when test="contains($parts, 'pageabbrev')">
673 <xsl:text>pageabbrev</xsl:text>
675 <xsl:when test="contains($parts, 'Page')">
676 <xsl:text>Page</xsl:text>
678 <xsl:when test="contains($parts, 'page')">
679 <xsl:text>page</xsl:text>
684 <xsl:variable name="docnametype">
686 <xsl:when test="($olink.doctitle = 0 or
687 $olink.doctitle = 'no') and
688 local-name($referrer) = 'olink'">
689 <!-- suppress docname -->
691 <xsl:when test="contains($parts, 'nodocname')">
692 <xsl:text>nodocname</xsl:text>
694 <xsl:when test="contains($parts, 'docnamelong')">
695 <xsl:text>docnamelong</xsl:text>
697 <xsl:when test="contains($parts, 'docname')">
698 <xsl:text>docname</xsl:text>
703 <xsl:if test="$labeltype != ''">
705 <xsl:when test="$labeltype = 'labelname'">
706 <xsl:call-template name="gentext">
707 <xsl:with-param name="key">
709 <xsl:when test="local-name($referrer) = 'olink'">
710 <xsl:value-of select="$target.elem"/>
713 <xsl:value-of select="local-name(.)"/>
719 <xsl:when test="$labeltype = 'labelnumber'">
720 <xsl:text>%n</xsl:text>
722 <xsl:when test="$labeltype = 'label'">
723 <xsl:call-template name="gentext.template">
724 <xsl:with-param name="context" select="'xref-number'"/>
725 <xsl:with-param name="name">
727 <xsl:when test="local-name($referrer) = 'olink'">
728 <xsl:value-of select="$target.elem"/>
731 <xsl:call-template name="xpath.location"/>
735 <xsl:with-param name="purpose" select="$purpose"/>
736 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
737 <xsl:with-param name="referrer" select="$referrer"/>
743 <xsl:when test="$titletype != ''">
744 <xsl:value-of select="$xref.label-title.separator"/>
746 <xsl:when test="$pagetype != '' and $pagetype != 'nopage'">
747 <xsl:value-of select="$xref.label-page.separator"/>
752 <xsl:if test="$titletype != ''">
754 <xsl:when test="$titletype = 'title'">
755 <xsl:text>%t</xsl:text>
757 <xsl:when test="$titletype = 'quotedtitle'">
758 <xsl:call-template name="gentext.dingbat">
759 <xsl:with-param name="dingbat" select="'startquote'"/>
761 <xsl:text>%t</xsl:text>
762 <xsl:call-template name="gentext.dingbat">
763 <xsl:with-param name="dingbat" select="'endquote'"/>
769 <xsl:when test="$pagetype != '' and $pagetype != 'nopage'">
770 <xsl:value-of select="$xref.title-page.separator"/>
775 <!-- special case: use regular xref template if just turning off page -->
776 <xsl:if test="($pagetype = 'nopage' or $docnametype = 'nodocname')
777 and local-name($referrer) != 'olink'
779 and $titletype = ''">
780 <xsl:apply-templates select="." mode="object.xref.template">
781 <xsl:with-param name="purpose" select="$purpose"/>
782 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
783 <xsl:with-param name="referrer" select="$referrer"/>
784 </xsl:apply-templates>
787 <xsl:if test="$pagetype != ''">
789 <xsl:when test="$pagetype = 'page'">
790 <xsl:call-template name="gentext.template">
791 <xsl:with-param name="context" select="'xref'"/>
792 <xsl:with-param name="name" select="'page'"/>
795 <xsl:when test="$pagetype = 'Page'">
796 <xsl:call-template name="gentext.template">
797 <xsl:with-param name="context" select="'xref'"/>
798 <xsl:with-param name="name" select="'Page'"/>
801 <xsl:when test="$pagetype = 'pageabbrev'">
802 <xsl:call-template name="gentext.template">
803 <xsl:with-param name="context" select="'xref'"/>
804 <xsl:with-param name="name" select="'pageabbrev'"/>
807 <xsl:when test="$pagetype = 'pagenumber'">
808 <xsl:text>%p</xsl:text>
814 <!-- Add reference to other document title -->
815 <xsl:if test="$docnametype != '' and local-name($referrer) = 'olink'">
816 <!-- Any separator should be in the gentext template -->
818 <xsl:when test="$docnametype = 'docnamelong'">
819 <xsl:call-template name="gentext.template">
820 <xsl:with-param name="context" select="'xref'"/>
821 <xsl:with-param name="name" select="'docnamelong'"/>
824 <xsl:when test="$docnametype = 'docname'">
825 <xsl:call-template name="gentext.template">
826 <xsl:with-param name="context" select="'xref'"/>
827 <xsl:with-param name="name" select="'docname'"/>