2
<!DOCTYPE xsl:stylesheet [
3
<!ENTITY comment.block.parents "parent::answer|parent::appendix|parent::article|parent::bibliodiv|
4
parent::bibliography|parent::blockquote|parent::caution|parent::chapter|
5
parent::glossary|parent::glossdiv|parent::important|parent::index|
6
parent::indexdiv|parent::listitem|parent::note|parent::orderedlist|
7
parent::partintro|parent::preface|parent::procedure|parent::qandadiv|
8
parent::qandaset|parent::question|parent::refentry|parent::refnamediv|
9
parent::refsect1|parent::refsect2|parent::refsect3|parent::refsection|
10
parent::refsynopsisdiv|parent::sect1|parent::sect2|parent::sect3|parent::sect4|
11
parent::sect5|parent::section|parent::setindex|parent::sidebar|
12
parent::simplesect|parent::taskprerequisites|parent::taskrelated|
13
parent::tasksummary|parent::warning">
15
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
16
xmlns:xlink='http://www.w3.org/1999/xlink'
17
xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks"
18
exclude-result-prefixes="xlink suwl"
21
<!-- ********************************************************************
22
$Id: inline.xsl 384406 2005-01-31 00:11:27Z raabe $
23
********************************************************************
25
This file is part of the XSL DocBook Stylesheet distribution.
26
See ../README or http://nwalsh.com/docbook/xsl/ for copyright
27
and other information.
29
******************************************************************** -->
31
<xsl:template name="simple.xlink">
32
<xsl:param name="node" select="."/>
33
<xsl:param name="content">
34
<xsl:apply-templates/>
37
<xsl:variable name="link">
39
<xsl:when test="$node/@xlink:href
40
and (not($node/@xlink:type) or $node/@xlink:type='simple')">
42
<xsl:if test="@xlink.title">
43
<xsl:attribute name="title">
44
<xsl:value-of select="@xlink:title"/>
48
<xsl:attribute name="href">
50
<!-- if the href starts with # and does not contain an "(" -->
51
<!-- or if the href starts with #xpointer(id(, it's just an ID -->
52
<xsl:when test="starts-with(@xlink:href,'#')
53
and (not(contains(@xlink:href,'('))
54
or starts-with(@xlink:href,'#xpointer(id('))">
55
<xsl:variable name="idref">
56
<xsl:call-template name="xpointer.idref">
57
<xsl:with-param name="xpointer" select="@xlink:href"/>
61
<xsl:variable name="targets" select="key('id',$idref)"/>
62
<xsl:variable name="target" select="$targets[1]"/>
64
<xsl:call-template name="check.id.unique">
65
<xsl:with-param name="linkend" select="@linkend"/>
69
<xsl:when test="count($target) = 0">
71
<xsl:text>XLink to nonexistent id: </xsl:text>
72
<xsl:value-of select="$idref"/>
74
<xsl:text>???</xsl:text>
77
<xsl:call-template name="href.target">
78
<xsl:with-param name="object" select="$target"/>
84
<!-- otherwise it's a URI -->
86
<xsl:value-of select="@xlink:href"/>
90
<xsl:copy-of select="$content"/>
94
<xsl:copy-of select="$content"/>
100
<xsl:when test="function-available('suwl:unwrapLinks')">
101
<xsl:copy-of select="suwl:unwrapLinks($link)"/>
104
<xsl:copy-of select="$link"/>
109
<xsl:template name="inline.charseq">
110
<xsl:param name="content">
111
<xsl:call-template name="anchor"/>
112
<xsl:call-template name="simple.xlink">
113
<xsl:with-param name="content">
114
<xsl:apply-templates/>
118
<span class="{local-name(.)}">
120
<xsl:attribute name="dir">
121
<xsl:value-of select="@dir"/>
124
<xsl:copy-of select="$content"/>
128
<xsl:template name="inline.monoseq">
129
<xsl:param name="content">
130
<xsl:call-template name="anchor"/>
131
<xsl:call-template name="simple.xlink">
132
<xsl:with-param name="content">
133
<xsl:apply-templates/>
137
<code class="{local-name(.)}">
139
<xsl:attribute name="dir">
140
<xsl:value-of select="@dir"/>
143
<xsl:copy-of select="$content"/>
147
<xsl:template name="inline.boldseq">
148
<xsl:param name="content">
149
<xsl:call-template name="anchor"/>
150
<xsl:call-template name="simple.xlink">
151
<xsl:with-param name="content">
152
<xsl:apply-templates/>
159
<xsl:attribute name="dir">
160
<xsl:value-of select="@dir"/>
164
<!-- don't put <strong> inside figure, example, or table titles -->
166
<xsl:when test="local-name(..) = 'title'
167
and (local-name(../..) = 'figure'
168
or local-name(../..) = 'example'
169
or local-name(../..) = 'table')">
170
<xsl:copy-of select="$content"/>
173
<strong class="{local-name(.)}">
174
<xsl:copy-of select="$content"/>
181
<xsl:template name="inline.italicseq">
182
<xsl:param name="content">
183
<xsl:call-template name="anchor"/>
184
<xsl:call-template name="simple.xlink">
185
<xsl:with-param name="content">
186
<xsl:apply-templates/>
190
<em class="{local-name(.)}">
192
<xsl:attribute name="dir">
193
<xsl:value-of select="@dir"/>
196
<xsl:copy-of select="$content"/>
200
<xsl:template name="inline.boldmonoseq">
201
<xsl:param name="content">
202
<xsl:call-template name="anchor"/>
203
<xsl:call-template name="simple.xlink">
204
<xsl:with-param name="content">
205
<xsl:apply-templates/>
209
<!-- don't put <strong> inside figure, example, or table titles -->
210
<!-- or other titles that may already be represented with <strong>'s. -->
212
<xsl:when test="local-name(..) = 'title'
213
and (local-name(../..) = 'figure'
214
or local-name(../..) = 'example'
215
or local-name(../..) = 'table'
216
or local-name(../..) = 'formalpara')">
217
<code class="{local-name(.)}">
219
<xsl:attribute name="dir">
220
<xsl:value-of select="@dir"/>
223
<xsl:copy-of select="$content"/>
227
<strong class="{local-name(.)}">
230
<xsl:attribute name="dir">
231
<xsl:value-of select="@dir"/>
234
<xsl:copy-of select="$content"/>
241
<xsl:template name="inline.italicmonoseq">
242
<xsl:param name="content">
243
<xsl:call-template name="anchor"/>
244
<xsl:call-template name="simple.xlink">
245
<xsl:with-param name="content">
246
<xsl:apply-templates/>
250
<em class="{local-name(.)}">
253
<xsl:attribute name="dir">
254
<xsl:value-of select="@dir"/>
257
<xsl:copy-of select="$content"/>
262
<xsl:template name="inline.superscriptseq">
263
<xsl:param name="content">
264
<xsl:call-template name="anchor"/>
265
<xsl:call-template name="simple.xlink">
266
<xsl:with-param name="content">
267
<xsl:apply-templates/>
273
<xsl:attribute name="dir">
274
<xsl:value-of select="@dir"/>
277
<xsl:copy-of select="$content"/>
281
<xsl:template name="inline.subscriptseq">
282
<xsl:param name="content">
283
<xsl:call-template name="anchor"/>
284
<xsl:call-template name="simple.xlink">
285
<xsl:with-param name="content">
286
<xsl:apply-templates/>
292
<xsl:attribute name="dir">
293
<xsl:value-of select="@dir"/>
296
<xsl:copy-of select="$content"/>
300
<!-- ==================================================================== -->
301
<!-- some special cases -->
303
<xsl:template match="author">
304
<span class="{name(.)}">
305
<xsl:call-template name="anchor"/>
306
<xsl:call-template name="person.name"/>
310
<xsl:template match="editor">
311
<span class="{name(.)}">
312
<xsl:call-template name="anchor"/>
313
<xsl:call-template name="person.name"/>
317
<xsl:template match="othercredit">
318
<span class="{name(.)}">
319
<xsl:call-template name="anchor"/>
320
<xsl:call-template name="person.name"/>
324
<xsl:template match="authorinitials">
325
<xsl:call-template name="inline.charseq"/>
328
<!-- ==================================================================== -->
330
<xsl:template match="accel">
331
<xsl:call-template name="inline.charseq"/>
334
<xsl:template match="action">
335
<xsl:call-template name="inline.charseq"/>
338
<xsl:template match="application">
339
<xsl:call-template name="inline.charseq"/>
342
<xsl:template match="classname">
343
<xsl:call-template name="inline.monoseq"/>
346
<xsl:template match="exceptionname">
347
<xsl:call-template name="inline.monoseq"/>
350
<xsl:template match="interfacename">
351
<xsl:call-template name="inline.monoseq"/>
354
<xsl:template match="methodname">
355
<xsl:call-template name="inline.monoseq"/>
358
<xsl:template match="command">
359
<xsl:call-template name="inline.boldseq"/>
362
<xsl:template match="computeroutput">
363
<xsl:call-template name="inline.monoseq"/>
366
<xsl:template match="constant">
367
<xsl:call-template name="inline.monoseq"/>
370
<xsl:template match="database">
371
<xsl:call-template name="inline.charseq"/>
374
<xsl:template match="errorcode">
375
<xsl:call-template name="inline.charseq"/>
378
<xsl:template match="errorname">
379
<xsl:call-template name="inline.charseq"/>
382
<xsl:template match="errortype">
383
<xsl:call-template name="inline.charseq"/>
386
<xsl:template match="errortext">
387
<xsl:call-template name="inline.charseq"/>
390
<xsl:template match="envar">
391
<xsl:call-template name="inline.monoseq"/>
394
<xsl:template match="filename">
395
<xsl:call-template name="inline.monoseq"/>
398
<xsl:template match="function">
400
<xsl:when test="$function.parens != '0'
401
and (parameter or function or replaceable)">
402
<xsl:variable name="nodes" select="text()|*"/>
403
<xsl:call-template name="inline.monoseq">
404
<xsl:with-param name="content">
405
<xsl:call-template name="simple.xlink">
406
<xsl:with-param name="content">
407
<xsl:apply-templates select="$nodes[1]"/>
412
<xsl:text>(</xsl:text>
413
<xsl:apply-templates select="$nodes[position()>1]"/>
414
<xsl:text>)</xsl:text>
417
<xsl:call-template name="inline.monoseq"/>
422
<xsl:template match="function/parameter" priority="2">
423
<xsl:call-template name="inline.italicmonoseq"/>
424
<xsl:if test="following-sibling::*">
425
<xsl:text>, </xsl:text>
429
<xsl:template match="function/replaceable" priority="2">
430
<xsl:call-template name="inline.italicmonoseq"/>
431
<xsl:if test="following-sibling::*">
432
<xsl:text>, </xsl:text>
436
<xsl:template match="guibutton">
437
<xsl:call-template name="inline.charseq"/>
440
<xsl:template match="guiicon">
441
<xsl:call-template name="inline.charseq"/>
444
<xsl:template match="guilabel">
445
<xsl:call-template name="inline.charseq"/>
448
<xsl:template match="guimenu">
449
<xsl:call-template name="inline.charseq"/>
452
<xsl:template match="guimenuitem">
453
<xsl:call-template name="inline.charseq"/>
456
<xsl:template match="guisubmenu">
457
<xsl:call-template name="inline.charseq"/>
460
<xsl:template match="hardware">
461
<xsl:call-template name="inline.charseq"/>
464
<xsl:template match="interface">
465
<xsl:call-template name="inline.charseq"/>
468
<xsl:template match="interfacedefinition">
469
<xsl:call-template name="inline.charseq"/>
472
<xsl:template match="keycap">
473
<xsl:call-template name="inline.boldseq"/>
476
<xsl:template match="keycode">
477
<xsl:call-template name="inline.charseq"/>
480
<xsl:template match="keysym">
481
<xsl:call-template name="inline.charseq"/>
484
<xsl:template match="literal">
485
<xsl:call-template name="inline.monoseq"/>
488
<xsl:template match="code">
489
<xsl:call-template name="inline.monoseq"/>
492
<xsl:template match="medialabel">
493
<xsl:call-template name="inline.italicseq"/>
496
<xsl:template match="shortcut">
497
<xsl:call-template name="inline.boldseq"/>
500
<xsl:template match="mousebutton">
501
<xsl:call-template name="inline.charseq"/>
504
<xsl:template match="option">
505
<xsl:call-template name="inline.monoseq"/>
508
<xsl:template match="package">
509
<xsl:call-template name="inline.charseq"/>
512
<xsl:template match="parameter">
513
<xsl:call-template name="inline.italicmonoseq"/>
516
<xsl:template match="property">
517
<xsl:call-template name="inline.charseq"/>
520
<xsl:template match="prompt">
521
<xsl:call-template name="inline.monoseq"/>
524
<xsl:template match="replaceable" priority="1">
525
<xsl:call-template name="inline.italicmonoseq"/>
528
<xsl:template match="returnvalue">
529
<xsl:call-template name="inline.charseq"/>
532
<xsl:template match="structfield">
533
<xsl:call-template name="inline.italicmonoseq"/>
536
<xsl:template match="structname">
537
<xsl:call-template name="inline.charseq"/>
540
<xsl:template match="symbol">
541
<xsl:call-template name="inline.charseq"/>
544
<xsl:template match="systemitem">
545
<xsl:call-template name="inline.monoseq"/>
548
<xsl:template match="token">
549
<xsl:call-template name="inline.charseq"/>
552
<xsl:template match="type">
553
<xsl:call-template name="inline.charseq"/>
556
<xsl:template match="userinput">
557
<xsl:call-template name="inline.boldmonoseq"/>
560
<xsl:template match="abbrev">
561
<xsl:call-template name="inline.charseq"/>
564
<xsl:template match="acronym">
565
<xsl:call-template name="inline.charseq"/>
568
<xsl:template match="citerefentry">
570
<xsl:when test="$citerefentry.link != '0'">
572
<xsl:attribute name="href">
573
<xsl:call-template name="generate.citerefentry.link"/>
575
<xsl:call-template name="inline.charseq"/>
579
<xsl:call-template name="inline.charseq"/>
584
<xsl:template name="generate.citerefentry.link">
588
<xsl:template name="x.generate.citerefentry.link">
589
<xsl:text>http://example.com/cgi-bin/man.cgi?</xsl:text>
590
<xsl:value-of select="refentrytitle"/>
591
<xsl:text>(</xsl:text>
592
<xsl:value-of select="manvolnum"/>
593
<xsl:text>)</xsl:text>
596
<xsl:template match="citetitle">
598
<xsl:when test="@pubwork = 'article'">
599
<xsl:call-template name="gentext.startquote"/>
600
<xsl:call-template name="inline.charseq"/>
601
<xsl:call-template name="gentext.endquote"/>
604
<xsl:call-template name="inline.italicseq"/>
609
<xsl:template match="emphasis">
612
<xsl:when test="@role and $emphasis.propagates.style != 0">
613
<xsl:attribute name="class">
614
<xsl:value-of select="@role"/>
618
<xsl:attribute name="class">
619
<xsl:text>emphasis</xsl:text>
623
<xsl:call-template name="anchor"/>
625
<xsl:call-template name="simple.xlink">
626
<xsl:with-param name="content">
628
<xsl:when test="@role = 'bold' or @role='strong'">
629
<!-- backwards compatibility: make bold into b elements, but -->
630
<!-- don't put bold inside figure, example, or table titles -->
632
<xsl:when test="local-name(..) = 'title'
633
and (local-name(../..) = 'figure'
634
or local-name(../..) = 'example'
635
or local-name(../..) = 'table')">
636
<xsl:apply-templates/>
639
<strong><xsl:apply-templates/></strong>
643
<xsl:when test="@role and $emphasis.propagates.style != 0">
644
<xsl:apply-templates/>
647
<em><xsl:apply-templates/></em>
655
<xsl:template match="foreignphrase">
656
<span class="foreignphrase">
657
<xsl:if test="@lang or @xml:lang">
658
<xsl:call-template name="language.attribute"/>
660
<xsl:call-template name="inline.italicseq"/>
664
<xsl:template match="markup">
665
<xsl:call-template name="inline.charseq"/>
668
<xsl:template match="phrase">
670
<xsl:if test="@lang or @xml:lang">
671
<xsl:call-template name="language.attribute"/>
673
<xsl:if test="@role and $phrase.propagates.style != 0">
674
<xsl:attribute name="class">
675
<xsl:value-of select="@role"/>
678
<xsl:call-template name="anchor"/>
679
<xsl:call-template name="simple.xlink">
680
<xsl:with-param name="content">
681
<xsl:apply-templates/>
687
<xsl:template match="quote">
688
<xsl:variable name="depth">
689
<xsl:call-template name="dot.count">
690
<xsl:with-param name="string"><xsl:number level="multiple"/></xsl:with-param>
694
<xsl:when test="$depth mod 2 = 0">
695
<xsl:call-template name="gentext.startquote"/>
696
<xsl:call-template name="inline.charseq"/>
697
<xsl:call-template name="gentext.endquote"/>
700
<xsl:call-template name="gentext.nestedstartquote"/>
701
<xsl:call-template name="inline.charseq"/>
702
<xsl:call-template name="gentext.nestedendquote"/>
707
<xsl:template match="varname">
708
<xsl:call-template name="inline.monoseq"/>
711
<xsl:template match="wordasword">
712
<xsl:call-template name="inline.italicseq"/>
715
<xsl:template match="lineannotation">
716
<em class="{local-name(.)}">
717
<xsl:call-template name="inline.charseq"/>
721
<xsl:template match="superscript">
722
<xsl:call-template name="inline.superscriptseq"/>
725
<xsl:template match="subscript">
726
<xsl:call-template name="inline.subscriptseq"/>
729
<xsl:template match="trademark">
730
<xsl:call-template name="inline.charseq"/>
732
<xsl:when test="@class = 'copyright'
733
or @class = 'registered'">
734
<xsl:call-template name="dingbat">
735
<xsl:with-param name="dingbat" select="@class"/>
738
<xsl:when test="@class = 'service'">
742
<xsl:call-template name="dingbat">
743
<xsl:with-param name="dingbat" select="'trademark'"/>
749
<xsl:template match="firstterm">
750
<xsl:call-template name="glossterm">
751
<xsl:with-param name="firstterm" select="1"/>
755
<xsl:template match="glossterm" name="glossterm">
756
<xsl:param name="firstterm" select="0"/>
758
<!-- To avoid extra <a name=""> anchor from inline.italicseq -->
759
<xsl:variable name="content">
760
<xsl:apply-templates/>
764
<xsl:when test="($firstterm.only.link = 0 or $firstterm = 1) and @linkend">
765
<xsl:variable name="targets" select="key('id',@linkend)"/>
766
<xsl:variable name="target" select="$targets[1]"/>
768
<xsl:call-template name="check.id.unique">
769
<xsl:with-param name="linkend" select="@linkend"/>
774
<xsl:attribute name="name">
775
<xsl:value-of select="@id"/>
779
<xsl:attribute name="href">
780
<xsl:call-template name="href.target">
781
<xsl:with-param name="object" select="$target"/>
785
<xsl:call-template name="inline.italicseq">
786
<xsl:with-param name="content" select="$content"/>
791
<xsl:when test="not(@linkend)
792
and ($firstterm.only.link = 0 or $firstterm = 1)
793
and ($glossterm.auto.link != 0)
794
and $glossary.collection != ''">
795
<xsl:variable name="term">
797
<xsl:when test="@baseform"><xsl:value-of select="@baseform"/></xsl:when>
798
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
802
<xsl:variable name="cterm"
803
select="(document($glossary.collection,.)//glossentry[glossterm=$term])[1]"/>
805
<!-- HACK HACK HACK! But it works... -->
806
<!-- You'd need to do more work if you wanted to chunk on glossdiv, though -->
808
<xsl:variable name="glossary" select="//glossary[@role='auto']"/>
810
<xsl:if test="count($glossary) != 1">
812
<xsl:text>Warning: glossary.collection specified, but there are </xsl:text>
813
<xsl:value-of select="count($glossary)"/>
814
<xsl:text> automatic glossaries</xsl:text>
818
<xsl:variable name="glosschunk">
819
<xsl:call-template name="href.target">
820
<xsl:with-param name="object" select="$glossary"/>
824
<xsl:variable name="chunkbase">
826
<xsl:when test="contains($glosschunk, '#')">
827
<xsl:value-of select="substring-before($glosschunk, '#')"/>
830
<xsl:value-of select="$glosschunk"/>
836
<xsl:when test="not($cterm)">
838
<xsl:text>There's no entry for </xsl:text>
839
<xsl:value-of select="$term"/>
840
<xsl:text> in </xsl:text>
841
<xsl:value-of select="$glossary.collection"/>
843
<xsl:call-template name="inline.italicseq"/>
846
<xsl:variable name="id">
848
<xsl:when test="$cterm/@id">
849
<xsl:value-of select="$cterm/@id"/>
852
<xsl:value-of select="generate-id($cterm)"/>
856
<a href="{$chunkbase}#{$id}">
857
<xsl:call-template name="inline.italicseq">
858
<xsl:with-param name="content" select="$content"/>
865
<xsl:when test="not(@linkend)
866
and ($firstterm.only.link = 0 or $firstterm = 1)
867
and $glossterm.auto.link != 0">
868
<xsl:variable name="term">
870
<xsl:when test="@baseform">
871
<xsl:value-of select="normalize-space(@baseform)"/>
874
<xsl:value-of select="normalize-space(.)"/>
878
<xsl:variable name="targets"
879
select="//glossentry[normalize-space(glossterm)=$term
880
or normalize-space(glossterm/@baseform)=$term]"/>
881
<xsl:variable name="target" select="$targets[1]"/>
884
<xsl:when test="count($targets)=0">
886
<xsl:text>Error: no glossentry for glossterm: </xsl:text>
887
<xsl:value-of select="."/>
888
<xsl:text>.</xsl:text>
890
<xsl:call-template name="inline.italicseq"/>
895
<xsl:attribute name="name">
896
<xsl:value-of select="@id"/>
900
<xsl:attribute name="href">
901
<xsl:call-template name="href.target">
902
<xsl:with-param name="object" select="$target"/>
906
<xsl:call-template name="inline.italicseq">
907
<xsl:with-param name="content" select="$content"/>
915
<xsl:call-template name="inline.italicseq"/>
920
<xsl:template match="sgmltag|tag">
921
<xsl:call-template name="format.sgmltag"/>
924
<xsl:template name="format.sgmltag">
925
<xsl:param name="class">
927
<xsl:when test="@class">
928
<xsl:value-of select="@class"/>
930
<xsl:otherwise>element</xsl:otherwise>
934
<code class="sgmltag-{$class}">
936
<xsl:when test="$class='attribute'">
937
<xsl:apply-templates/>
939
<xsl:when test="$class='attvalue'">
940
<xsl:apply-templates/>
942
<xsl:when test="$class='element'">
943
<xsl:apply-templates/>
945
<xsl:when test="$class='endtag'">
946
<xsl:text></</xsl:text>
947
<xsl:apply-templates/>
948
<xsl:text>></xsl:text>
950
<xsl:when test="$class='genentity'">
951
<xsl:text>&</xsl:text>
952
<xsl:apply-templates/>
953
<xsl:text>;</xsl:text>
955
<xsl:when test="$class='numcharref'">
956
<xsl:text>&#</xsl:text>
957
<xsl:apply-templates/>
958
<xsl:text>;</xsl:text>
960
<xsl:when test="$class='paramentity'">
961
<xsl:text>%</xsl:text>
962
<xsl:apply-templates/>
963
<xsl:text>;</xsl:text>
965
<xsl:when test="$class='pi'">
966
<xsl:text><?</xsl:text>
967
<xsl:apply-templates/>
968
<xsl:text>></xsl:text>
970
<xsl:when test="$class='xmlpi'">
971
<xsl:text><?</xsl:text>
972
<xsl:apply-templates/>
973
<xsl:text>?></xsl:text>
975
<xsl:when test="$class='starttag'">
976
<xsl:text><</xsl:text>
977
<xsl:apply-templates/>
978
<xsl:text>></xsl:text>
980
<xsl:when test="$class='emptytag'">
981
<xsl:text><</xsl:text>
982
<xsl:apply-templates/>
983
<xsl:text>/></xsl:text>
985
<xsl:when test="$class='sgmlcomment'">
986
<xsl:text><!--</xsl:text>
987
<xsl:apply-templates/>
988
<xsl:text>--></xsl:text>
991
<xsl:apply-templates/>
997
<xsl:template match="email">
998
<xsl:call-template name="inline.monoseq">
999
<xsl:with-param name="content">
1000
<xsl:text><</xsl:text>
1002
<xsl:attribute name="href">mailto:<xsl:value-of select="."/></xsl:attribute>
1003
<xsl:apply-templates/>
1005
<xsl:text>></xsl:text>
1007
</xsl:call-template>
1010
<xsl:template match="keycombo">
1011
<xsl:variable name="action" select="@action"/>
1012
<xsl:variable name="joinchar">
1014
<xsl:when test="$action='seq'"><xsl:text> </xsl:text></xsl:when>
1015
<xsl:when test="$action='simul'">+</xsl:when>
1016
<xsl:when test="$action='press'">-</xsl:when>
1017
<xsl:when test="$action='click'">-</xsl:when>
1018
<xsl:when test="$action='double-click'">-</xsl:when>
1019
<xsl:when test="$action='other'"></xsl:when>
1020
<xsl:otherwise>-</xsl:otherwise>
1023
<xsl:for-each select="*">
1024
<xsl:if test="position()>1"><xsl:value-of select="$joinchar"/></xsl:if>
1025
<xsl:apply-templates select="."/>
1029
<xsl:template match="uri">
1030
<xsl:call-template name="inline.monoseq"/>
1033
<!-- ==================================================================== -->
1035
<xsl:template match="menuchoice">
1036
<xsl:variable name="shortcut" select="./shortcut"/>
1037
<xsl:call-template name="process.menuchoice"/>
1038
<xsl:if test="$shortcut">
1039
<xsl:text> (</xsl:text>
1040
<xsl:apply-templates select="$shortcut"/>
1041
<xsl:text>)</xsl:text>
1045
<xsl:template name="process.menuchoice">
1046
<xsl:param name="nodelist" select="guibutton|guiicon|guilabel|guimenu|guimenuitem|guisubmenu|interface"/><!-- not(shortcut) -->
1047
<xsl:param name="count" select="1"/>
1050
<xsl:when test="$count>count($nodelist)"></xsl:when>
1051
<xsl:when test="$count=1">
1052
<xsl:apply-templates select="$nodelist[$count=position()]"/>
1053
<xsl:call-template name="process.menuchoice">
1054
<xsl:with-param name="nodelist" select="$nodelist"/>
1055
<xsl:with-param name="count" select="$count+1"/>
1056
</xsl:call-template>
1059
<xsl:variable name="node" select="$nodelist[$count=position()]"/>
1061
<xsl:when test="name($node)='guimenuitem'
1062
or name($node)='guisubmenu'">
1063
<xsl:value-of select="$menuchoice.menu.separator"/>
1066
<xsl:value-of select="$menuchoice.separator"/>
1069
<xsl:apply-templates select="$node"/>
1070
<xsl:call-template name="process.menuchoice">
1071
<xsl:with-param name="nodelist" select="$nodelist"/>
1072
<xsl:with-param name="count" select="$count+1"/>
1073
</xsl:call-template>
1078
<!-- ==================================================================== -->
1080
<xsl:template match="optional">
1081
<xsl:value-of select="$arg.choice.opt.open.str"/>
1082
<xsl:call-template name="inline.charseq"/>
1083
<xsl:value-of select="$arg.choice.opt.close.str"/>
1086
<xsl:template match="citation">
1087
<!-- todo: biblio-citation-check -->
1088
<xsl:text>[</xsl:text>
1089
<xsl:call-template name="inline.charseq"/>
1090
<xsl:text>]</xsl:text>
1093
<!-- ==================================================================== -->
1095
<xsl:template match="comment[&comment.block.parents;]|remark[&comment.block.parents;]">
1096
<xsl:if test="$show.comments != 0">
1097
<p class="remark"><i><xsl:call-template name="inline.charseq"/></i></p>
1101
<xsl:template match="comment|remark">
1102
<xsl:if test="$show.comments != 0">
1103
<em><xsl:call-template name="inline.charseq"/></em>
1107
<!-- ==================================================================== -->
1109
<xsl:template match="productname">
1110
<xsl:call-template name="inline.charseq"/>
1111
<xsl:if test="@class">
1112
<xsl:call-template name="dingbat">
1113
<xsl:with-param name="dingbat" select="@class"/>
1114
</xsl:call-template>
1118
<xsl:template match="productnumber">
1119
<xsl:call-template name="inline.charseq"/>
1122
<!-- ==================================================================== -->
1124
<xsl:template match="pob|street|city|state|postcode|country|otheraddr">
1125
<xsl:call-template name="inline.charseq"/>
1128
<xsl:template match="phone|fax">
1129
<xsl:call-template name="inline.charseq"/>
1132
<!-- in Addresses, for example -->
1133
<xsl:template match="honorific|firstname|surname|lineage|othername">
1134
<xsl:call-template name="inline.charseq"/>
1137
<!-- ==================================================================== -->
1139
<xsl:template match="personname">
1140
<xsl:call-template name="anchor"/>
1141
<xsl:call-template name="person.name"/>
1144
<!-- ==================================================================== -->
1146
<xsl:template match="beginpage">
1147
<!-- does nothing; this *is not* markup to force a page break. -->