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 8769 2010-07-26 17:38:32Z mzjn $
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="self::equation and not(title) and not(info/title)">
238 <xsl:value-of select="'xref-number'"/>
240 <xsl:when test="string($autonumber) != 0
241 and $number-and-title-template != 0
242 and $xref.with.number.and.title != 0">
243 <xsl:value-of select="'xref-number-and-title'"/>
245 <xsl:when test="string($autonumber) != 0
246 and $number-template != 0">
247 <xsl:value-of select="'xref-number'"/>
250 <xsl:value-of select="'xref'"/>
255 <xsl:call-template name="gentext.template">
256 <xsl:with-param name="context" select="$context"/>
257 <xsl:with-param name="name">
258 <xsl:call-template name="xpath.location"/>
260 <xsl:with-param name="purpose" select="$purpose"/>
261 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
262 <xsl:with-param name="referrer" select="$referrer"/>
268 <!-- ============================================================ -->
270 <xsl:template match="*" mode="object.title.markup">
271 <xsl:param name="allow-anchors" select="0"/>
272 <xsl:variable name="template">
273 <xsl:apply-templates select="." mode="object.title.template"/>
278 <xsl:text>object.title.markup: </xsl:text>
279 <xsl:value-of select="local-name(.)"/>
280 <xsl:text>: </xsl:text>
281 <xsl:value-of select="$template"/>
285 <xsl:call-template name="substitute-markup">
286 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
287 <xsl:with-param name="template" select="$template"/>
291 <xsl:template match="*" mode="object.title.markup.textonly">
292 <xsl:variable name="title">
293 <xsl:apply-templates select="." mode="object.title.markup"/>
295 <xsl:value-of select="normalize-space($title)"/>
298 <!-- ============================================================ -->
300 <xsl:template match="*" mode="object.titleabbrev.markup">
301 <xsl:param name="allow-anchors" select="0"/>
303 <!-- Just for consistency in template naming -->
305 <xsl:apply-templates select="." mode="titleabbrev.markup">
306 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
307 </xsl:apply-templates>
310 <!-- ============================================================ -->
312 <xsl:template match="*" mode="object.subtitle.markup">
313 <xsl:variable name="template">
314 <xsl:apply-templates select="." mode="object.subtitle.template"/>
317 <xsl:call-template name="substitute-markup">
318 <xsl:with-param name="template" select="$template"/>
322 <!-- ============================================================ -->
324 <xsl:template match="*" mode="object.xref.markup">
325 <xsl:param name="purpose"/>
326 <xsl:param name="xrefstyle"/>
327 <xsl:param name="referrer"/>
328 <xsl:param name="verbose" select="1"/>
330 <xsl:variable name="template">
332 <xsl:when test="starts-with(normalize-space($xrefstyle), 'select:')">
333 <xsl:call-template name="make.gentext.template">
334 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
335 <xsl:with-param name="purpose" select="$purpose"/>
336 <xsl:with-param name="referrer" select="$referrer"/>
339 <xsl:when test="starts-with(normalize-space($xrefstyle), 'template:')">
340 <xsl:value-of select="substring-after(normalize-space($xrefstyle), 'template:')"/>
343 <xsl:apply-templates select="." mode="object.xref.template">
344 <xsl:with-param name="purpose" select="$purpose"/>
345 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
346 <xsl:with-param name="referrer" select="$referrer"/>
347 </xsl:apply-templates>
354 <xsl:text>object.xref.markup: </xsl:text>
355 <xsl:value-of select="local-name(.)"/>
356 <xsl:text>(</xsl:text>
357 <xsl:value-of select="$xrefstyle"/>
358 <xsl:text>, </xsl:text>
359 <xsl:value-of select="$purpose"/>
360 <xsl:text>)</xsl:text>
361 <xsl:text>: [</xsl:text>
362 <xsl:value-of select="$template"/>
363 <xsl:text>]</xsl:text>
367 <xsl:if test="$template = '' and $verbose != 0">
369 <xsl:text>object.xref.markup: empty xref template</xsl:text>
370 <xsl:text> for linkend="</xsl:text>
371 <xsl:value-of select="@id|@xml:id"/>
372 <xsl:text>" and @xrefstyle="</xsl:text>
373 <xsl:value-of select="$xrefstyle"/>
374 <xsl:text>"</xsl:text>
378 <xsl:call-template name="substitute-markup">
379 <xsl:with-param name="purpose" select="$purpose"/>
380 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
381 <xsl:with-param name="referrer" select="$referrer"/>
382 <xsl:with-param name="template" select="$template"/>
383 <xsl:with-param name="verbose" select="$verbose"/>
387 <xsl:template match="listitem" mode="object.xref.markup">
388 <xsl:param name="verbose" select="1"/>
391 <xsl:when test="parent::orderedlist">
392 <xsl:variable name="template">
393 <xsl:apply-templates select="." mode="object.xref.template"/>
395 <xsl:call-template name="substitute-markup">
396 <xsl:with-param name="template" select="$template"/>
399 <xsl:when test="$verbose != 0">
401 <xsl:text>Xref is only supported to listitems in an</xsl:text>
402 <xsl:text> orderedlist: </xsl:text>
403 <xsl:value-of select=".//@id|.//@xml:id"/>
405 <xsl:text>???</xsl:text>
410 <xsl:template match="question" mode="object.xref.markup">
411 <xsl:param name="purpose"/>
412 <xsl:param name="xrefstyle"/>
413 <xsl:param name="referrer"/>
415 <xsl:variable name="deflabel">
417 <xsl:when test="ancestor-or-self::*[@defaultlabel]">
418 <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
422 <xsl:value-of select="$qanda.defaultlabel"/>
427 <xsl:variable name="template">
429 <!-- This avoids double Q: Q: in xref when defaultlabel=qanda -->
430 <xsl:when test="$deflabel = 'qanda' and not(label)">%n</xsl:when>
432 <xsl:apply-templates select="." mode="object.xref.template">
433 <xsl:with-param name="purpose" select="$purpose"/>
434 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
435 <xsl:with-param name="referrer" select="$referrer"/>
436 </xsl:apply-templates>
441 <xsl:call-template name="substitute-markup">
442 <xsl:with-param name="purpose" select="$purpose"/>
443 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
444 <xsl:with-param name="referrer" select="$referrer"/>
445 <xsl:with-param name="template" select="$template"/>
449 <!-- ============================================================ -->
451 <xsl:template name="substitute-markup">
452 <xsl:param name="template" select="''"/>
453 <xsl:param name="allow-anchors" select="'0'"/>
454 <xsl:param name="title" select="''"/>
455 <xsl:param name="subtitle" select="''"/>
456 <xsl:param name="docname" select="''"/>
457 <xsl:param name="label" select="''"/>
458 <xsl:param name="pagenumber" select="''"/>
459 <xsl:param name="purpose"/>
460 <xsl:param name="xrefstyle"/>
461 <xsl:param name="referrer"/>
462 <xsl:param name="verbose"/>
465 <xsl:when test="contains($template, '%')">
466 <xsl:value-of select="substring-before($template, '%')"/>
467 <xsl:variable name="candidate"
468 select="substring(substring-after($template, '%'), 1, 1)"/>
470 <xsl:when test="$candidate = 't'">
471 <xsl:apply-templates select="." mode="insert.title.markup">
472 <xsl:with-param name="purpose" select="$purpose"/>
473 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
474 <xsl:with-param name="title">
476 <xsl:when test="$title != ''">
477 <xsl:copy-of select="$title"/>
480 <xsl:apply-templates select="." mode="title.markup">
481 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
482 <xsl:with-param name="verbose" select="$verbose"/>
483 </xsl:apply-templates>
487 </xsl:apply-templates>
489 <xsl:when test="$candidate = 's'">
490 <xsl:apply-templates select="." mode="insert.subtitle.markup">
491 <xsl:with-param name="purpose" select="$purpose"/>
492 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
493 <xsl:with-param name="subtitle">
495 <xsl:when test="$subtitle != ''">
496 <xsl:copy-of select="$subtitle"/>
499 <xsl:apply-templates select="." mode="subtitle.markup">
500 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
501 </xsl:apply-templates>
505 </xsl:apply-templates>
507 <xsl:when test="$candidate = 'n'">
508 <xsl:apply-templates select="." mode="insert.label.markup">
509 <xsl:with-param name="purpose" select="$purpose"/>
510 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
511 <xsl:with-param name="label">
513 <xsl:when test="$label != ''">
514 <xsl:copy-of select="$label"/>
517 <xsl:apply-templates select="." mode="label.markup"/>
521 </xsl:apply-templates>
523 <xsl:when test="$candidate = 'p'">
524 <xsl:apply-templates select="." mode="insert.pagenumber.markup">
525 <xsl:with-param name="purpose" select="$purpose"/>
526 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
527 <xsl:with-param name="pagenumber">
529 <xsl:when test="$pagenumber != ''">
530 <xsl:copy-of select="$pagenumber"/>
533 <xsl:apply-templates select="." mode="pagenumber.markup"/>
537 </xsl:apply-templates>
539 <xsl:when test="$candidate = 'o'">
540 <!-- olink target document title -->
541 <xsl:apply-templates select="." mode="insert.olink.docname.markup">
542 <xsl:with-param name="purpose" select="$purpose"/>
543 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
544 <xsl:with-param name="docname">
546 <xsl:when test="$docname != ''">
547 <xsl:copy-of select="$docname"/>
550 <xsl:apply-templates select="." mode="olink.docname.markup"/>
554 </xsl:apply-templates>
556 <xsl:when test="$candidate = 'd'">
557 <xsl:apply-templates select="." mode="insert.direction.markup">
558 <xsl:with-param name="purpose" select="$purpose"/>
559 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
560 <xsl:with-param name="direction">
562 <xsl:when test="$referrer">
563 <xsl:variable name="referent-is-below">
564 <xsl:for-each select="preceding::xref">
565 <xsl:if test="generate-id(.) = generate-id($referrer)">1</xsl:if>
569 <xsl:when test="$referent-is-below = ''">
570 <xsl:call-template name="gentext">
571 <xsl:with-param name="key" select="'above'"/>
575 <xsl:call-template name="gentext">
576 <xsl:with-param name="key" select="'below'"/>
582 <xsl:message>Attempt to use %d in gentext with no referrer!</xsl:message>
586 </xsl:apply-templates>
588 <xsl:when test="$candidate = '%' ">
589 <xsl:text>%</xsl:text>
592 <xsl:text>%</xsl:text><xsl:value-of select="$candidate"/>
595 <!-- recurse with the rest of the template string -->
596 <xsl:variable name="rest"
597 select="substring($template,
598 string-length(substring-before($template, '%'))+3)"/>
599 <xsl:call-template name="substitute-markup">
600 <xsl:with-param name="template" select="$rest"/>
601 <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
602 <xsl:with-param name="title" select="$title"/>
603 <xsl:with-param name="subtitle" select="$subtitle"/>
604 <xsl:with-param name="docname" select="$docname"/>
605 <xsl:with-param name="label" select="$label"/>
606 <xsl:with-param name="pagenumber" select="$pagenumber"/>
607 <xsl:with-param name="purpose" select="$purpose"/>
608 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
609 <xsl:with-param name="referrer" select="$referrer"/>
610 <xsl:with-param name="verbose" select="$verbose"/>
614 <xsl:value-of select="$template"/>
619 <!-- ============================================================ -->
621 <xsl:template name="make.gentext.template">
622 <xsl:param name="xrefstyle" select="''"/>
623 <xsl:param name="purpose"/>
624 <xsl:param name="referrer"/>
625 <xsl:param name="lang">
626 <xsl:call-template name="l10n.language"/>
628 <xsl:param name="target.elem" select="local-name(.)"/>
630 <!-- parse xrefstyle to get parts -->
631 <xsl:variable name="parts"
632 select="substring-after(normalize-space($xrefstyle), 'select:')"/>
634 <xsl:variable name="labeltype">
636 <xsl:when test="contains($parts, 'labelnumber')">
637 <xsl:text>labelnumber</xsl:text>
639 <xsl:when test="contains($parts, 'labelname')">
640 <xsl:text>labelname</xsl:text>
642 <xsl:when test="contains($parts, 'label')">
643 <xsl:text>label</xsl:text>
648 <xsl:variable name="titletype">
650 <xsl:when test="contains($parts, 'quotedtitle')">
651 <xsl:text>quotedtitle</xsl:text>
653 <xsl:when test="contains($parts, 'title')">
654 <xsl:text>title</xsl:text>
659 <xsl:variable name="pagetype">
661 <xsl:when test="$insert.olink.page.number = 'no' and
662 local-name($referrer) = 'olink'">
663 <!-- suppress page numbers -->
665 <xsl:when test="$insert.xref.page.number = 'no' and
666 local-name($referrer) != 'olink'">
667 <!-- suppress page numbers -->
669 <xsl:when test="contains($parts, 'nopage')">
670 <xsl:text>nopage</xsl:text>
672 <xsl:when test="contains($parts, 'pagenumber')">
673 <xsl:text>pagenumber</xsl:text>
675 <xsl:when test="contains($parts, 'pageabbrev')">
676 <xsl:text>pageabbrev</xsl:text>
678 <xsl:when test="contains($parts, 'Page')">
679 <xsl:text>Page</xsl:text>
681 <xsl:when test="contains($parts, 'page')">
682 <xsl:text>page</xsl:text>
687 <xsl:variable name="docnametype">
689 <xsl:when test="($olink.doctitle = 0 or
690 $olink.doctitle = 'no') and
691 local-name($referrer) = 'olink'">
692 <!-- suppress docname -->
694 <xsl:when test="contains($parts, 'nodocname')">
695 <xsl:text>nodocname</xsl:text>
697 <xsl:when test="contains($parts, 'docnamelong')">
698 <xsl:text>docnamelong</xsl:text>
700 <xsl:when test="contains($parts, 'docname')">
701 <xsl:text>docname</xsl:text>
706 <xsl:if test="$labeltype != ''">
708 <xsl:when test="$labeltype = 'labelname'">
709 <xsl:call-template name="gentext">
710 <xsl:with-param name="key">
712 <xsl:when test="local-name($referrer) = 'olink'">
713 <xsl:value-of select="$target.elem"/>
716 <xsl:value-of select="local-name(.)"/>
722 <xsl:when test="$labeltype = 'labelnumber'">
723 <xsl:text>%n</xsl:text>
725 <xsl:when test="$labeltype = 'label'">
726 <xsl:call-template name="gentext.template">
727 <xsl:with-param name="context" select="'xref-number'"/>
728 <xsl:with-param name="name">
730 <xsl:when test="local-name($referrer) = 'olink'">
731 <xsl:value-of select="$target.elem"/>
734 <xsl:call-template name="xpath.location"/>
738 <xsl:with-param name="purpose" select="$purpose"/>
739 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
740 <xsl:with-param name="referrer" select="$referrer"/>
746 <xsl:when test="$titletype != ''">
747 <xsl:value-of select="$xref.label-title.separator"/>
749 <xsl:when test="$pagetype != '' and $pagetype != 'nopage'">
750 <xsl:value-of select="$xref.label-page.separator"/>
755 <xsl:if test="$titletype != ''">
757 <xsl:when test="$titletype = 'title'">
758 <xsl:text>%t</xsl:text>
760 <xsl:when test="$titletype = 'quotedtitle'">
761 <xsl:call-template name="gentext.dingbat">
762 <xsl:with-param name="dingbat" select="'startquote'"/>
764 <xsl:text>%t</xsl:text>
765 <xsl:call-template name="gentext.dingbat">
766 <xsl:with-param name="dingbat" select="'endquote'"/>
772 <xsl:when test="$pagetype != '' and $pagetype != 'nopage'">
773 <xsl:value-of select="$xref.title-page.separator"/>
778 <!-- special case: use regular xref template if just turning off page -->
779 <xsl:if test="($pagetype = 'nopage' or $docnametype = 'nodocname')
780 and local-name($referrer) != 'olink'
782 and $titletype = ''">
783 <xsl:apply-templates select="." mode="object.xref.template">
784 <xsl:with-param name="purpose" select="$purpose"/>
785 <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
786 <xsl:with-param name="referrer" select="$referrer"/>
787 </xsl:apply-templates>
790 <xsl:if test="$pagetype != ''">
792 <xsl:when test="$pagetype = 'page'">
793 <xsl:call-template name="gentext.template">
794 <xsl:with-param name="context" select="'xref'"/>
795 <xsl:with-param name="name" select="'page'"/>
798 <xsl:when test="$pagetype = 'Page'">
799 <xsl:call-template name="gentext.template">
800 <xsl:with-param name="context" select="'xref'"/>
801 <xsl:with-param name="name" select="'Page'"/>
804 <xsl:when test="$pagetype = 'pageabbrev'">
805 <xsl:call-template name="gentext.template">
806 <xsl:with-param name="context" select="'xref'"/>
807 <xsl:with-param name="name" select="'pageabbrev'"/>
810 <xsl:when test="$pagetype = 'pagenumber'">
811 <xsl:text>%p</xsl:text>
817 <!-- Add reference to other document title -->
818 <xsl:if test="$docnametype != '' and local-name($referrer) = 'olink'">
819 <!-- Any separator should be in the gentext template -->
821 <xsl:when test="$docnametype = 'docnamelong'">
822 <xsl:call-template name="gentext.template">
823 <xsl:with-param name="context" select="'xref'"/>
824 <xsl:with-param name="name" select="'docnamelong'"/>
827 <xsl:when test="$docnametype = 'docname'">
828 <xsl:call-template name="gentext.template">
829 <xsl:with-param name="context" select="'xref'"/>
830 <xsl:with-param name="name" select="'docname'"/>