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,v 1.1 2007/03/10 05:14:55 scott Exp $
9 ********************************************************************
11 This file is part of the XSL DocBook Stylesheet distribution.
12 See ../README or http://nwalsh.com/docbook/xsl/ for copyright
13 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=
"*" mode=
"object.xref.template">
203 <xsl:param name=
"purpose"/>
204 <xsl:param name=
"xrefstyle"/>
205 <xsl:param name=
"referrer"/>
207 <!-- Is autonumbering on? -->
208 <xsl:variable name=
"autonumber">
209 <xsl:apply-templates select=
"." mode=
"is.autonumber"/>
212 <xsl:variable name=
"number-and-title-template">
213 <xsl:call-template name=
"gentext.template.exists">
214 <xsl:with-param name=
"context" select=
"'xref-number-and-title'"/>
215 <xsl:with-param name=
"name">
216 <xsl:call-template name=
"xpath.location"/>
221 <xsl:variable name=
"number-template">
222 <xsl:call-template name=
"gentext.template.exists">
223 <xsl:with-param name=
"context" select=
"'xref-number'"/>
224 <xsl:with-param name=
"name">
225 <xsl:call-template name=
"xpath.location"/>
230 <xsl:variable name=
"context">
232 <xsl:when test=
"string($autonumber) != 0
233 and $number-and-title-template != 0
234 and $xref.with.number.and.title != 0">
235 <xsl:value-of select=
"'xref-number-and-title'"/>
237 <xsl:when test=
"string($autonumber) != 0
238 and $number-template != 0">
239 <xsl:value-of select=
"'xref-number'"/>
242 <xsl:value-of select=
"'xref'"/>
247 <xsl:call-template name=
"gentext.template">
248 <xsl:with-param name=
"context" select=
"$context"/>
249 <xsl:with-param name=
"name">
250 <xsl:call-template name=
"xpath.location"/>
252 <xsl:with-param name=
"purpose" select=
"$purpose"/>
253 <xsl:with-param name=
"xrefstyle" select=
"$xrefstyle"/>
254 <xsl:with-param name=
"referrer" select=
"$referrer"/>
260 <!-- ============================================================ -->
262 <xsl:template match=
"*" mode=
"object.title.markup">
263 <xsl:param name=
"allow-anchors" select=
"0"/>
264 <xsl:variable name=
"template">
265 <xsl:apply-templates select=
"." mode=
"object.title.template"/>
270 <xsl:text>object.title.markup: </xsl:text>
271 <xsl:value-of select="local-name(.)"/>
272 <xsl:text>: </xsl:text>
273 <xsl:value-of select="$template"/>
277 <xsl:call-template name=
"substitute-markup">
278 <xsl:with-param name=
"allow-anchors" select=
"$allow-anchors"/>
279 <xsl:with-param name=
"template" select=
"$template"/>
283 <xsl:template match=
"*" mode=
"object.title.markup.textonly">
284 <xsl:variable name=
"title">
285 <xsl:apply-templates select=
"." mode=
"object.title.markup"/>
287 <xsl:value-of select=
"normalize-space($title)"/>
290 <!-- ============================================================ -->
292 <xsl:template match=
"*" mode=
"object.titleabbrev.markup">
293 <xsl:param name=
"allow-anchors" select=
"0"/>
295 <!-- Just for consistency in template naming -->
297 <xsl:apply-templates select=
"." mode=
"titleabbrev.markup">
298 <xsl:with-param name=
"allow-anchors" select=
"$allow-anchors"/>
299 </xsl:apply-templates>
302 <!-- ============================================================ -->
304 <xsl:template match=
"*" mode=
"object.subtitle.markup">
305 <xsl:variable name=
"template">
306 <xsl:apply-templates select=
"." mode=
"object.subtitle.template"/>
309 <xsl:call-template name=
"substitute-markup">
310 <xsl:with-param name=
"template" select=
"$template"/>
314 <!-- ============================================================ -->
316 <xsl:template match=
"*" mode=
"object.xref.markup">
317 <xsl:param name=
"purpose"/>
318 <xsl:param name=
"xrefstyle"/>
319 <xsl:param name=
"referrer"/>
320 <xsl:param name=
"verbose" select=
"1"/>
322 <xsl:variable name=
"template">
324 <xsl:when test=
"starts-with(normalize-space($xrefstyle), 'select:')">
325 <xsl:call-template name=
"make.gentext.template">
326 <xsl:with-param name=
"xrefstyle" select=
"$xrefstyle"/>
327 <xsl:with-param name=
"purpose" select=
"$purpose"/>
328 <xsl:with-param name=
"referrer" select=
"$referrer"/>
331 <xsl:when test=
"starts-with(normalize-space($xrefstyle), 'template:')">
332 <xsl:value-of select=
"substring-after(normalize-space($xrefstyle), 'template:')"/>
335 <xsl:apply-templates select=
"." mode=
"object.xref.template">
336 <xsl:with-param name=
"purpose" select=
"$purpose"/>
337 <xsl:with-param name=
"xrefstyle" select=
"$xrefstyle"/>
338 <xsl:with-param name=
"referrer" select=
"$referrer"/>
339 </xsl:apply-templates>
346 <xsl:text>object.xref.markup: </xsl:text>
347 <xsl:value-of select="local-name(.)"/>
348 <xsl:text>(</xsl:text>
349 <xsl:value-of select="$xrefstyle"/>
350 <xsl:text>, </xsl:text>
351 <xsl:value-of select="$purpose"/>
352 <xsl:text>)</xsl:text>
353 <xsl:text>: [</xsl:text>
354 <xsl:value-of select="$template"/>
355 <xsl:text>]</xsl:text>
359 <xsl:if test=
"$template = '' and $verbose != 0">
361 <xsl:text>object.xref.markup: empty xref template
</xsl:text>
362 <xsl:text> for
linkend=
"</xsl:text>
363 <xsl:value-of select="@id|@xml:id
"/>
364 <xsl:text>" and @
xrefstyle=
"</xsl:text>
365 <xsl:value-of select="$xrefstyle
"/>
366 <xsl:text>"</xsl:text>
370 <xsl:call-template name=
"substitute-markup">
371 <xsl:with-param name=
"purpose" select=
"$purpose"/>
372 <xsl:with-param name=
"xrefstyle" select=
"$xrefstyle"/>
373 <xsl:with-param name=
"referrer" select=
"$referrer"/>
374 <xsl:with-param name=
"template" select=
"$template"/>
375 <xsl:with-param name=
"verbose" select=
"$verbose"/>
379 <xsl:template match=
"listitem" mode=
"object.xref.markup">
380 <xsl:param name=
"verbose" select=
"1"/>
383 <xsl:when test=
"parent::orderedlist">
384 <xsl:variable name=
"template">
385 <xsl:apply-templates select=
"." mode=
"object.xref.template"/>
387 <xsl:call-template name=
"substitute-markup">
388 <xsl:with-param name=
"template" select=
"$template"/>
391 <xsl:when test=
"$verbose != 0">
393 <xsl:text>Xref is only supported to listitems in an
</xsl:text>
394 <xsl:text> orderedlist:
</xsl:text>
395 <xsl:value-of select=
"@id|@xml:id"/>
397 <xsl:text>???
</xsl:text>
402 <xsl:template match=
"question" mode=
"object.xref.markup">
403 <xsl:param name=
"purpose"/>
404 <xsl:param name=
"xrefstyle"/>
405 <xsl:param name=
"referrer"/>
407 <xsl:variable name=
"deflabel">
409 <xsl:when test=
"ancestor-or-self::*[@defaultlabel]">
410 <xsl:value-of select=
"(ancestor-or-self::*[@defaultlabel])[last()]
414 <xsl:value-of select=
"$qanda.defaultlabel"/>
419 <xsl:variable name=
"template">
421 <!-- This avoids double Q: Q: in xref when defaultlabel=qanda -->
422 <xsl:when test=
"$deflabel = 'qanda' and not(label)">%n
</xsl:when>
424 <xsl:apply-templates select=
"." mode=
"object.xref.template">
425 <xsl:with-param name=
"purpose" select=
"$purpose"/>
426 <xsl:with-param name=
"xrefstyle" select=
"$xrefstyle"/>
427 <xsl:with-param name=
"referrer" select=
"$referrer"/>
428 </xsl:apply-templates>
433 <xsl:call-template name=
"substitute-markup">
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:with-param name=
"template" select=
"$template"/>
441 <!-- ============================================================ -->
443 <xsl:template name=
"substitute-markup">
444 <xsl:param name=
"template" select=
"''"/>
445 <xsl:param name=
"allow-anchors" select=
"'0'"/>
446 <xsl:param name=
"title" select=
"''"/>
447 <xsl:param name=
"subtitle" select=
"''"/>
448 <xsl:param name=
"docname" select=
"''"/>
449 <xsl:param name=
"label" select=
"''"/>
450 <xsl:param name=
"pagenumber" select=
"''"/>
451 <xsl:param name=
"purpose"/>
452 <xsl:param name=
"xrefstyle"/>
453 <xsl:param name=
"referrer"/>
454 <xsl:param name=
"verbose"/>
457 <xsl:when test=
"contains($template, '%')">
458 <xsl:value-of select=
"substring-before($template, '%')"/>
459 <xsl:variable name=
"candidate"
460 select=
"substring(substring-after($template, '%'), 1, 1)"/>
462 <xsl:when test=
"$candidate = 't'">
463 <xsl:apply-templates select=
"." mode=
"insert.title.markup">
464 <xsl:with-param name=
"purpose" select=
"$purpose"/>
465 <xsl:with-param name=
"xrefstyle" select=
"$xrefstyle"/>
466 <xsl:with-param name=
"title">
468 <xsl:when test=
"$title != ''">
469 <xsl:copy-of select=
"$title"/>
472 <xsl:apply-templates select=
"." mode=
"title.markup">
473 <xsl:with-param name=
"allow-anchors" select=
"$allow-anchors"/>
474 <xsl:with-param name=
"verbose" select=
"$verbose"/>
475 </xsl:apply-templates>
479 </xsl:apply-templates>
481 <xsl:when test=
"$candidate = 's'">
482 <xsl:apply-templates select=
"." mode=
"insert.subtitle.markup">
483 <xsl:with-param name=
"purpose" select=
"$purpose"/>
484 <xsl:with-param name=
"xrefstyle" select=
"$xrefstyle"/>
485 <xsl:with-param name=
"subtitle">
487 <xsl:when test=
"$subtitle != ''">
488 <xsl:copy-of select=
"$subtitle"/>
491 <xsl:apply-templates select=
"." mode=
"subtitle.markup">
492 <xsl:with-param name=
"allow-anchors" select=
"$allow-anchors"/>
493 </xsl:apply-templates>
497 </xsl:apply-templates>
499 <xsl:when test=
"$candidate = 'n'">
500 <xsl:apply-templates select=
"." mode=
"insert.label.markup">
501 <xsl:with-param name=
"purpose" select=
"$purpose"/>
502 <xsl:with-param name=
"xrefstyle" select=
"$xrefstyle"/>
503 <xsl:with-param name=
"label">
505 <xsl:when test=
"$label != ''">
506 <xsl:copy-of select=
"$label"/>
509 <xsl:apply-templates select=
"." mode=
"label.markup"/>
513 </xsl:apply-templates>
515 <xsl:when test=
"$candidate = 'p'">
516 <xsl:apply-templates select=
"." mode=
"insert.pagenumber.markup">
517 <xsl:with-param name=
"purpose" select=
"$purpose"/>
518 <xsl:with-param name=
"xrefstyle" select=
"$xrefstyle"/>
519 <xsl:with-param name=
"pagenumber">
521 <xsl:when test=
"$pagenumber != ''">
522 <xsl:copy-of select=
"$pagenumber"/>
525 <xsl:apply-templates select=
"." mode=
"pagenumber.markup"/>
529 </xsl:apply-templates>
531 <xsl:when test=
"$candidate = 'o'">
532 <!-- olink target document title -->
533 <xsl:apply-templates select=
"." mode=
"insert.olink.docname.markup">
534 <xsl:with-param name=
"purpose" select=
"$purpose"/>
535 <xsl:with-param name=
"xrefstyle" select=
"$xrefstyle"/>
536 <xsl:with-param name=
"docname">
538 <xsl:when test=
"$docname != ''">
539 <xsl:copy-of select=
"$docname"/>
542 <xsl:apply-templates select=
"." mode=
"olink.docname.markup"/>
546 </xsl:apply-templates>
548 <xsl:when test=
"$candidate = 'd'">
549 <xsl:apply-templates select=
"." mode=
"insert.direction.markup">
550 <xsl:with-param name=
"purpose" select=
"$purpose"/>
551 <xsl:with-param name=
"xrefstyle" select=
"$xrefstyle"/>
552 <xsl:with-param name=
"direction">
554 <xsl:when test=
"$referrer">
555 <xsl:variable name=
"referent-is-below">
556 <xsl:for-each select=
"preceding::xref">
557 <xsl:if test=
"generate-id(.) = generate-id($referrer)">1</xsl:if>
561 <xsl:when test=
"$referent-is-below = ''">
562 <xsl:call-template name=
"gentext">
563 <xsl:with-param name=
"key" select=
"'above'"/>
567 <xsl:call-template name=
"gentext">
568 <xsl:with-param name=
"key" select=
"'below'"/>
574 <xsl:message>Attempt to use %d in gentext with no referrer!
</xsl:message>
578 </xsl:apply-templates>
580 <xsl:when test=
"$candidate = '%' ">
581 <xsl:text>%
</xsl:text>
584 <xsl:text>%
</xsl:text><xsl:value-of select=
"$candidate"/>
587 <!-- recurse with the rest of the template string -->
588 <xsl:variable name=
"rest"
589 select=
"substring($template,
590 string-length(substring-before($template, '%'))+3)"/>
591 <xsl:call-template name=
"substitute-markup">
592 <xsl:with-param name=
"template" select=
"$rest"/>
593 <xsl:with-param name=
"allow-anchors" select=
"$allow-anchors"/>
594 <xsl:with-param name=
"title" select=
"$title"/>
595 <xsl:with-param name=
"subtitle" select=
"$subtitle"/>
596 <xsl:with-param name=
"docname" select=
"$docname"/>
597 <xsl:with-param name=
"label" select=
"$label"/>
598 <xsl:with-param name=
"pagenumber" select=
"$pagenumber"/>
599 <xsl:with-param name=
"purpose" select=
"$purpose"/>
600 <xsl:with-param name=
"xrefstyle" select=
"$xrefstyle"/>
601 <xsl:with-param name=
"referrer" select=
"$referrer"/>
602 <xsl:with-param name=
"verbose" select=
"$verbose"/>
606 <xsl:value-of select=
"$template"/>
611 <!-- ============================================================ -->
613 <xsl:template name=
"make.gentext.template">
614 <xsl:param name=
"xrefstyle" select=
"''"/>
615 <xsl:param name=
"purpose"/>
616 <xsl:param name=
"referrer"/>
617 <xsl:param name=
"lang">
618 <xsl:call-template name=
"l10n.language"/>
620 <xsl:param name=
"target.elem" select=
"local-name(.)"/>
622 <!-- parse xrefstyle to get parts -->
623 <xsl:variable name=
"parts"
624 select=
"substring-after(normalize-space($xrefstyle), 'select:')"/>
626 <xsl:variable name=
"labeltype">
628 <xsl:when test=
"contains($parts, 'labelnumber')">
629 <xsl:text>labelnumber
</xsl:text>
631 <xsl:when test=
"contains($parts, 'labelname')">
632 <xsl:text>labelname
</xsl:text>
634 <xsl:when test=
"contains($parts, 'label')">
635 <xsl:text>label
</xsl:text>
640 <xsl:variable name=
"titletype">
642 <xsl:when test=
"contains($parts, 'quotedtitle')">
643 <xsl:text>quotedtitle
</xsl:text>
645 <xsl:when test=
"contains($parts, 'title')">
646 <xsl:text>title
</xsl:text>
651 <xsl:variable name=
"pagetype">
653 <xsl:when test=
"$insert.olink.page.number = 'no' and
654 local-name($referrer) = 'olink'">
655 <!-- suppress page numbers -->
657 <xsl:when test=
"$insert.xref.page.number = 'no' and
658 local-name($referrer) != 'olink'">
659 <!-- suppress page numbers -->
661 <xsl:when test=
"contains($parts, 'nopage')">
662 <xsl:text>nopage
</xsl:text>
664 <xsl:when test=
"contains($parts, 'pagenumber')">
665 <xsl:text>pagenumber
</xsl:text>
667 <xsl:when test=
"contains($parts, 'pageabbrev')">
668 <xsl:text>pageabbrev
</xsl:text>
670 <xsl:when test=
"contains($parts, 'Page')">
671 <xsl:text>Page
</xsl:text>
673 <xsl:when test=
"contains($parts, 'page')">
674 <xsl:text>page
</xsl:text>
679 <xsl:variable name=
"docnametype">
681 <xsl:when test=
"($olink.doctitle = 0 or
682 $olink.doctitle = 'no') and
683 local-name($referrer) = 'olink'">
684 <!-- suppress docname -->
686 <xsl:when test=
"contains($parts, 'nodocname')">
687 <xsl:text>nodocname
</xsl:text>
689 <xsl:when test=
"contains($parts, 'docnamelong')">
690 <xsl:text>docnamelong
</xsl:text>
692 <xsl:when test=
"contains($parts, 'docname')">
693 <xsl:text>docname
</xsl:text>
698 <xsl:if test=
"$labeltype != ''">
700 <xsl:when test=
"$labeltype = 'labelname'">
701 <xsl:call-template name=
"gentext">
702 <xsl:with-param name=
"key">
704 <xsl:when test=
"local-name($referrer) = 'olink'">
705 <xsl:value-of select=
"$target.elem"/>
708 <xsl:value-of select=
"local-name(.)"/>
714 <xsl:when test=
"$labeltype = 'labelnumber'">
715 <xsl:text>%n
</xsl:text>
717 <xsl:when test=
"$labeltype = 'label'">
718 <xsl:call-template name=
"gentext.template">
719 <xsl:with-param name=
"context" select=
"'xref-number'"/>
720 <xsl:with-param name=
"name">
722 <xsl:when test=
"local-name($referrer) = 'olink'">
723 <xsl:value-of select=
"$target.elem"/>
726 <xsl:call-template name=
"xpath.location"/>
730 <xsl:with-param name=
"purpose" select=
"$purpose"/>
731 <xsl:with-param name=
"xrefstyle" select=
"$xrefstyle"/>
732 <xsl:with-param name=
"referrer" select=
"$referrer"/>
738 <xsl:when test=
"$titletype != ''">
739 <xsl:value-of select=
"$xref.label-title.separator"/>
741 <xsl:when test=
"$pagetype != ''">
742 <xsl:value-of select=
"$xref.label-page.separator"/>
747 <xsl:if test=
"$titletype != ''">
749 <xsl:when test=
"$titletype = 'title'">
750 <xsl:text>%t
</xsl:text>
752 <xsl:when test=
"$titletype = 'quotedtitle'">
753 <xsl:call-template name=
"gentext.dingbat">
754 <xsl:with-param name=
"dingbat" select=
"'startquote'"/>
756 <xsl:text>%t
</xsl:text>
757 <xsl:call-template name=
"gentext.dingbat">
758 <xsl:with-param name=
"dingbat" select=
"'endquote'"/>
764 <xsl:when test=
"$pagetype != '' and $pagetype != 'nopage'">
765 <xsl:value-of select=
"$xref.title-page.separator"/>
770 <!-- special case: use regular xref template if just turning off page -->
771 <xsl:if test=
"($pagetype = 'nopage' or $docnametype = 'nodocname')
772 and local-name($referrer) != 'olink'
774 and $titletype = ''">
775 <xsl:apply-templates select=
"." mode=
"object.xref.template">
776 <xsl:with-param name=
"purpose" select=
"$purpose"/>
777 <xsl:with-param name=
"xrefstyle" select=
"$xrefstyle"/>
778 <xsl:with-param name=
"referrer" select=
"$referrer"/>
779 </xsl:apply-templates>
782 <xsl:if test=
"$pagetype != ''">
784 <xsl:when test=
"$pagetype = 'page'">
785 <xsl:call-template name=
"gentext.template">
786 <xsl:with-param name=
"context" select=
"'xref'"/>
787 <xsl:with-param name=
"name" select=
"'page'"/>
790 <xsl:when test=
"$pagetype = 'Page'">
791 <xsl:call-template name=
"gentext.template">
792 <xsl:with-param name=
"context" select=
"'xref'"/>
793 <xsl:with-param name=
"name" select=
"'Page'"/>
796 <xsl:when test=
"$pagetype = 'pageabbrev'">
797 <xsl:call-template name=
"gentext.template">
798 <xsl:with-param name=
"context" select=
"'xref'"/>
799 <xsl:with-param name=
"name" select=
"'pageabbrev'"/>
802 <xsl:when test=
"$pagetype = 'pagenumber'">
803 <xsl:text>%p
</xsl:text>
809 <!-- Add reference to other document title -->
810 <xsl:if test=
"$docnametype != '' and local-name($referrer) = 'olink'">
811 <!-- Any separator should be in the gentext template -->
813 <xsl:when test=
"$docnametype = 'docnamelong'">
814 <xsl:call-template name=
"gentext.template">
815 <xsl:with-param name=
"context" select=
"'xref'"/>
816 <xsl:with-param name=
"name" select=
"'docnamelong'"/>
819 <xsl:when test=
"$docnametype = 'docname'">
820 <xsl:call-template name=
"gentext.template">
821 <xsl:with-param name=
"context" select=
"'xref'"/>
822 <xsl:with-param name=
"name" select=
"'docname'"/>