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:fo="http://www.w3.org/1999/XSL/Format"
8 xmlns:xlink='http://www.w3.org/1999/xlink'
9 exclude-result-prefixes="xlink"
12 <!-- ********************************************************************
13 $Id: inline.xsl 8811 2010-08-09 20:24:45Z mzjn $
14 ********************************************************************
16 This file is part of the XSL DocBook Stylesheet distribution.
17 See ../README or http://docbook.sf.net/release/xsl/current/ for
18 copyright and other information.
20 ******************************************************************** -->
22 <xsl:key name="glossentries" match="glossentry" use="normalize-space(glossterm)"/>
23 <xsl:key name="glossentries" match="glossentry" use="normalize-space(glossterm/@baseform)"/>
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">
185 <xsl:call-template name="anchor"/>
187 <xsl:attribute name="direction">
189 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
190 <xsl:otherwise>rtl</xsl:otherwise>
194 <xsl:copy-of select="$content"/>
198 <xsl:template name="inline.boldseq">
199 <xsl:param name="content">
200 <xsl:call-template name="simple.xlink">
201 <xsl:with-param name="content">
202 <xsl:apply-templates/>
207 <fo:inline font-weight="bold">
209 <xsl:attribute name="direction">
211 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
212 <xsl:otherwise>rtl</xsl:otherwise>
216 <xsl:copy-of select="$content"/>
220 <xsl:template name="inline.italicseq">
221 <xsl:param name="content">
222 <xsl:call-template name="simple.xlink">
223 <xsl:with-param name="content">
224 <xsl:apply-templates/>
229 <fo:inline font-style="italic">
230 <xsl:call-template name="anchor"/>
232 <xsl:attribute name="direction">
234 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
235 <xsl:otherwise>rtl</xsl:otherwise>
239 <xsl:copy-of select="$content"/>
243 <xsl:template name="inline.boldmonoseq">
244 <xsl:param name="content">
245 <xsl:call-template name="simple.xlink">
246 <xsl:with-param name="content">
247 <xsl:apply-templates/>
252 <fo:inline font-weight="bold" xsl:use-attribute-sets="monospace.properties">
253 <xsl:call-template name="anchor"/>
255 <xsl:attribute name="direction">
257 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
258 <xsl:otherwise>rtl</xsl:otherwise>
262 <xsl:copy-of select="$content"/>
266 <xsl:template name="inline.italicmonoseq">
267 <xsl:param name="content">
268 <xsl:call-template name="simple.xlink">
269 <xsl:with-param name="content">
270 <xsl:apply-templates/>
275 <fo:inline font-style="italic" xsl:use-attribute-sets="monospace.properties">
276 <xsl:call-template name="anchor"/>
278 <xsl:attribute name="direction">
280 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
281 <xsl:otherwise>rtl</xsl:otherwise>
285 <xsl:copy-of select="$content"/>
289 <xsl:template name="inline.superscriptseq">
290 <xsl:param name="content">
291 <xsl:call-template name="simple.xlink">
292 <xsl:with-param name="content">
293 <xsl:apply-templates/>
298 <fo:inline xsl:use-attribute-sets="superscript.properties">
299 <xsl:call-template name="anchor"/>
301 <xsl:attribute name="direction">
303 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
304 <xsl:otherwise>rtl</xsl:otherwise>
309 <xsl:when test="$fop.extensions != 0">
310 <xsl:attribute name="vertical-align">super</xsl:attribute>
313 <xsl:attribute name="baseline-shift">super</xsl:attribute>
316 <xsl:copy-of select="$content"/>
320 <xsl:template name="inline.subscriptseq">
321 <xsl:param name="content">
322 <xsl:call-template name="simple.xlink">
323 <xsl:with-param name="content">
324 <xsl:apply-templates/>
329 <fo:inline xsl:use-attribute-sets="subscript.properties">
330 <xsl:call-template name="anchor"/>
332 <xsl:attribute name="direction">
334 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
335 <xsl:otherwise>rtl</xsl:otherwise>
340 <xsl:when test="$fop.extensions != 0">
341 <xsl:attribute name="vertical-align">sub</xsl:attribute>
344 <xsl:attribute name="baseline-shift">sub</xsl:attribute>
347 <xsl:copy-of select="$content"/>
351 <!-- ==================================================================== -->
352 <!-- some special cases -->
354 <xsl:template match="author">
355 <xsl:call-template name="simple.xlink">
356 <xsl:with-param name="content">
357 <xsl:call-template name="person.name"/>
362 <xsl:template match="editor">
363 <xsl:call-template name="simple.xlink">
364 <xsl:with-param name="content">
365 <xsl:call-template name="person.name"/>
370 <xsl:template match="othercredit">
371 <xsl:call-template name="simple.xlink">
372 <xsl:with-param name="content">
373 <xsl:call-template name="person.name"/>
378 <xsl:template match="authorinitials">
379 <xsl:call-template name="inline.charseq"/>
382 <!-- ==================================================================== -->
384 <xsl:template match="accel">
385 <xsl:call-template name="inline.charseq"/>
388 <xsl:template match="action">
389 <xsl:call-template name="inline.charseq"/>
392 <xsl:template match="application">
393 <xsl:call-template name="inline.charseq"/>
396 <xsl:template match="classname">
397 <xsl:call-template name="inline.monoseq"/>
400 <xsl:template match="exceptionname">
401 <xsl:call-template name="inline.monoseq"/>
404 <xsl:template match="interfacename">
405 <xsl:call-template name="inline.monoseq"/>
408 <xsl:template match="methodname">
409 <xsl:call-template name="inline.monoseq"/>
412 <xsl:template match="command">
413 <xsl:call-template name="inline.boldseq"/>
416 <xsl:template match="computeroutput">
417 <xsl:call-template name="inline.monoseq"/>
420 <xsl:template match="constant">
421 <xsl:call-template name="inline.monoseq"/>
424 <xsl:template match="database">
425 <xsl:call-template name="inline.charseq"/>
428 <xsl:template match="date">
429 <!-- should this support locale-specific formatting? how? -->
430 <xsl:call-template name="inline.charseq"/>
433 <xsl:template match="errorcode">
434 <xsl:call-template name="inline.charseq"/>
437 <xsl:template match="errorname">
438 <xsl:call-template name="inline.charseq"/>
441 <xsl:template match="errortype">
442 <xsl:call-template name="inline.charseq"/>
445 <xsl:template match="errortext">
446 <xsl:call-template name="inline.charseq"/>
449 <xsl:template match="envar">
450 <xsl:call-template name="inline.monoseq"/>
453 <xsl:template match="filename">
454 <xsl:call-template name="inline.monoseq"/>
457 <xsl:template match="function">
459 <xsl:when test="$function.parens != '0'
460 and (parameter or function or replaceable)">
461 <xsl:variable name="nodes" select="text()|*"/>
462 <xsl:call-template name="inline.monoseq">
463 <xsl:with-param name="content">
464 <xsl:call-template name="simple.xlink">
465 <xsl:with-param name="content">
466 <xsl:apply-templates select="$nodes[1]"/>
471 <xsl:text>(</xsl:text>
472 <xsl:apply-templates select="$nodes[position()>1]"/>
473 <xsl:text>)</xsl:text>
476 <xsl:call-template name="inline.monoseq"/>
481 <xsl:template match="function/parameter" priority="2">
482 <xsl:call-template name="inline.italicmonoseq"/>
483 <xsl:if test="following-sibling::*">
484 <xsl:text>, </xsl:text>
488 <xsl:template match="function/replaceable" priority="2">
489 <xsl:call-template name="inline.italicmonoseq"/>
490 <xsl:if test="following-sibling::*">
491 <xsl:text>, </xsl:text>
495 <xsl:template match="guibutton">
496 <xsl:call-template name="inline.charseq"/>
499 <xsl:template match="guiicon">
500 <xsl:call-template name="inline.charseq"/>
503 <xsl:template match="guilabel">
504 <xsl:call-template name="inline.charseq"/>
507 <xsl:template match="guimenu">
508 <xsl:call-template name="inline.charseq"/>
511 <xsl:template match="guimenuitem">
512 <xsl:call-template name="inline.charseq"/>
515 <xsl:template match="guisubmenu">
516 <xsl:call-template name="inline.charseq"/>
519 <xsl:template match="hardware">
520 <xsl:call-template name="inline.charseq"/>
523 <xsl:template match="interface">
524 <xsl:call-template name="inline.charseq"/>
527 <xsl:template match="interfacedefinition">
528 <xsl:call-template name="inline.charseq"/>
531 <xsl:template match="keycap">
532 <xsl:call-template name="inline.boldseq"/>
535 <xsl:template match="keycode">
536 <xsl:call-template name="inline.charseq"/>
539 <xsl:template match="keysym">
540 <xsl:call-template name="inline.charseq"/>
543 <xsl:template match="literal">
544 <xsl:call-template name="inline.monoseq"/>
547 <xsl:template match="code">
548 <xsl:call-template name="inline.monoseq"/>
551 <xsl:template match="medialabel">
552 <xsl:call-template name="inline.italicseq"/>
555 <xsl:template match="shortcut">
556 <xsl:call-template name="inline.boldseq"/>
559 <xsl:template match="mousebutton">
560 <xsl:call-template name="inline.charseq"/>
563 <xsl:template match="option">
564 <xsl:call-template name="inline.monoseq"/>
567 <xsl:template match="package">
568 <xsl:call-template name="inline.charseq"/>
571 <xsl:template match="parameter">
572 <xsl:call-template name="inline.italicmonoseq"/>
575 <xsl:template match="property">
576 <xsl:call-template name="inline.charseq"/>
579 <xsl:template match="prompt">
580 <xsl:call-template name="inline.monoseq"/>
583 <xsl:template match="replaceable">
584 <xsl:call-template name="inline.italicmonoseq"/>
587 <xsl:template match="returnvalue">
588 <xsl:call-template name="inline.charseq"/>
591 <xsl:template match="structfield">
592 <xsl:call-template name="inline.italicmonoseq"/>
595 <xsl:template match="structname">
596 <xsl:call-template name="inline.charseq"/>
599 <xsl:template match="symbol">
600 <xsl:call-template name="inline.charseq"/>
603 <xsl:template match="systemitem">
604 <xsl:call-template name="inline.monoseq"/>
607 <xsl:template match="token">
608 <xsl:call-template name="inline.charseq"/>
611 <xsl:template match="type">
612 <xsl:call-template name="inline.charseq"/>
615 <xsl:template match="userinput">
616 <xsl:call-template name="inline.boldmonoseq"/>
619 <xsl:template match="abbrev">
620 <xsl:call-template name="inline.charseq"/>
623 <xsl:template match="acronym">
624 <xsl:call-template name="inline.charseq"/>
627 <xsl:template match="citerefentry">
628 <xsl:call-template name="inline.charseq"/>
631 <xsl:template match="citetitle">
633 <xsl:when test="@pubwork = 'article'">
634 <xsl:call-template name="gentext.startquote"/>
635 <xsl:call-template name="inline.charseq"/>
636 <xsl:call-template name="gentext.endquote"/>
639 <xsl:call-template name="inline.italicseq"/>
644 <xsl:template match="emphasis">
645 <xsl:variable name="depth">
646 <xsl:call-template name="dot.count">
647 <xsl:with-param name="string">
648 <xsl:number level="multiple"/>
654 <xsl:when test="@role='bold' or @role='strong'">
655 <xsl:call-template name="inline.boldseq"/>
657 <xsl:when test="@role='underline'">
658 <fo:inline text-decoration="underline">
659 <xsl:call-template name="inline.charseq"/>
662 <xsl:when test="@role='strikethrough'">
663 <fo:inline text-decoration="line-through">
664 <xsl:call-template name="inline.charseq"/>
669 <xsl:when test="$depth mod 2 = 1">
670 <fo:inline font-style="normal">
671 <xsl:apply-templates/>
675 <xsl:call-template name="inline.italicseq"/>
682 <xsl:template match="foreignphrase">
683 <xsl:call-template name="inline.italicseq"/>
686 <xsl:template match="markup">
687 <xsl:call-template name="inline.charseq"/>
690 <xsl:template match="phrase">
692 <xsl:call-template name="anchor"/>
693 <xsl:call-template name="inline.charseq"/>
697 <xsl:template match="quote">
698 <xsl:variable name="depth">
699 <xsl:call-template name="dot.count">
700 <xsl:with-param name="string"><xsl:number level="multiple"/></xsl:with-param>
703 <xsl:variable name="content">
705 <xsl:when test="$depth mod 2 = 0">
706 <xsl:call-template name="gentext.startquote"/>
707 <xsl:call-template name="inline.charseq"/>
708 <xsl:call-template name="gentext.endquote"/>
711 <xsl:call-template name="gentext.nestedstartquote"/>
712 <xsl:call-template name="inline.charseq"/>
713 <xsl:call-template name="gentext.nestedendquote"/>
719 <xsl:call-template name="anchor"/>
720 <xsl:copy-of select="$content"/>
725 <xsl:template match="varname">
726 <xsl:call-template name="inline.monoseq"/>
729 <xsl:template match="wordasword">
730 <xsl:call-template name="inline.italicseq"/>
733 <xsl:template match="lineannotation">
734 <fo:inline font-style="italic">
735 <xsl:call-template name="inline.charseq"/>
739 <xsl:template match="superscript">
740 <xsl:call-template name="inline.superscriptseq"/>
743 <xsl:template match="subscript">
744 <xsl:call-template name="inline.subscriptseq"/>
747 <xsl:template match="trademark">
748 <xsl:call-template name="inline.charseq"/>
750 <xsl:when test="@class = 'copyright'
751 or @class = 'registered'">
752 <xsl:call-template name="dingbat">
753 <xsl:with-param name="dingbat" select="@class"/>
756 <xsl:when test="@class = 'service'">
757 <xsl:call-template name="inline.superscriptseq">
758 <xsl:with-param name="content" select="'SM'"/>
762 <xsl:call-template name="dingbat">
763 <xsl:with-param name="dingbat" select="'trademark'"/>
769 <xsl:template match="firstterm">
770 <xsl:call-template name="glossterm">
771 <xsl:with-param name="firstterm" select="1"/>
775 <xsl:template match="glossterm" name="glossterm">
776 <xsl:param name="firstterm" select="0"/>
779 <xsl:when test="($firstterm.only.link = 0 or $firstterm = 1) and @linkend">
780 <xsl:variable name="targets" select="key('id',@linkend)"/>
781 <xsl:variable name="target" select="$targets[1]"/>
784 <xsl:when test="$target">
785 <fo:basic-link internal-destination="{@linkend}"
786 xsl:use-attribute-sets="xref.properties">
787 <xsl:call-template name="inline.italicseq"/>
791 <xsl:call-template name="inline.italicseq"/>
796 <xsl:when test="not(@linkend)
797 and ($firstterm.only.link = 0 or $firstterm = 1)
798 and ($glossterm.auto.link != 0)
799 and $glossary.collection != ''">
800 <xsl:variable name="term">
802 <xsl:when test="@baseform"><xsl:value-of select="@baseform"/></xsl:when>
803 <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
806 <xsl:variable name="cterm"
807 select="(document($glossary.collection,.)//glossentry[glossterm=$term])[1]"/>
810 <xsl:when test="not($cterm)">
812 <xsl:text>There's no entry for </xsl:text>
813 <xsl:value-of select="$term"/>
814 <xsl:text> in </xsl:text>
815 <xsl:value-of select="$glossary.collection"/>
817 <xsl:call-template name="inline.italicseq"/>
820 <xsl:variable name="id">
821 <xsl:call-template name="object.id">
822 <xsl:with-param name="object" select="$cterm"/>
825 <fo:basic-link internal-destination="{$id}"
826 xsl:use-attribute-sets="xref.properties">
827 <xsl:call-template name="inline.italicseq"/>
833 <xsl:when test="not(@linkend)
834 and ($firstterm.only.link = 0 or $firstterm = 1)
835 and $glossterm.auto.link != 0">
836 <xsl:variable name="term">
838 <xsl:when test="@baseform">
839 <xsl:value-of select="normalize-space(@baseform)"/>
842 <xsl:value-of select="normalize-space(.)"/>
847 <xsl:variable name="targets"
848 select="key('glossentries', $term)"/>
849 <xsl:variable name="target" select="$targets[1]"/>
852 <xsl:when test="count($targets)=0">
854 <xsl:text>Error: no glossentry for glossterm: </xsl:text>
855 <xsl:value-of select="."/>
856 <xsl:text>.</xsl:text>
858 <xsl:call-template name="inline.italicseq"/>
861 <xsl:variable name="termid">
862 <xsl:call-template name="object.id">
863 <xsl:with-param name="object" select="$target"/>
867 <fo:basic-link internal-destination="{$termid}"
868 xsl:use-attribute-sets="xref.properties">
869 <xsl:call-template name="inline.charseq"/>
875 <xsl:call-template name="inline.italicseq"/>
880 <xsl:template match="termdef">
882 <xsl:call-template name="gentext.template">
883 <xsl:with-param name="context" select="'termdef'"/>
884 <xsl:with-param name="name" select="'prefix'"/>
886 <xsl:apply-templates/>
887 <xsl:call-template name="gentext.template">
888 <xsl:with-param name="context" select="'termdef'"/>
889 <xsl:with-param name="name" select="'suffix'"/>
894 <xsl:template match="sgmltag|tag">
895 <xsl:variable name="class">
897 <xsl:when test="@class">
898 <xsl:value-of select="@class"/>
900 <xsl:otherwise>element</xsl:otherwise>
905 <xsl:when test="$class='attribute'">
906 <xsl:call-template name="inline.monoseq"/>
908 <xsl:when test="$class='attvalue'">
909 <xsl:call-template name="inline.monoseq"/>
911 <xsl:when test="$class='element'">
912 <xsl:call-template name="inline.monoseq"/>
914 <xsl:when test="$class='endtag'">
915 <xsl:call-template name="inline.monoseq">
916 <xsl:with-param name="content">
917 <xsl:text></</xsl:text>
918 <xsl:apply-templates/>
919 <xsl:text>></xsl:text>
923 <xsl:when test="$class='genentity'">
924 <xsl:call-template name="inline.monoseq">
925 <xsl:with-param name="content">
926 <xsl:text>&</xsl:text>
927 <xsl:apply-templates/>
928 <xsl:text>;</xsl:text>
932 <xsl:when test="$class='numcharref'">
933 <xsl:call-template name="inline.monoseq">
934 <xsl:with-param name="content">
935 <xsl:text>&#</xsl:text>
936 <xsl:apply-templates/>
937 <xsl:text>;</xsl:text>
941 <xsl:when test="$class='paramentity'">
942 <xsl:call-template name="inline.monoseq">
943 <xsl:with-param name="content">
944 <xsl:text>%</xsl:text>
945 <xsl:apply-templates/>
946 <xsl:text>;</xsl:text>
950 <xsl:when test="$class='pi'">
951 <xsl:call-template name="inline.monoseq">
952 <xsl:with-param name="content">
953 <xsl:text><?</xsl:text>
954 <xsl:apply-templates/>
955 <xsl:text>></xsl:text>
959 <xsl:when test="$class='xmlpi'">
960 <xsl:call-template name="inline.monoseq">
961 <xsl:with-param name="content">
962 <xsl:text><?</xsl:text>
963 <xsl:apply-templates/>
964 <xsl:text>?></xsl:text>
968 <xsl:when test="$class='starttag'">
969 <xsl:call-template name="inline.monoseq">
970 <xsl:with-param name="content">
971 <xsl:text><</xsl:text>
972 <xsl:apply-templates/>
973 <xsl:text>></xsl:text>
977 <xsl:when test="$class='emptytag'">
978 <xsl:call-template name="inline.monoseq">
979 <xsl:with-param name="content">
980 <xsl:text><</xsl:text>
981 <xsl:apply-templates/>
982 <xsl:text>/></xsl:text>
986 <xsl:when test="$class='sgmlcomment' or $class='comment'">
987 <xsl:call-template name="inline.monoseq">
988 <xsl:with-param name="content">
989 <xsl:text><!--</xsl:text>
990 <xsl:apply-templates/>
991 <xsl:text>--></xsl:text>
996 <xsl:call-template name="inline.charseq"/>
1001 <xsl:template match="email">
1002 <xsl:call-template name="inline.monoseq">
1003 <xsl:with-param name="content">
1004 <fo:inline keep-together.within-line="always" hyphenate="false">
1005 <xsl:if test="not($email.delimiters.enabled = 0)">
1006 <xsl:text><</xsl:text>
1009 <xsl:when test="not($email.mailto.enabled = 0)">
1010 <fo:basic-link xsl:use-attribute-sets="xref.properties"
1011 keep-together.within-line="always" hyphenate="false">
1012 <xsl:attribute name="external-destination">
1013 mailto:<xsl:value-of select="string(.)" />
1015 <xsl:apply-templates/>
1019 <xsl:apply-templates/>
1022 <xsl:if test="not($email.delimiters.enabled = 0)">
1023 <xsl:text>></xsl:text>
1027 </xsl:call-template>
1030 <xsl:template match="keycombo">
1031 <xsl:variable name="action" select="@action"/>
1032 <xsl:variable name="joinchar">
1034 <xsl:when test="$action='seq'"><xsl:text> </xsl:text></xsl:when>
1035 <xsl:when test="$action='simul'">+</xsl:when>
1036 <xsl:when test="$action='press'">-</xsl:when>
1037 <xsl:when test="$action='click'">-</xsl:when>
1038 <xsl:when test="$action='double-click'">-</xsl:when>
1039 <xsl:when test="$action='other'"></xsl:when>
1040 <xsl:otherwise>+</xsl:otherwise>
1043 <xsl:for-each select="*">
1044 <xsl:if test="position()>1"><xsl:value-of select="$joinchar"/></xsl:if>
1045 <xsl:apply-templates select="."/>
1049 <xsl:template match="uri">
1050 <xsl:call-template name="inline.monoseq"/>
1053 <!-- ==================================================================== -->
1055 <xsl:template match="menuchoice">
1056 <xsl:variable name="shortcut" select="./shortcut"/>
1057 <xsl:call-template name="process.menuchoice"/>
1058 <xsl:if test="$shortcut">
1059 <xsl:text> (</xsl:text>
1060 <xsl:apply-templates select="$shortcut"/>
1061 <xsl:text>)</xsl:text>
1065 <xsl:template name="process.menuchoice">
1066 <xsl:param name="nodelist" select="guibutton|guiicon|guilabel|guimenu|guimenuitem|guisubmenu|interface"/><!-- not(shortcut) -->
1067 <xsl:param name="count" select="1"/>
1069 <xsl:variable name="mm.separator">
1071 <xsl:when test="($fop.extensions != 0 or $fop1.extensions != 0 ) and
1072 contains($menuchoice.menu.separator, '→')">
1073 <fo:inline font-family="Symbol">
1074 <xsl:copy-of select="$menuchoice.menu.separator"/>
1078 <xsl:copy-of select="$menuchoice.menu.separator"/>
1084 <xsl:when test="$count>count($nodelist)"></xsl:when>
1085 <xsl:when test="$count=1">
1086 <xsl:apply-templates select="$nodelist[$count=position()]"/>
1087 <xsl:call-template name="process.menuchoice">
1088 <xsl:with-param name="nodelist" select="$nodelist"/>
1089 <xsl:with-param name="count" select="$count+1"/>
1090 </xsl:call-template>
1093 <xsl:variable name="node" select="$nodelist[$count=position()]"/>
1095 <xsl:when test="local-name($node)='guimenuitem'
1096 or local-name($node)='guisubmenu'">
1097 <xsl:copy-of select="$mm.separator"/>
1100 <xsl:copy-of select="$menuchoice.separator"/>
1103 <xsl:apply-templates select="$node"/>
1104 <xsl:call-template name="process.menuchoice">
1105 <xsl:with-param name="nodelist" select="$nodelist"/>
1106 <xsl:with-param name="count" select="$count+1"/>
1107 </xsl:call-template>
1112 <!-- ==================================================================== -->
1114 <xsl:template match="optional">
1115 <xsl:value-of select="$arg.choice.opt.open.str"/>
1116 <xsl:call-template name="inline.charseq"/>
1117 <xsl:value-of select="$arg.choice.opt.close.str"/>
1120 <xsl:template match="citation">
1121 <!-- todo: integrate with bibliography collection -->
1122 <xsl:variable name="targets" select="(//biblioentry | //bibliomixed)[abbrev = string(current())]"/>
1123 <xsl:variable name="target" select="$targets[1]"/>
1126 <!-- try automatic linking based on match to abbrev -->
1127 <xsl:when test="$target and not(xref) and not(link)">
1129 <xsl:text>[</xsl:text>
1131 <xsl:attribute name="internal-destination">
1132 <xsl:call-template name="object.id">
1133 <xsl:with-param name="object" select="$target"/>
1134 </xsl:call-template>
1138 <xsl:when test="$bibliography.numbered != 0">
1139 <xsl:apply-templates select="$target" mode="citation"/>
1142 <xsl:call-template name="inline.charseq"/>
1147 <xsl:text>]</xsl:text>
1151 <xsl:text>[</xsl:text>
1152 <xsl:call-template name="inline.charseq"/>
1153 <xsl:text>]</xsl:text>
1158 <xsl:template match="citebiblioid">
1159 <xsl:variable name="targets" select="//*[biblioid = string(current())]"/>
1160 <xsl:variable name="target" select="$targets[1]"/>
1163 <!-- try automatic linking based on match to parent of biblioid -->
1164 <xsl:when test="$target and not(xref) and not(link)">
1166 <xsl:text>[</xsl:text>
1168 <xsl:attribute name="internal-destination">
1169 <xsl:call-template name="object.id">
1170 <xsl:with-param name="object" select="$target"/>
1171 </xsl:call-template>
1174 <xsl:call-template name="inline.charseq"/>
1177 <xsl:text>]</xsl:text>
1181 <xsl:text>[</xsl:text>
1182 <xsl:call-template name="inline.charseq"/>
1183 <xsl:text>]</xsl:text>
1188 <xsl:template match="biblioentry|bibliomixed" mode="citation">
1189 <xsl:number from="bibliography" count="biblioentry|bibliomixed"
1190 level="any" format="1"/>
1193 <!-- ==================================================================== -->
1195 <xsl:template match="comment[&comment.block.parents;]|remark[&comment.block.parents;]">
1196 <xsl:if test="$show.comments != 0">
1197 <fo:block font-style="italic">
1198 <xsl:call-template name="inline.charseq"/>
1203 <xsl:template match="comment|remark">
1204 <xsl:if test="$show.comments != 0">
1205 <fo:inline font-style="italic">
1206 <xsl:call-template name="inline.charseq"/>
1211 <!-- ==================================================================== -->
1213 <xsl:template match="productname">
1214 <xsl:call-template name="inline.charseq"/>
1215 <xsl:if test="@class">
1216 <xsl:call-template name="dingbat">
1217 <xsl:with-param name="dingbat" select="@class"/>
1218 </xsl:call-template>
1222 <xsl:template match="productnumber">
1223 <xsl:call-template name="inline.charseq"/>
1226 <!-- ==================================================================== -->
1228 <xsl:template match="pob|street|city|state|postcode|country|otheraddr">
1229 <xsl:call-template name="inline.charseq"/>
1232 <xsl:template match="phone|fax">
1233 <xsl:call-template name="inline.charseq"/>
1236 <!-- in Addresses, for example -->
1237 <xsl:template match="honorific|firstname|surname|lineage|othername">
1238 <xsl:call-template name="inline.charseq"/>
1241 <!-- ==================================================================== -->
1243 <xsl:template match="person">
1244 <xsl:apply-templates select="personname"/>
1247 <xsl:template match="personname">
1248 <xsl:call-template name="simple.xlink">
1249 <xsl:with-param name="content">
1250 <xsl:call-template name="person.name"/>
1252 </xsl:call-template>
1255 <xsl:template match="jobtitle">
1256 <xsl:call-template name="simple.xlink">
1257 <xsl:with-param name="content">
1258 <xsl:apply-templates/>
1260 </xsl:call-template>
1263 <!-- ==================================================================== -->
1265 <xsl:template match="org">
1266 <xsl:call-template name="inline.charseq"/>
1269 <xsl:template match="orgname">
1270 <xsl:call-template name="inline.charseq"/>
1273 <xsl:template match="orgdiv">
1274 <xsl:call-template name="inline.charseq"/>
1277 <xsl:template match="affiliation">
1278 <xsl:call-template name="inline.charseq"/>
1281 <!-- ==================================================================== -->
1283 <xsl:template match="beginpage">
1284 <!-- does nothing; this *is not* markup to force a page break. -->