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 8363 2009-03-21 07:46:57Z bobstayton $
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:template name="simple.xlink">
23 <xsl:param name="node" select="."/>
24 <xsl:param name="content">
25 <xsl:apply-templates/>
27 <xsl:param name="linkend" select="$node/@linkend"/>
28 <xsl:param name="xhref" select="$node/@xlink:href"/>
31 <xsl:when test="$xhref
32 and (not($node/@xlink:type) or
33 $node/@xlink:type='simple')">
35 <!-- Is it a local idref? -->
36 <xsl:variable name="is.idref">
38 <!-- if the href starts with # and does not contain an "(" -->
39 <!-- or if the href starts with #xpointer(id(, it's just an ID -->
40 <xsl:when test="starts-with($xhref,'#')
41 and (not(contains($xhref,'('))
42 or starts-with($xhref,
43 '#xpointer(id('))">1</xsl:when>
44 <xsl:otherwise>0</xsl:otherwise>
48 <!-- Is it an olink ? -->
49 <xsl:variable name="is.olink">
51 <!-- If xlink:role="http://docbook.org/xlink/role/olink" -->
52 <!-- and if the href contains # -->
53 <xsl:when test="contains($xhref,'#') and
54 @xlink:role = $xolink.role">1</xsl:when>
55 <xsl:otherwise>0</xsl:otherwise>
60 <xsl:when test="$is.olink = 1">
61 <xsl:call-template name="olink">
62 <xsl:with-param name="content" select="$content"/>
66 <xsl:when test="$is.idref = 1">
68 <xsl:variable name="idref">
69 <xsl:call-template name="xpointer.idref">
70 <xsl:with-param name="xpointer" select="$xhref"/>
74 <xsl:variable name="targets" select="key('id',$idref)"/>
75 <xsl:variable name="target" select="$targets[1]"/>
77 <xsl:call-template name="check.id.unique">
78 <xsl:with-param name="linkend" select="$idref"/>
82 <xsl:when test="count($target) = 0">
84 <xsl:text>XLink to nonexistent id: </xsl:text>
85 <xsl:value-of select="$idref"/>
87 <xsl:copy-of select="$content"/>
91 <fo:basic-link internal-destination="{$idref}">
92 <xsl:copy-of select="$content"/>
98 <!-- otherwise it's a URI -->
100 <fo:basic-link external-destination="url({$xhref})">
101 <xsl:copy-of select="$content"/>
103 <!-- * Call the template for determining whether the URL for this -->
104 <!-- * hyperlink is displayed, and how to display it (either inline or -->
105 <!-- * as a numbered footnote). -->
106 <xsl:call-template name="hyperlink.url.display">
107 <xsl:with-param name="url" select="$xhref"/>
113 <xsl:when test="$linkend">
114 <xsl:variable name="targets" select="key('id',$linkend)"/>
115 <xsl:variable name="target" select="$targets[1]"/>
117 <xsl:call-template name="check.id.unique">
118 <xsl:with-param name="linkend" select="$linkend"/>
122 <xsl:when test="count($target) = 0">
124 <xsl:text>XLink to nonexistent id: </xsl:text>
125 <xsl:value-of select="$linkend"/>
127 <xsl:copy-of select="$content"/>
131 <fo:basic-link internal-destination="{$linkend}">
132 <xsl:copy-of select="$content"/>
139 <xsl:copy-of select="$content"/>
145 <xsl:template name="inline.charseq">
146 <xsl:param name="content">
147 <xsl:call-template name="simple.xlink">
148 <xsl:with-param name="content">
149 <xsl:apply-templates/>
155 <xsl:when test="@dir">
157 <xsl:attribute name="direction">
159 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
160 <xsl:otherwise>rtl</xsl:otherwise>
163 <xsl:copy-of select="$content"/>
167 <xsl:copy-of select="$content"/>
172 <xsl:template name="inline.monoseq">
173 <xsl:param name="content">
174 <xsl:call-template name="simple.xlink">
175 <xsl:with-param name="content">
176 <xsl:apply-templates/>
181 <fo:inline xsl:use-attribute-sets="monospace.properties">
183 <xsl:attribute name="direction">
185 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
186 <xsl:otherwise>rtl</xsl:otherwise>
190 <xsl:copy-of select="$content"/>
194 <xsl:template name="inline.boldseq">
195 <xsl:param name="content">
196 <xsl:call-template name="simple.xlink">
197 <xsl:with-param name="content">
198 <xsl:apply-templates/>
203 <fo:inline font-weight="bold">
205 <xsl:attribute name="direction">
207 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
208 <xsl:otherwise>rtl</xsl:otherwise>
212 <xsl:copy-of select="$content"/>
216 <xsl:template name="inline.italicseq">
217 <xsl:param name="content">
218 <xsl:call-template name="simple.xlink">
219 <xsl:with-param name="content">
220 <xsl:apply-templates/>
225 <fo:inline font-style="italic">
226 <xsl:call-template name="anchor"/>
228 <xsl:attribute name="direction">
230 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
231 <xsl:otherwise>rtl</xsl:otherwise>
235 <xsl:copy-of select="$content"/>
239 <xsl:template name="inline.boldmonoseq">
240 <xsl:param name="content">
241 <xsl:call-template name="simple.xlink">
242 <xsl:with-param name="content">
243 <xsl:apply-templates/>
248 <fo:inline font-weight="bold" xsl:use-attribute-sets="monospace.properties">
249 <xsl:call-template name="anchor"/>
251 <xsl:attribute name="direction">
253 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
254 <xsl:otherwise>rtl</xsl:otherwise>
258 <xsl:copy-of select="$content"/>
262 <xsl:template name="inline.italicmonoseq">
263 <xsl:param name="content">
264 <xsl:call-template name="simple.xlink">
265 <xsl:with-param name="content">
266 <xsl:apply-templates/>
271 <fo:inline font-style="italic" xsl:use-attribute-sets="monospace.properties">
272 <xsl:call-template name="anchor"/>
274 <xsl:attribute name="direction">
276 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
277 <xsl:otherwise>rtl</xsl:otherwise>
281 <xsl:copy-of select="$content"/>
285 <xsl:template name="inline.superscriptseq">
286 <xsl:param name="content">
287 <xsl:call-template name="simple.xlink">
288 <xsl:with-param name="content">
289 <xsl:apply-templates/>
294 <fo:inline xsl:use-attribute-sets="superscript.properties">
295 <xsl:call-template name="anchor"/>
297 <xsl:attribute name="direction">
299 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
300 <xsl:otherwise>rtl</xsl:otherwise>
305 <xsl:when test="$fop.extensions != 0">
306 <xsl:attribute name="vertical-align">super</xsl:attribute>
309 <xsl:attribute name="baseline-shift">super</xsl:attribute>
312 <xsl:copy-of select="$content"/>
316 <xsl:template name="inline.subscriptseq">
317 <xsl:param name="content">
318 <xsl:call-template name="simple.xlink">
319 <xsl:with-param name="content">
320 <xsl:apply-templates/>
325 <fo:inline xsl:use-attribute-sets="subscript.properties">
326 <xsl:call-template name="anchor"/>
328 <xsl:attribute name="direction">
330 <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
331 <xsl:otherwise>rtl</xsl:otherwise>
336 <xsl:when test="$fop.extensions != 0">
337 <xsl:attribute name="vertical-align">sub</xsl:attribute>
340 <xsl:attribute name="baseline-shift">sub</xsl:attribute>
343 <xsl:copy-of select="$content"/>
347 <!-- ==================================================================== -->
348 <!-- some special cases -->
350 <xsl:template match="author">
351 <xsl:call-template name="simple.xlink">
352 <xsl:with-param name="content">
353 <xsl:call-template name="person.name"/>
358 <xsl:template match="editor">
359 <xsl:call-template name="simple.xlink">
360 <xsl:with-param name="content">
361 <xsl:call-template name="person.name"/>
366 <xsl:template match="othercredit">
367 <xsl:call-template name="simple.xlink">
368 <xsl:with-param name="content">
369 <xsl:call-template name="person.name"/>
374 <xsl:template match="authorinitials">
375 <xsl:call-template name="inline.charseq"/>
378 <!-- ==================================================================== -->
380 <xsl:template match="accel">
381 <xsl:call-template name="inline.charseq"/>
384 <xsl:template match="action">
385 <xsl:call-template name="inline.charseq"/>
388 <xsl:template match="application">
389 <xsl:call-template name="inline.charseq"/>
392 <xsl:template match="classname">
393 <xsl:call-template name="inline.monoseq"/>
396 <xsl:template match="exceptionname">
397 <xsl:call-template name="inline.monoseq"/>
400 <xsl:template match="interfacename">
401 <xsl:call-template name="inline.monoseq"/>
404 <xsl:template match="methodname">
405 <xsl:call-template name="inline.monoseq"/>
408 <xsl:template match="command">
409 <xsl:call-template name="inline.boldseq"/>
412 <xsl:template match="computeroutput">
413 <xsl:call-template name="inline.monoseq"/>
416 <xsl:template match="constant">
417 <xsl:call-template name="inline.monoseq"/>
420 <xsl:template match="database">
421 <xsl:call-template name="inline.charseq"/>
424 <xsl:template match="date">
425 <!-- should this support locale-specific formatting? how? -->
426 <xsl:call-template name="inline.charseq"/>
429 <xsl:template match="errorcode">
430 <xsl:call-template name="inline.charseq"/>
433 <xsl:template match="errorname">
434 <xsl:call-template name="inline.charseq"/>
437 <xsl:template match="errortype">
438 <xsl:call-template name="inline.charseq"/>
441 <xsl:template match="errortext">
442 <xsl:call-template name="inline.charseq"/>
445 <xsl:template match="envar">
446 <xsl:call-template name="inline.monoseq"/>
449 <xsl:template match="filename">
450 <xsl:call-template name="inline.monoseq"/>
453 <xsl:template match="function">
455 <xsl:when test="$function.parens != '0'
456 and (parameter or function or replaceable)">
457 <xsl:variable name="nodes" select="text()|*"/>
458 <xsl:call-template name="inline.monoseq">
459 <xsl:with-param name="content">
460 <xsl:call-template name="simple.xlink">
461 <xsl:with-param name="content">
462 <xsl:apply-templates select="$nodes[1]"/>
467 <xsl:text>(</xsl:text>
468 <xsl:apply-templates select="$nodes[position()>1]"/>
469 <xsl:text>)</xsl:text>
472 <xsl:call-template name="inline.monoseq"/>
477 <xsl:template match="function/parameter" priority="2">
478 <xsl:call-template name="inline.italicmonoseq"/>
479 <xsl:if test="following-sibling::*">
480 <xsl:text>, </xsl:text>
484 <xsl:template match="function/replaceable" priority="2">
485 <xsl:call-template name="inline.italicmonoseq"/>
486 <xsl:if test="following-sibling::*">
487 <xsl:text>, </xsl:text>
491 <xsl:template match="guibutton">
492 <xsl:call-template name="inline.charseq"/>
495 <xsl:template match="guiicon">
496 <xsl:call-template name="inline.charseq"/>
499 <xsl:template match="guilabel">
500 <xsl:call-template name="inline.charseq"/>
503 <xsl:template match="guimenu">
504 <xsl:call-template name="inline.charseq"/>
507 <xsl:template match="guimenuitem">
508 <xsl:call-template name="inline.charseq"/>
511 <xsl:template match="guisubmenu">
512 <xsl:call-template name="inline.charseq"/>
515 <xsl:template match="hardware">
516 <xsl:call-template name="inline.charseq"/>
519 <xsl:template match="interface">
520 <xsl:call-template name="inline.charseq"/>
523 <xsl:template match="interfacedefinition">
524 <xsl:call-template name="inline.charseq"/>
527 <xsl:template match="keycap">
528 <xsl:call-template name="inline.boldseq"/>
531 <xsl:template match="keycode">
532 <xsl:call-template name="inline.charseq"/>
535 <xsl:template match="keysym">
536 <xsl:call-template name="inline.charseq"/>
539 <xsl:template match="literal">
540 <xsl:call-template name="inline.monoseq"/>
543 <xsl:template match="code">
544 <xsl:call-template name="inline.monoseq"/>
547 <xsl:template match="medialabel">
548 <xsl:call-template name="inline.italicseq"/>
551 <xsl:template match="shortcut">
552 <xsl:call-template name="inline.boldseq"/>
555 <xsl:template match="mousebutton">
556 <xsl:call-template name="inline.charseq"/>
559 <xsl:template match="option">
560 <xsl:call-template name="inline.monoseq"/>
563 <xsl:template match="package">
564 <xsl:call-template name="inline.charseq"/>
567 <xsl:template match="parameter">
568 <xsl:call-template name="inline.italicmonoseq"/>
571 <xsl:template match="property">
572 <xsl:call-template name="inline.charseq"/>
575 <xsl:template match="prompt">
576 <xsl:call-template name="inline.monoseq"/>
579 <xsl:template match="replaceable">
580 <xsl:call-template name="inline.italicmonoseq"/>
583 <xsl:template match="returnvalue">
584 <xsl:call-template name="inline.charseq"/>
587 <xsl:template match="structfield">
588 <xsl:call-template name="inline.italicmonoseq"/>
591 <xsl:template match="structname">
592 <xsl:call-template name="inline.charseq"/>
595 <xsl:template match="symbol">
596 <xsl:call-template name="inline.charseq"/>
599 <xsl:template match="systemitem">
600 <xsl:call-template name="inline.monoseq"/>
603 <xsl:template match="token">
604 <xsl:call-template name="inline.charseq"/>
607 <xsl:template match="type">
608 <xsl:call-template name="inline.charseq"/>
611 <xsl:template match="userinput">
612 <xsl:call-template name="inline.boldmonoseq"/>
615 <xsl:template match="abbrev">
616 <xsl:call-template name="inline.charseq"/>
619 <xsl:template match="acronym">
620 <xsl:call-template name="inline.charseq"/>
623 <xsl:template match="citerefentry">
624 <xsl:call-template name="inline.charseq"/>
627 <xsl:template match="citetitle">
629 <xsl:when test="@pubwork = 'article'">
630 <xsl:call-template name="gentext.startquote"/>
631 <xsl:call-template name="inline.charseq"/>
632 <xsl:call-template name="gentext.endquote"/>
635 <xsl:call-template name="inline.italicseq"/>
640 <xsl:template match="emphasis">
641 <xsl:variable name="depth">
642 <xsl:call-template name="dot.count">
643 <xsl:with-param name="string">
644 <xsl:number level="multiple"/>
650 <xsl:when test="@role='bold' or @role='strong'">
651 <xsl:call-template name="inline.boldseq"/>
653 <xsl:when test="@role='underline'">
654 <fo:inline text-decoration="underline">
655 <xsl:call-template name="inline.charseq"/>
658 <xsl:when test="@role='strikethrough'">
659 <fo:inline text-decoration="line-through">
660 <xsl:call-template name="inline.charseq"/>
665 <xsl:when test="$depth mod 2 = 1">
666 <fo:inline font-style="normal">
667 <xsl:apply-templates/>
671 <xsl:call-template name="inline.italicseq"/>
678 <xsl:template match="foreignphrase">
679 <xsl:call-template name="inline.italicseq"/>
682 <xsl:template match="markup">
683 <xsl:call-template name="inline.charseq"/>
686 <xsl:template match="phrase">
688 <xsl:call-template name="anchor"/>
689 <xsl:call-template name="inline.charseq"/>
693 <xsl:template match="quote">
694 <xsl:variable name="depth">
695 <xsl:call-template name="dot.count">
696 <xsl:with-param name="string"><xsl:number level="multiple"/></xsl:with-param>
699 <xsl:variable name="content">
701 <xsl:when test="$depth mod 2 = 0">
702 <xsl:call-template name="gentext.startquote"/>
703 <xsl:call-template name="inline.charseq"/>
704 <xsl:call-template name="gentext.endquote"/>
707 <xsl:call-template name="gentext.nestedstartquote"/>
708 <xsl:call-template name="inline.charseq"/>
709 <xsl:call-template name="gentext.nestedendquote"/>
715 <xsl:call-template name="anchor"/>
716 <xsl:copy-of select="$content"/>
721 <xsl:template match="varname">
722 <xsl:call-template name="inline.monoseq"/>
725 <xsl:template match="wordasword">
726 <xsl:call-template name="inline.italicseq"/>
729 <xsl:template match="lineannotation">
730 <fo:inline font-style="italic">
731 <xsl:call-template name="inline.charseq"/>
735 <xsl:template match="superscript">
736 <xsl:call-template name="inline.superscriptseq"/>
739 <xsl:template match="subscript">
740 <xsl:call-template name="inline.subscriptseq"/>
743 <xsl:template match="trademark">
744 <xsl:call-template name="inline.charseq"/>
746 <xsl:when test="@class = 'copyright'
747 or @class = 'registered'">
748 <xsl:call-template name="dingbat">
749 <xsl:with-param name="dingbat" select="@class"/>
752 <xsl:when test="@class = 'service'">
753 <xsl:call-template name="inline.superscriptseq">
754 <xsl:with-param name="content" select="'SM'"/>
758 <xsl:call-template name="dingbat">
759 <xsl:with-param name="dingbat" select="'trademark'"/>
765 <xsl:template match="firstterm">
766 <xsl:call-template name="glossterm">
767 <xsl:with-param name="firstterm" select="1"/>
771 <xsl:template match="glossterm" name="glossterm">
772 <xsl:param name="firstterm" select="0"/>
775 <xsl:when test="($firstterm.only.link = 0 or $firstterm = 1) and @linkend">
776 <xsl:variable name="targets" select="key('id',@linkend)"/>
777 <xsl:variable name="target" select="$targets[1]"/>
780 <xsl:when test="$target">
781 <fo:basic-link internal-destination="{@linkend}"
782 xsl:use-attribute-sets="xref.properties">
783 <xsl:call-template name="inline.italicseq"/>
787 <xsl:call-template name="inline.italicseq"/>
792 <xsl:when test="not(@linkend)
793 and ($firstterm.only.link = 0 or $firstterm = 1)
794 and ($glossterm.auto.link != 0)
795 and $glossary.collection != ''">
796 <xsl:variable name="term">
798 <xsl:when test="@baseform"><xsl:value-of select="@baseform"/></xsl:when>
799 <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
802 <xsl:variable name="cterm"
803 select="(document($glossary.collection,.)//glossentry[glossterm=$term])[1]"/>
806 <xsl:when test="not($cterm)">
808 <xsl:text>There's no entry for </xsl:text>
809 <xsl:value-of select="$term"/>
810 <xsl:text> in </xsl:text>
811 <xsl:value-of select="$glossary.collection"/>
813 <xsl:call-template name="inline.italicseq"/>
816 <xsl:variable name="id">
817 <xsl:call-template name="object.id">
818 <xsl:with-param name="object" select="$cterm"/>
821 <fo:basic-link internal-destination="{$id}"
822 xsl:use-attribute-sets="xref.properties">
823 <xsl:call-template name="inline.italicseq"/>
829 <xsl:when test="not(@linkend)
830 and ($firstterm.only.link = 0 or $firstterm = 1)
831 and $glossterm.auto.link != 0">
832 <xsl:variable name="term">
834 <xsl:when test="@baseform">
835 <xsl:value-of select="normalize-space(@baseform)"/>
838 <xsl:value-of select="normalize-space(.)"/>
843 <xsl:variable name="targets"
844 select="//glossentry[normalize-space(glossterm)=$term
845 or normalize-space(glossterm/@baseform)=$term]"/>
847 <xsl:variable name="target" select="$targets[1]"/>
850 <xsl:when test="count($targets)=0">
852 <xsl:text>Error: no glossentry for glossterm: </xsl:text>
853 <xsl:value-of select="."/>
854 <xsl:text>.</xsl:text>
856 <xsl:call-template name="inline.italicseq"/>
859 <xsl:variable name="termid">
860 <xsl:call-template name="object.id">
861 <xsl:with-param name="object" select="$target"/>
865 <fo:basic-link internal-destination="{$termid}"
866 xsl:use-attribute-sets="xref.properties">
867 <xsl:call-template name="inline.charseq"/>
873 <xsl:call-template name="inline.italicseq"/>
878 <xsl:template match="termdef">
880 <xsl:call-template name="gentext.template">
881 <xsl:with-param name="context" select="'termdef'"/>
882 <xsl:with-param name="name" select="'prefix'"/>
884 <xsl:apply-templates/>
885 <xsl:call-template name="gentext.template">
886 <xsl:with-param name="context" select="'termdef'"/>
887 <xsl:with-param name="name" select="'suffix'"/>
892 <xsl:template match="sgmltag|tag">
893 <xsl:variable name="class">
895 <xsl:when test="@class">
896 <xsl:value-of select="@class"/>
898 <xsl:otherwise>element</xsl:otherwise>
903 <xsl:when test="$class='attribute'">
904 <xsl:call-template name="inline.monoseq"/>
906 <xsl:when test="$class='attvalue'">
907 <xsl:call-template name="inline.monoseq"/>
909 <xsl:when test="$class='element'">
910 <xsl:call-template name="inline.monoseq"/>
912 <xsl:when test="$class='endtag'">
913 <xsl:call-template name="inline.monoseq">
914 <xsl:with-param name="content">
915 <xsl:text></</xsl:text>
916 <xsl:apply-templates/>
917 <xsl:text>></xsl:text>
921 <xsl:when test="$class='genentity'">
922 <xsl:call-template name="inline.monoseq">
923 <xsl:with-param name="content">
924 <xsl:text>&</xsl:text>
925 <xsl:apply-templates/>
926 <xsl:text>;</xsl:text>
930 <xsl:when test="$class='numcharref'">
931 <xsl:call-template name="inline.monoseq">
932 <xsl:with-param name="content">
933 <xsl:text>&#</xsl:text>
934 <xsl:apply-templates/>
935 <xsl:text>;</xsl:text>
939 <xsl:when test="$class='paramentity'">
940 <xsl:call-template name="inline.monoseq">
941 <xsl:with-param name="content">
942 <xsl:text>%</xsl:text>
943 <xsl:apply-templates/>
944 <xsl:text>;</xsl:text>
948 <xsl:when test="$class='pi'">
949 <xsl:call-template name="inline.monoseq">
950 <xsl:with-param name="content">
951 <xsl:text><?</xsl:text>
952 <xsl:apply-templates/>
953 <xsl:text>></xsl:text>
957 <xsl:when test="$class='xmlpi'">
958 <xsl:call-template name="inline.monoseq">
959 <xsl:with-param name="content">
960 <xsl:text><?</xsl:text>
961 <xsl:apply-templates/>
962 <xsl:text>?></xsl:text>
966 <xsl:when test="$class='starttag'">
967 <xsl:call-template name="inline.monoseq">
968 <xsl:with-param name="content">
969 <xsl:text><</xsl:text>
970 <xsl:apply-templates/>
971 <xsl:text>></xsl:text>
975 <xsl:when test="$class='emptytag'">
976 <xsl:call-template name="inline.monoseq">
977 <xsl:with-param name="content">
978 <xsl:text><</xsl:text>
979 <xsl:apply-templates/>
980 <xsl:text>/></xsl:text>
984 <xsl:when test="$class='sgmlcomment' or $class='comment'">
985 <xsl:call-template name="inline.monoseq">
986 <xsl:with-param name="content">
987 <xsl:text><!--</xsl:text>
988 <xsl:apply-templates/>
989 <xsl:text>--></xsl:text>
994 <xsl:call-template name="inline.charseq"/>
999 <xsl:template match="email">
1000 <xsl:call-template name="inline.monoseq">
1001 <xsl:with-param name="content">
1002 <fo:inline keep-together.within-line="always" hyphenate="false">
1003 <xsl:if test="not($email.delimiters.enabled = 0)">
1004 <xsl:text><</xsl:text>
1007 <xsl:when test="not($email.mailto.enabled = 0)">
1008 <fo:basic-link xsl:use-attribute-sets="xref.properties"
1009 keep-together.within-line="always" hyphenate="false">
1010 <xsl:attribute name="external-destination">
1011 mailto:<xsl:value-of select="string(.)" />
1013 <xsl:apply-templates/>
1017 <xsl:apply-templates/>
1020 <xsl:if test="not($email.delimiters.enabled = 0)">
1021 <xsl:text>></xsl:text>
1025 </xsl:call-template>
1028 <xsl:template match="keycombo">
1029 <xsl:variable name="action" select="@action"/>
1030 <xsl:variable name="joinchar">
1032 <xsl:when test="$action='seq'"><xsl:text> </xsl:text></xsl:when>
1033 <xsl:when test="$action='simul'">+</xsl:when>
1034 <xsl:when test="$action='press'">-</xsl:when>
1035 <xsl:when test="$action='click'">-</xsl:when>
1036 <xsl:when test="$action='double-click'">-</xsl:when>
1037 <xsl:when test="$action='other'"></xsl:when>
1038 <xsl:otherwise>+</xsl:otherwise>
1041 <xsl:for-each select="*">
1042 <xsl:if test="position()>1"><xsl:value-of select="$joinchar"/></xsl:if>
1043 <xsl:apply-templates select="."/>
1047 <xsl:template match="uri">
1048 <xsl:call-template name="inline.monoseq"/>
1051 <!-- ==================================================================== -->
1053 <xsl:template match="menuchoice">
1054 <xsl:variable name="shortcut" select="./shortcut"/>
1055 <xsl:call-template name="process.menuchoice"/>
1056 <xsl:if test="$shortcut">
1057 <xsl:text> (</xsl:text>
1058 <xsl:apply-templates select="$shortcut"/>
1059 <xsl:text>)</xsl:text>
1063 <xsl:template name="process.menuchoice">
1064 <xsl:param name="nodelist" select="guibutton|guiicon|guilabel|guimenu|guimenuitem|guisubmenu|interface"/><!-- not(shortcut) -->
1065 <xsl:param name="count" select="1"/>
1067 <xsl:variable name="mm.separator">
1069 <xsl:when test="($fop.extensions != 0 or $fop1.extensions != 0 ) and
1070 contains($menuchoice.menu.separator, '→')">
1071 <fo:inline font-family="Symbol">
1072 <xsl:copy-of select="$menuchoice.menu.separator"/>
1076 <xsl:copy-of select="$menuchoice.menu.separator"/>
1082 <xsl:when test="$count>count($nodelist)"></xsl:when>
1083 <xsl:when test="$count=1">
1084 <xsl:apply-templates select="$nodelist[$count=position()]"/>
1085 <xsl:call-template name="process.menuchoice">
1086 <xsl:with-param name="nodelist" select="$nodelist"/>
1087 <xsl:with-param name="count" select="$count+1"/>
1088 </xsl:call-template>
1091 <xsl:variable name="node" select="$nodelist[$count=position()]"/>
1093 <xsl:when test="local-name($node)='guimenuitem'
1094 or local-name($node)='guisubmenu'">
1095 <xsl:copy-of select="$mm.separator"/>
1098 <xsl:copy-of select="$menuchoice.separator"/>
1101 <xsl:apply-templates select="$node"/>
1102 <xsl:call-template name="process.menuchoice">
1103 <xsl:with-param name="nodelist" select="$nodelist"/>
1104 <xsl:with-param name="count" select="$count+1"/>
1105 </xsl:call-template>
1110 <!-- ==================================================================== -->
1112 <xsl:template match="optional">
1113 <xsl:value-of select="$arg.choice.opt.open.str"/>
1114 <xsl:call-template name="inline.charseq"/>
1115 <xsl:value-of select="$arg.choice.opt.close.str"/>
1118 <xsl:template match="citation">
1119 <!-- todo: integrate with bibliography collection -->
1120 <xsl:variable name="targets" select="(//biblioentry | //bibliomixed)[abbrev = string(current())]"/>
1121 <xsl:variable name="target" select="$targets[1]"/>
1124 <!-- try automatic linking based on match to abbrev -->
1125 <xsl:when test="$target and not(xref) and not(link)">
1127 <xsl:text>[</xsl:text>
1129 <xsl:attribute name="internal-destination">
1130 <xsl:call-template name="object.id">
1131 <xsl:with-param name="object" select="$target"/>
1132 </xsl:call-template>
1136 <xsl:when test="$bibliography.numbered != 0">
1137 <xsl:apply-templates select="$target" mode="citation"/>
1140 <xsl:call-template name="inline.charseq"/>
1145 <xsl:text>]</xsl:text>
1149 <xsl:text>[</xsl:text>
1150 <xsl:call-template name="inline.charseq"/>
1151 <xsl:text>]</xsl:text>
1156 <xsl:template match="citebiblioid">
1157 <xsl:variable name="targets" select="//*[biblioid = string(current())]"/>
1158 <xsl:variable name="target" select="$targets[1]"/>
1161 <!-- try automatic linking based on match to parent of biblioid -->
1162 <xsl:when test="$target and not(xref) and not(link)">
1164 <xsl:text>[</xsl:text>
1166 <xsl:attribute name="internal-destination">
1167 <xsl:call-template name="object.id">
1168 <xsl:with-param name="object" select="$target"/>
1169 </xsl:call-template>
1172 <xsl:call-template name="inline.charseq"/>
1175 <xsl:text>]</xsl:text>
1179 <xsl:text>[</xsl:text>
1180 <xsl:call-template name="inline.charseq"/>
1181 <xsl:text>]</xsl:text>
1186 <xsl:template match="biblioentry|bibliomixed" mode="citation">
1187 <xsl:number from="bibliography" count="biblioentry|bibliomixed"
1188 level="any" format="1"/>
1191 <!-- ==================================================================== -->
1193 <xsl:template match="comment[&comment.block.parents;]|remark[&comment.block.parents;]">
1194 <xsl:if test="$show.comments != 0">
1195 <fo:block font-style="italic">
1196 <xsl:call-template name="inline.charseq"/>
1201 <xsl:template match="comment|remark">
1202 <xsl:if test="$show.comments != 0">
1203 <fo:inline font-style="italic">
1204 <xsl:call-template name="inline.charseq"/>
1209 <!-- ==================================================================== -->
1211 <xsl:template match="productname">
1212 <xsl:call-template name="inline.charseq"/>
1213 <xsl:if test="@class">
1214 <xsl:call-template name="dingbat">
1215 <xsl:with-param name="dingbat" select="@class"/>
1216 </xsl:call-template>
1220 <xsl:template match="productnumber">
1221 <xsl:call-template name="inline.charseq"/>
1224 <!-- ==================================================================== -->
1226 <xsl:template match="pob|street|city|state|postcode|country|otheraddr">
1227 <xsl:call-template name="inline.charseq"/>
1230 <xsl:template match="phone|fax">
1231 <xsl:call-template name="inline.charseq"/>
1234 <!-- in Addresses, for example -->
1235 <xsl:template match="honorific|firstname|surname|lineage|othername">
1236 <xsl:call-template name="inline.charseq"/>
1239 <!-- ==================================================================== -->
1241 <xsl:template match="person">
1242 <xsl:apply-templates select="personname"/>
1245 <xsl:template match="personname">
1246 <xsl:call-template name="simple.xlink">
1247 <xsl:with-param name="content">
1248 <xsl:call-template name="person.name"/>
1250 </xsl:call-template>
1253 <xsl:template match="jobtitle">
1254 <xsl:call-template name="simple.xlink">
1255 <xsl:with-param name="content">
1256 <xsl:apply-templates/>
1258 </xsl:call-template>
1261 <!-- ==================================================================== -->
1263 <xsl:template match="org">
1264 <xsl:call-template name="inline.charseq"/>
1267 <xsl:template match="orgname">
1268 <xsl:call-template name="inline.charseq"/>
1271 <xsl:template match="orgdiv">
1272 <xsl:call-template name="inline.charseq"/>
1275 <xsl:template match="affiliation">
1276 <xsl:call-template name="inline.charseq"/>
1279 <!-- ==================================================================== -->
1281 <xsl:template match="beginpage">
1282 <!-- does nothing; this *is not* markup to force a page break. -->