2 <xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
3 xmlns:
exsl=
"http://exslt.org/common"
6 <!-- ********************************************************************
7 $Id: inline.xsl,v 1.1 2007/03/10 05:15:34 scott Exp $
8 ********************************************************************
10 This file is part of the XSL DocBook Stylesheet distribution.
11 See ../README or http://docbook.sf.net/release/xsl/current/ for
12 copyright and other information.
14 ******************************************************************** -->
16 <!-- ==================================================================== -->
18 <xsl:template match=
"replaceable|varname">
19 <xsl:if test=
"$man.hyphenate.computer.inlines = 0">
20 <xsl:call-template name=
"suppress.hyphenation"/>
22 <xsl:apply-templates mode=
"italic" select=
"."/>
25 <xsl:template match=
"option|userinput|envar|errorcode|constant|markup">
26 <xsl:if test=
"$man.hyphenate.computer.inlines = 0">
27 <xsl:call-template name=
"suppress.hyphenation"/>
29 <xsl:apply-templates mode=
"bold" select=
"."/>
32 <xsl:template match=
"classname">
33 <xsl:if test=
"$man.hyphenate.computer.inlines = 0">
34 <xsl:call-template name=
"suppress.hyphenation"/>
36 <xsl:apply-templates/>
39 <xsl:template match=
"command">
40 <xsl:if test=
"$man.hyphenate.computer.inlines = 0">
41 <xsl:call-template name=
"suppress.hyphenation"/>
43 <xsl:apply-templates mode=
"bold" select=
"."/>
46 <xsl:template match=
"type[not(ancestor::cmdsynopsis) and
47 not(ancestor::funcsynopsis)]">
48 <xsl:if test=
"$man.hyphenate.computer.inlines = 0">
49 <xsl:call-template name=
"suppress.hyphenation"/>
51 <xsl:apply-templates mode=
"bold" select=
"."/>
54 <xsl:template match=
"function[not(ancestor::cmdsynopsis) and
55 not(ancestor::funcsynopsis)]">
56 <xsl:if test=
"$man.hyphenate.computer.inlines = 0">
57 <xsl:call-template name=
"suppress.hyphenation"/>
59 <xsl:apply-templates mode=
"bold" select=
"."/>
62 <xsl:template match=
"parameter[not(ancestor::cmdsynopsis) and
63 not(ancestor::funcsynopsis)]">
64 <xsl:if test=
"$man.hyphenate.computer.inlines = 0">
65 <xsl:call-template name=
"suppress.hyphenation"/>
67 <xsl:apply-templates mode=
"italic" select=
"."/>
70 <xsl:template match=
"filename">
71 <!-- * add hyphenation suppression in Filename output only if -->
72 <!-- * break.after.slash is also non-zero -->
73 <xsl:if test=
"$man.hyphenate.filenames = 0 and
74 $man.break.after.slash = 0">
75 <xsl:call-template name=
"suppress.hyphenation"/>
77 <xsl:apply-templates mode=
"italic" select=
"."/>
80 <xsl:template match=
"emphasis">
82 <xsl:when test=
"@role = 'bold' or
85 <xsl:apply-templates mode=
"bold" select=
"."/>
88 <xsl:apply-templates mode=
"italic" select=
"."/>
93 <xsl:template match=
"optional">
94 <xsl:value-of select=
"$arg.choice.opt.open.str"/>
95 <xsl:apply-templates/>
96 <xsl:value-of select=
"$arg.choice.opt.close.str"/>
99 <xsl:template name=
"do-citerefentry">
100 <xsl:param name=
"refentrytitle" select=
"''"/>
101 <xsl:param name=
"manvolnum" select=
"''"/>
102 <xsl:variable name=
"title">
103 <bold><xsl:value-of select=
"$refentrytitle"/></bold>
105 <xsl:apply-templates mode=
"bold" select=
"exsl:node-set($title)"/>
106 <xsl:text>(
</xsl:text>
107 <xsl:value-of select=
"$manvolnum"/>
108 <xsl:text>)
</xsl:text>
111 <xsl:template match=
"citerefentry">
112 <xsl:call-template name=
"do-citerefentry">
113 <xsl:with-param name=
"refentrytitle" select=
"refentrytitle"/>
114 <xsl:with-param name=
"manvolnum" select=
"manvolnum"/>
118 <xsl:template match=
"trademark|productname">
119 <xsl:apply-templates/>
121 <!-- * Just use true Unicode chars for copyright, trademark, etc., -->
122 <!-- * symbols (by default, we later automatically translate them -->
123 <!-- * with the apply-string-subst-map template, or with the -->
124 <!-- * default character map, if man.charmap.enabled is true). -->
125 <xsl:when test=
"@class = 'copyright'">
126 <xsl:text>©</xsl:text>
128 <xsl:when test=
"@class = 'registered'">
129 <xsl:text>®</xsl:text>
131 <xsl:when test=
"@class = 'service'">
132 <xsl:text>℠</xsl:text>
134 <xsl:when test=
"@class = 'trade'">
135 <xsl:text>™</xsl:text>
137 <!-- * for Trademark element, render a trademark symbol by default -->
138 <!-- * even if no "class" value is specified -->
139 <xsl:when test=
"self::trademark" >
140 <xsl:text>™</xsl:text>
143 <!-- * otherwise we have a Productname with no value for the -->
144 <!-- * "class" attribute, so don't render any symbol by default -->
149 <!-- * span seems to sneak through into output sometimes, possibly due -->
150 <!-- * to failed Olink processing; so we need to catch it -->
151 <xsl:template match=
"span">
152 <xsl:apply-templates/>
155 <xsl:template match=
"inlinemediaobject">
156 <xsl:apply-templates/>