2 <!DOCTYPE xsl:stylesheet [
3 <!ENTITY % common.entities SYSTEM "../common/entities.ent">
6 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
7 xmlns:d="http://docbook.org/ns/docbook"
8 xmlns:fo="http://www.w3.org/1999/XSL/Format"
9 xmlns:xlink='http://www.w3.org/1999/xlink'
10 exclude-result-prefixes="xlink d"
13 <!-- ********************************************************************
14 $Id: inline.xsl 8363 2009-03-21 07:46:57Z bobstayton $
15 ********************************************************************
17 This file is part of the XSL DocBook Stylesheet distribution.
18 See ../README or http://docbook.sf.net/release/xsl/current/ for
19 copyright and other information.
21 ******************************************************************** -->
25 <xsl:template name="simple.xlink">
26 <xsl:param name="node" select="."/>
27 <xsl:param name="content">
28 <xsl:apply-templates/>
30 <xsl:param name="linkend" select="$node/@linkend"/>
31 <xsl:param name="xhref" select="$node/@xlink:href"/>
34 <xsl:when test="$xhref
35 and (not($node/@xlink:type) or
36 $node/@xlink:type='simple')">
38 <!-- Is it a local idref? -->
39 <xsl:variable name="is.idref">
41 <!-- if the href starts with # and does not contain an "(" -->
42 <!-- or if the href starts with #xpointer(id(, it's just an ID -->
43 <xsl:when test="starts-with($xhref,'#')
44 and (not(contains($xhref,'('))
45 or starts-with($xhref,
46 '#xpointer(id('))">1</xsl:when>
47 <xsl:otherwise>0</xsl:otherwise>
51 <!-- Is it an olink ? -->
52 <xsl:variable name="is.olink">
54 <!-- If xlink:role="http://docbook.org/xlink/role/olink" -->
55 <!-- and if the href contains # -->
56 <xsl:when test="contains($xhref,'#') and
57 @xlink:role = $xolink.role">1</xsl:when>
58 <xsl:otherwise>0</xsl:otherwise>
63 <xsl:when test="$is.olink = 1">
64 <xsl:call-template name="olink">
65 <xsl:with-param name="content" select="$content"/>
69 <xsl:when test="$is.idref = 1">
71 <xsl:variable name="idref">
72 <xsl:call-template name="xpointer.idref">
73 <xsl:with-param name="xpointer" select="$xhref"/>
77 <xsl:variable name="targets" select="key('id',$idref)"/>
78 <xsl:variable name="target" select="$targets[1]"/>
80 <xsl:call-template name="check.id.unique">
81 <xsl:with-param name="linkend" select="$idref"/>
85 <xsl:when test="count($target) = 0">
87 <xsl:text>XLink to nonexistent id: </xsl:text>
88 <xsl:value-of select="$idref"/>
90 <xsl:copy-of select="$content"/>
94 <fo:basic-link internal-destination="{$idref}">
95 <xsl:copy-of select="$content"/>
101 <!-- otherwise it's a URI -->
103 <fo:basic-link external-destination="url({$xhref})">
104 <xsl:copy-of select="$content"/>
106 <!-- * Call the template for determining whether the URL for this -->
107 <!-- * hyperlink is displayed, and how to display it (either inline or -->
108 <!-- * as a numbered footnote). -->
109 <xsl:call-template name="hyperlink.url.display">
110 <xsl:with-param name="url" select="$xhref"/>
116 <xsl:when test="$linkend">
117 <xsl:variable name="targets" select="key('id',$linkend)"/>
118 <xsl:variable name="target" select="$targets[1]"/>
120 <xsl:call-template name="check.id.unique">
121 <xsl:with-param name="linkend" select="$linkend"/>
125 <xsl:when test="count($target) = 0">
127 <xsl:text>XLink to nonexistent id: </xsl:text>
128 <xsl:value-of select="$linkend"/>
130 <xsl:copy-of select="$content"/>
134 <fo:basic-link internal-destination="{$linkend}">
135 <xsl:copy-of select="$content"/>
142 <xsl:copy-of select="$content"/>
148 <xsl:template name="inline.charseq">
149 <xsl:param name="content">
150 <xsl:call-template name="simple.xlink">
151 <xsl:with-param name="content">
152 <xsl:apply-templates/>
158 <xsl:when test="@dir">
160 <xsl:attribute name="direction">
162 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
163 <xsl:otherwise>rtl</xsl:otherwise>
166 <xsl:copy-of select="$content"/>
170 <xsl:copy-of select="$content"/>
175 <xsl:template name="inline.monoseq">
176 <xsl:param name="content">
177 <xsl:call-template name="simple.xlink">
178 <xsl:with-param name="content">
179 <xsl:apply-templates/>
184 <fo:inline xsl:use-attribute-sets="monospace.properties">
186 <xsl:attribute name="direction">
188 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
189 <xsl:otherwise>rtl</xsl:otherwise>
193 <xsl:copy-of select="$content"/>
197 <xsl:template name="inline.boldseq">
198 <xsl:param name="content">
199 <xsl:call-template name="simple.xlink">
200 <xsl:with-param name="content">
201 <xsl:apply-templates/>
206 <fo:inline font-weight="bold">
208 <xsl:attribute name="direction">
210 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
211 <xsl:otherwise>rtl</xsl:otherwise>
215 <xsl:copy-of select="$content"/>
219 <xsl:template name="inline.italicseq">
220 <xsl:param name="content">
221 <xsl:call-template name="simple.xlink">
222 <xsl:with-param name="content">
223 <xsl:apply-templates/>
228 <fo:inline font-style="italic">
229 <xsl:call-template name="anchor"/>
231 <xsl:attribute name="direction">
233 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
234 <xsl:otherwise>rtl</xsl:otherwise>
238 <xsl:copy-of select="$content"/>
242 <xsl:template name="inline.boldmonoseq">
243 <xsl:param name="content">
244 <xsl:call-template name="simple.xlink">
245 <xsl:with-param name="content">
246 <xsl:apply-templates/>
251 <fo:inline font-weight="bold" xsl:use-attribute-sets="monospace.properties">
252 <xsl:call-template name="anchor"/>
254 <xsl:attribute name="direction">
256 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
257 <xsl:otherwise>rtl</xsl:otherwise>
261 <xsl:copy-of select="$content"/>
265 <xsl:template name="inline.italicmonoseq">
266 <xsl:param name="content">
267 <xsl:call-template name="simple.xlink">
268 <xsl:with-param name="content">
269 <xsl:apply-templates/>
274 <fo:inline font-style="italic" xsl:use-attribute-sets="monospace.properties">
275 <xsl:call-template name="anchor"/>
277 <xsl:attribute name="direction">
279 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
280 <xsl:otherwise>rtl</xsl:otherwise>
284 <xsl:copy-of select="$content"/>
288 <xsl:template name="inline.superscriptseq">
289 <xsl:param name="content">
290 <xsl:call-template name="simple.xlink">
291 <xsl:with-param name="content">
292 <xsl:apply-templates/>
297 <fo:inline xsl:use-attribute-sets="superscript.properties">
298 <xsl:call-template name="anchor"/>
300 <xsl:attribute name="direction">
302 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
303 <xsl:otherwise>rtl</xsl:otherwise>
308 <xsl:when test="$fop.extensions != 0">
309 <xsl:attribute name="vertical-align">super</xsl:attribute>
312 <xsl:attribute name="baseline-shift">super</xsl:attribute>
315 <xsl:copy-of select="$content"/>
319 <xsl:template name="inline.subscriptseq">
320 <xsl:param name="content">
321 <xsl:call-template name="simple.xlink">
322 <xsl:with-param name="content">
323 <xsl:apply-templates/>
328 <fo:inline xsl:use-attribute-sets="subscript.properties">
329 <xsl:call-template name="anchor"/>
331 <xsl:attribute name="direction">
333 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
334 <xsl:otherwise>rtl</xsl:otherwise>
339 <xsl:when test="$fop.extensions != 0">
340 <xsl:attribute name="vertical-align">sub</xsl:attribute>
343 <xsl:attribute name="baseline-shift">sub</xsl:attribute>
346 <xsl:copy-of select="$content"/>
350 <!-- ==================================================================== -->
351 <!-- some special cases -->
353 <xsl:template match="d:author">
354 <xsl:call-template name="simple.xlink">
355 <xsl:with-param name="content">
356 <xsl:call-template name="person.name"/>
361 <xsl:template match="d:editor">
362 <xsl:call-template name="simple.xlink">
363 <xsl:with-param name="content">
364 <xsl:call-template name="person.name"/>
369 <xsl:template match="d:othercredit">
370 <xsl:call-template name="simple.xlink">
371 <xsl:with-param name="content">
372 <xsl:call-template name="person.name"/>
377 <xsl:template match="d:authorinitials">
378 <xsl:call-template name="inline.charseq"/>
381 <!-- ==================================================================== -->
383 <xsl:template match="d:accel">
384 <xsl:call-template name="inline.charseq"/>
387 <xsl:template match="d:action">
388 <xsl:call-template name="inline.charseq"/>
391 <xsl:template match="d:application">
392 <xsl:call-template name="inline.charseq"/>
395 <xsl:template match="d:classname">
396 <xsl:call-template name="inline.monoseq"/>
399 <xsl:template match="d:exceptionname">
400 <xsl:call-template name="inline.monoseq"/>
403 <xsl:template match="d:interfacename">
404 <xsl:call-template name="inline.monoseq"/>
407 <xsl:template match="d:methodname">
408 <xsl:call-template name="inline.monoseq"/>
411 <xsl:template match="d:command">
412 <xsl:call-template name="inline.boldseq"/>
415 <xsl:template match="d:computeroutput">
416 <xsl:call-template name="inline.monoseq"/>
419 <xsl:template match="d:constant">
420 <xsl:call-template name="inline.monoseq"/>
423 <xsl:template match="d:database">
424 <xsl:call-template name="inline.charseq"/>
427 <xsl:template match="d:date">
428 <!-- should this support locale-specific formatting? how? -->
429 <xsl:call-template name="inline.charseq"/>
432 <xsl:template match="d:errorcode">
433 <xsl:call-template name="inline.charseq"/>
436 <xsl:template match="d:errorname">
437 <xsl:call-template name="inline.charseq"/>
440 <xsl:template match="d:errortype">
441 <xsl:call-template name="inline.charseq"/>
444 <xsl:template match="d:errortext">
445 <xsl:call-template name="inline.charseq"/>
448 <xsl:template match="d:envar">
449 <xsl:call-template name="inline.monoseq"/>
452 <xsl:template match="d:filename">
453 <xsl:call-template name="inline.monoseq"/>
456 <xsl:template match="d:function">
458 <xsl:when test="$function.parens != '0'
459 and (d:parameter or d:function or d:replaceable)">
460 <xsl:variable name="nodes" select="text()|*"/>
461 <xsl:call-template name="inline.monoseq">
462 <xsl:with-param name="content">
463 <xsl:call-template name="simple.xlink">
464 <xsl:with-param name="content">
465 <xsl:apply-templates select="$nodes[1]"/>
470 <xsl:text>(</xsl:text>
471 <xsl:apply-templates select="$nodes[position()>1]"/>
472 <xsl:text>)</xsl:text>
475 <xsl:call-template name="inline.monoseq"/>
480 <xsl:template match="d:function/d:parameter" priority="2">
481 <xsl:call-template name="inline.italicmonoseq"/>
482 <xsl:if test="following-sibling::*">
483 <xsl:text>, </xsl:text>
487 <xsl:template match="d:function/d:replaceable" priority="2">
488 <xsl:call-template name="inline.italicmonoseq"/>
489 <xsl:if test="following-sibling::*">
490 <xsl:text>, </xsl:text>
494 <xsl:template match="d:guibutton">
495 <xsl:call-template name="inline.charseq"/>
498 <xsl:template match="d:guiicon">
499 <xsl:call-template name="inline.charseq"/>
502 <xsl:template match="d:guilabel">
503 <xsl:call-template name="inline.charseq"/>
506 <xsl:template match="d:guimenu">
507 <xsl:call-template name="inline.italicseq"/>
510 <xsl:template match="d:guimenuitem">
511 <xsl:call-template name="inline.italicseq"/>
514 <xsl:template match="d:guisubmenu">
515 <xsl:call-template name="inline.italicseq"/>
518 <xsl:template match="d:hardware">
519 <xsl:call-template name="inline.charseq"/>
522 <xsl:template match="d:interface">
523 <xsl:call-template name="inline.charseq"/>
526 <xsl:template match="d:interfacedefinition">
527 <xsl:call-template name="inline.charseq"/>
530 <xsl:template match="d:keycap">
531 <xsl:call-template name="inline.boldseq"/>
534 <xsl:template match="d:keycode">
535 <xsl:call-template name="inline.charseq"/>
538 <xsl:template match="d:keysym">
539 <xsl:call-template name="inline.charseq"/>
542 <xsl:template match="d:literal">
543 <xsl:call-template name="inline.monoseq"/>
546 <xsl:template match="d:code">
547 <xsl:call-template name="inline.monoseq"/>
550 <xsl:template match="d:medialabel">
551 <xsl:call-template name="inline.italicseq"/>
554 <xsl:template match="d:shortcut">
555 <xsl:call-template name="inline.boldseq"/>
558 <xsl:template match="d:mousebutton">
559 <xsl:call-template name="inline.charseq"/>
562 <xsl:template match="d:option">
563 <xsl:call-template name="inline.monoseq"/>
566 <xsl:template match="d:package">
567 <xsl:call-template name="inline.charseq"/>
570 <xsl:template match="d:parameter">
571 <xsl:call-template name="inline.italicmonoseq"/>
574 <xsl:template match="d:property">
575 <xsl:call-template name="inline.charseq"/>
578 <xsl:template match="d:prompt">
579 <xsl:call-template name="inline.monoseq"/>
582 <xsl:template match="d:replaceable">
583 <xsl:call-template name="inline.italicmonoseq"/>
586 <xsl:template match="d:returnvalue">
587 <xsl:call-template name="inline.charseq"/>
590 <xsl:template match="d:structfield">
591 <xsl:call-template name="inline.italicmonoseq"/>
594 <xsl:template match="d:structname">
595 <xsl:call-template name="inline.charseq"/>
598 <xsl:template match="d:symbol">
599 <xsl:call-template name="inline.charseq"/>
602 <xsl:template match="d:systemitem">
603 <xsl:call-template name="inline.monoseq"/>
606 <xsl:template match="d:token">
607 <xsl:call-template name="inline.charseq"/>
610 <xsl:template match="d:type">
611 <xsl:call-template name="inline.charseq"/>
614 <xsl:template match="d:userinput">
615 <xsl:call-template name="inline.boldmonoseq"/>
618 <xsl:template match="d:abbrev">
619 <xsl:call-template name="inline.charseq"/>
622 <xsl:template match="d:acronym">
623 <xsl:call-template name="inline.charseq"/>
626 <xsl:template match="d:citerefentry">
627 <xsl:call-template name="inline.charseq"/>
630 <xsl:template match="d:citetitle">
632 <xsl:when test="@pubwork = 'article'">
633 <xsl:call-template name="gentext.startquote"/>
634 <xsl:call-template name="inline.charseq"/>
635 <xsl:call-template name="gentext.endquote"/>
638 <xsl:call-template name="inline.italicseq"/>
643 <xsl:template match="d:emphasis">
644 <xsl:variable name="depth">
645 <xsl:call-template name="dot.count">
646 <xsl:with-param name="string">
647 <xsl:number level="multiple"/>
653 <xsl:when test="@role='bold' or @role='strong'">
654 <xsl:call-template name="inline.boldseq"/>
656 <xsl:when test="@role='underline'">
657 <fo:inline text-decoration="underline">
658 <xsl:call-template name="inline.charseq"/>
661 <xsl:when test="@role='strikethrough'">
662 <fo:inline text-decoration="line-through">
663 <xsl:call-template name="inline.charseq"/>
668 <xsl:when test="$depth mod 2 = 1">
669 <fo:inline font-style="normal">
670 <xsl:apply-templates/>
674 <xsl:call-template name="inline.italicseq"/>
681 <xsl:template match="d:foreignphrase">
682 <xsl:call-template name="inline.italicseq"/>
685 <xsl:template match="d:markup">
686 <xsl:call-template name="inline.charseq"/>
689 <xsl:template match="d:phrase">
691 <xsl:call-template name="anchor"/>
692 <xsl:call-template name="inline.charseq"/>
696 <xsl:template match="d:quote">
697 <xsl:variable name="depth">
698 <xsl:call-template name="dot.count">
699 <xsl:with-param name="string"><xsl:number level="multiple"/></xsl:with-param>
702 <xsl:variable name="content">
704 <xsl:when test="$depth mod 2 = 0">
705 <xsl:call-template name="gentext.startquote"/>
706 <xsl:call-template name="inline.charseq"/>
707 <xsl:call-template name="gentext.endquote"/>
710 <xsl:call-template name="gentext.nestedstartquote"/>
711 <xsl:call-template name="inline.charseq"/>
712 <xsl:call-template name="gentext.nestedendquote"/>
718 <xsl:call-template name="anchor"/>
719 <xsl:copy-of select="$content"/>
724 <xsl:template match="d:varname">
725 <xsl:call-template name="inline.monoseq"/>
728 <xsl:template match="d:wordasword">
729 <xsl:call-template name="inline.italicseq"/>
732 <xsl:template match="d:lineannotation">
733 <fo:inline font-style="italic">
734 <xsl:call-template name="inline.charseq"/>
738 <xsl:template match="d:superscript">
739 <xsl:call-template name="inline.superscriptseq"/>
742 <xsl:template match="d:subscript">
743 <xsl:call-template name="inline.subscriptseq"/>
746 <xsl:template match="d:trademark">
747 <xsl:call-template name="inline.charseq"/>
749 <xsl:when test="@class = 'copyright'
750 or @class = 'registered'">
751 <xsl:call-template name="dingbat">
752 <xsl:with-param name="dingbat" select="@class"/>
755 <xsl:when test="@class = 'service'">
756 <xsl:call-template name="inline.superscriptseq">
757 <xsl:with-param name="content" select="'SM'"/>
761 <xsl:call-template name="dingbat">
762 <xsl:with-param name="dingbat" select="'trademark'"/>
768 <xsl:template match="d:firstterm">
769 <xsl:call-template name="glossterm">
770 <xsl:with-param name="firstterm" select="1"/>
774 <xsl:template match="d:glossterm" name="glossterm">
775 <xsl:param name="firstterm" select="0"/>
778 <xsl:when test="($firstterm.only.link = 0 or $firstterm = 1) and @linkend">
779 <xsl:variable name="targets" select="key('id',@linkend)"/>
780 <xsl:variable name="target" select="$targets[1]"/>
783 <xsl:when test="$target">
784 <fo:basic-link internal-destination="{@linkend}"
785 xsl:use-attribute-sets="xref.properties">
786 <xsl:call-template name="inline.italicseq"/>
790 <xsl:call-template name="inline.italicseq"/>
795 <xsl:when test="not(@linkend)
796 and ($firstterm.only.link = 0 or $firstterm = 1)
797 and ($glossterm.auto.link != 0)
798 and $glossary.collection != ''">
799 <xsl:variable name="term">
801 <xsl:when test="@baseform"><xsl:value-of select="@baseform"/></xsl:when>
802 <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
805 <xsl:variable name="cterm"
806 select="(document($glossary.collection,.)//d:glossentry[d:glossterm=$term])[1]"/>
809 <xsl:when test="not($cterm)">
811 <xsl:text>There's no entry for </xsl:text>
812 <xsl:value-of select="$term"/>
813 <xsl:text> in </xsl:text>
814 <xsl:value-of select="$glossary.collection"/>
816 <xsl:call-template name="inline.italicseq"/>
819 <xsl:variable name="id">
820 <xsl:call-template name="object.id">
821 <xsl:with-param name="object" select="$cterm"/>
824 <fo:basic-link internal-destination="{$id}"
825 xsl:use-attribute-sets="xref.properties">
826 <xsl:call-template name="inline.italicseq"/>
832 <xsl:when test="not(@linkend)
833 and ($firstterm.only.link = 0 or $firstterm = 1)
834 and $glossterm.auto.link != 0">
835 <xsl:variable name="term">
837 <xsl:when test="@baseform">
838 <xsl:value-of select="normalize-space(@baseform)"/>
841 <xsl:value-of select="normalize-space(.)"/>
846 <xsl:variable name="targets"
847 select="//d:glossentry[normalize-space(d:glossterm)=$term
848 or normalize-space(d:glossterm/@baseform)=$term]"/>
850 <xsl:variable name="target" select="$targets[1]"/>
853 <xsl:when test="count($targets)=0">
855 <xsl:text>Error: no glossentry for glossterm: </xsl:text>
856 <xsl:value-of select="."/>
857 <xsl:text>.</xsl:text>
859 <xsl:call-template name="inline.italicseq"/>
862 <xsl:variable name="termid">
863 <xsl:call-template name="object.id">
864 <xsl:with-param name="object" select="$target"/>
868 <fo:basic-link internal-destination="{$termid}"
869 xsl:use-attribute-sets="xref.properties">
870 <xsl:call-template name="inline.charseq"/>
876 <xsl:call-template name="inline.italicseq"/>
881 <xsl:template match="d:termdef">
883 <xsl:call-template name="gentext.template">
884 <xsl:with-param name="context" select="'termdef'"/>
885 <xsl:with-param name="name" select="'prefix'"/>
887 <xsl:apply-templates/>
888 <xsl:call-template name="gentext.template">
889 <xsl:with-param name="context" select="'termdef'"/>
890 <xsl:with-param name="name" select="'suffix'"/>
895 <xsl:template match="d:sgmltag|d:tag">
896 <xsl:variable name="class">
898 <xsl:when test="@class">
899 <xsl:value-of select="@class"/>
901 <xsl:otherwise>element</xsl:otherwise>
906 <xsl:when test="$class='attribute'">
907 <xsl:call-template name="inline.monoseq"/>
909 <xsl:when test="$class='attvalue'">
910 <xsl:call-template name="inline.monoseq"/>
912 <xsl:when test="$class='element'">
913 <xsl:call-template name="inline.monoseq"/>
915 <xsl:when test="$class='endtag'">
916 <xsl:call-template name="inline.monoseq">
917 <xsl:with-param name="content">
918 <xsl:text></</xsl:text>
919 <xsl:apply-templates/>
920 <xsl:text>></xsl:text>
924 <xsl:when test="$class='genentity'">
925 <xsl:call-template name="inline.monoseq">
926 <xsl:with-param name="content">
927 <xsl:text>&</xsl:text>
928 <xsl:apply-templates/>
929 <xsl:text>;</xsl:text>
933 <xsl:when test="$class='numcharref'">
934 <xsl:call-template name="inline.monoseq">
935 <xsl:with-param name="content">
936 <xsl:text>&#</xsl:text>
937 <xsl:apply-templates/>
938 <xsl:text>;</xsl:text>
942 <xsl:when test="$class='paramentity'">
943 <xsl:call-template name="inline.monoseq">
944 <xsl:with-param name="content">
945 <xsl:text>%</xsl:text>
946 <xsl:apply-templates/>
947 <xsl:text>;</xsl:text>
951 <xsl:when test="$class='pi'">
952 <xsl:call-template name="inline.monoseq">
953 <xsl:with-param name="content">
954 <xsl:text><?</xsl:text>
955 <xsl:apply-templates/>
956 <xsl:text>></xsl:text>
960 <xsl:when test="$class='xmlpi'">
961 <xsl:call-template name="inline.monoseq">
962 <xsl:with-param name="content">
963 <xsl:text><?</xsl:text>
964 <xsl:apply-templates/>
965 <xsl:text>?></xsl:text>
969 <xsl:when test="$class='starttag'">
970 <xsl:call-template name="inline.monoseq">
971 <xsl:with-param name="content">
972 <xsl:text><</xsl:text>
973 <xsl:apply-templates/>
974 <xsl:text>></xsl:text>
978 <xsl:when test="$class='emptytag'">
979 <xsl:call-template name="inline.monoseq">
980 <xsl:with-param name="content">
981 <xsl:text><</xsl:text>
982 <xsl:apply-templates/>
983 <xsl:text>/></xsl:text>
987 <xsl:when test="$class='sgmlcomment' or $class='comment'">
988 <xsl:call-template name="inline.monoseq">
989 <xsl:with-param name="content">
990 <xsl:text><!--</xsl:text>
991 <xsl:apply-templates/>
992 <xsl:text>--></xsl:text>
997 <xsl:call-template name="inline.charseq"/>
1002 <xsl:template match="d:email">
1003 <xsl:call-template name="inline.monoseq">
1004 <xsl:with-param name="content">
1005 <fo:inline keep-together.within-line="always" hyphenate="false">
1006 <xsl:if test="not($email.delimiters.enabled = 0)">
1007 <xsl:text><</xsl:text>
1010 <xsl:when test="not($email.mailto.enabled = 0)">
1011 <fo:basic-link xsl:use-attribute-sets="xref.properties"
1012 keep-together.within-line="always" hyphenate="false">
1013 <xsl:attribute name="external-destination">
1014 mailto:<xsl:value-of select="string(.)" />
1016 <xsl:apply-templates/>
1020 <xsl:apply-templates/>
1023 <xsl:if test="not($email.delimiters.enabled = 0)">
1024 <xsl:text>></xsl:text>
1028 </xsl:call-template>
1031 <xsl:template match="d:keycombo">
1032 <xsl:variable name="action" select="@action"/>
1033 <xsl:variable name="joinchar">
1035 <xsl:when test="$action='seq'"><xsl:text> </xsl:text></xsl:when>
1036 <xsl:when test="$action='simul'">+</xsl:when>
1037 <xsl:when test="$action='press'">-</xsl:when>
1038 <xsl:when test="$action='click'">-</xsl:when>
1039 <xsl:when test="$action='double-click'">-</xsl:when>
1040 <xsl:when test="$action='other'"></xsl:when>
1041 <xsl:otherwise>+</xsl:otherwise>
1044 <xsl:for-each select="*">
1045 <xsl:if test="position()>1"><xsl:value-of select="$joinchar"/></xsl:if>
1046 <xsl:apply-templates select="."/>
1050 <xsl:template match="d:uri">
1051 <xsl:call-template name="inline.monoseq"/>
1054 <!-- ==================================================================== -->
1056 <xsl:template match="d:menuchoice">
1057 <xsl:variable name="shortcut" select="./d:shortcut"/>
1058 <xsl:call-template name="process.menuchoice"/>
1059 <xsl:if test="$shortcut">
1060 <xsl:text> (</xsl:text>
1061 <xsl:apply-templates select="$shortcut"/>
1062 <xsl:text>)</xsl:text>
1066 <xsl:template name="process.menuchoice">
1067 <xsl:param name="nodelist" select="d:guibutton|d:guiicon|d:guilabel|d:guimenu|d:guimenuitem|d:guisubmenu|d:interface"/><!-- not(shortcut) -->
1068 <xsl:param name="count" select="1"/>
1070 <xsl:variable name="mm.separator">
1072 <xsl:when test="($fop.extensions != 0 or $fop1.extensions != 0 ) and
1073 contains($menuchoice.menu.separator, '→')">
1074 <fo:inline font-family="Symbol">
1075 <xsl:copy-of select="$menuchoice.menu.separator"/>
1079 <xsl:copy-of select="$menuchoice.menu.separator"/>
1085 <xsl:when test="$count>count($nodelist)"></xsl:when>
1086 <xsl:when test="$count=1">
1087 <xsl:apply-templates select="$nodelist[$count=position()]"/>
1088 <xsl:call-template name="process.menuchoice">
1089 <xsl:with-param name="nodelist" select="$nodelist"/>
1090 <xsl:with-param name="count" select="$count+1"/>
1091 </xsl:call-template>
1094 <xsl:variable name="node" select="$nodelist[$count=position()]"/>
1096 <xsl:when test="local-name($node)='guimenuitem'
1097 or local-name($node)='guisubmenu'">
1098 <xsl:copy-of select="$mm.separator"/>
1101 <xsl:copy-of select="$menuchoice.separator"/>
1104 <xsl:apply-templates select="$node"/>
1105 <xsl:call-template name="process.menuchoice">
1106 <xsl:with-param name="nodelist" select="$nodelist"/>
1107 <xsl:with-param name="count" select="$count+1"/>
1108 </xsl:call-template>
1113 <!-- ==================================================================== -->
1115 <xsl:template match="d:optional">
1116 <xsl:value-of select="$arg.choice.opt.open.str"/>
1117 <xsl:call-template name="inline.charseq"/>
1118 <xsl:value-of select="$arg.choice.opt.close.str"/>
1121 <xsl:template match="d:citation">
1122 <!-- todo: integrate with bibliography collection -->
1123 <xsl:variable name="targets" select="(//d:biblioentry | //d:bibliomixed)[d:abbrev = string(current())]"/>
1124 <xsl:variable name="target" select="$targets[1]"/>
1127 <!-- try automatic linking based on match to abbrev -->
1128 <xsl:when test="$target and not(d:xref) and not(d:link)">
1130 <xsl:text>[</xsl:text>
1132 <xsl:attribute name="internal-destination">
1133 <xsl:call-template name="object.id">
1134 <xsl:with-param name="object" select="$target"/>
1135 </xsl:call-template>
1139 <xsl:when test="$bibliography.numbered != 0">
1140 <xsl:apply-templates select="$target" mode="citation"/>
1143 <xsl:call-template name="inline.charseq"/>
1148 <xsl:text>]</xsl:text>
1152 <xsl:text>[</xsl:text>
1153 <xsl:call-template name="inline.charseq"/>
1154 <xsl:text>]</xsl:text>
1159 <xsl:template match="d:citebiblioid">
1160 <xsl:variable name="targets" select="//*[d:biblioid = string(current())]"/>
1161 <xsl:variable name="target" select="$targets[1]"/>
1164 <!-- try automatic linking based on match to parent of biblioid -->
1165 <xsl:when test="$target and not(d:xref) and not(d:link)">
1167 <xsl:text>[</xsl:text>
1169 <xsl:attribute name="internal-destination">
1170 <xsl:call-template name="object.id">
1171 <xsl:with-param name="object" select="$target"/>
1172 </xsl:call-template>
1175 <xsl:call-template name="inline.charseq"/>
1178 <xsl:text>]</xsl:text>
1182 <xsl:text>[</xsl:text>
1183 <xsl:call-template name="inline.charseq"/>
1184 <xsl:text>]</xsl:text>
1189 <xsl:template match="d:biblioentry|d:bibliomixed" mode="citation">
1190 <xsl:number from="d:bibliography" count="d:biblioentry|d:bibliomixed"
1191 level="any" format="1"/>
1194 <!-- ==================================================================== -->
1196 <xsl:template match="d:comment[&comment.block.parents;]|d:remark[&comment.block.parents;]">
1197 <xsl:if test="$show.comments != 0">
1198 <fo:block font-style="italic">
1199 <xsl:call-template name="inline.charseq"/>
1204 <xsl:template match="d:comment|d:remark">
1205 <xsl:if test="$show.comments != 0">
1206 <fo:inline font-style="italic">
1207 <xsl:call-template name="inline.charseq"/>
1212 <!-- ==================================================================== -->
1214 <xsl:template match="d:productname">
1215 <xsl:call-template name="inline.charseq"/>
1216 <xsl:if test="@class">
1217 <xsl:call-template name="dingbat">
1218 <xsl:with-param name="dingbat" select="@class"/>
1219 </xsl:call-template>
1223 <xsl:template match="d:productnumber">
1224 <xsl:call-template name="inline.charseq"/>
1227 <!-- ==================================================================== -->
1229 <xsl:template match="d:pob|d:street|d:city|d:state|d:postcode|d:country|d:otheraddr">
1230 <xsl:call-template name="inline.charseq"/>
1233 <xsl:template match="d:phone|d:fax">
1234 <xsl:call-template name="inline.charseq"/>
1237 <!-- in Addresses, for example -->
1238 <xsl:template match="d:honorific|d:firstname|d:surname|d:lineage|d:othername">
1239 <xsl:call-template name="inline.charseq"/>
1242 <!-- ==================================================================== -->
1244 <xsl:template match="d:person">
1245 <xsl:apply-templates select="d:personname"/>
1248 <xsl:template match="d:personname">
1249 <xsl:call-template name="simple.xlink">
1250 <xsl:with-param name="content">
1251 <xsl:call-template name="person.name"/>
1253 </xsl:call-template>
1256 <xsl:template match="d:jobtitle">
1257 <xsl:call-template name="simple.xlink">
1258 <xsl:with-param name="content">
1259 <xsl:apply-templates/>
1261 </xsl:call-template>
1264 <!-- ==================================================================== -->
1266 <xsl:template match="d:org">
1267 <xsl:call-template name="inline.charseq"/>
1270 <xsl:template match="d:orgname">
1271 <xsl:call-template name="inline.charseq"/>
1274 <xsl:template match="d:orgdiv">
1275 <xsl:call-template name="inline.charseq"/>
1278 <xsl:template match="d:affiliation">
1279 <xsl:call-template name="inline.charseq"/>
1282 <!-- ==================================================================== -->
1284 <xsl:template match="d:beginpage">
1285 <!-- does nothing; this *is not* markup to force a page break. -->