1 | <?xml version='1.0'?>
|
---|
2 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
3 | xmlns:exsl="http://exslt.org/common"
|
---|
4 | version='1.0'>
|
---|
5 |
|
---|
6 | <!-- ********************************************************************
|
---|
7 | $Id: inline.xsl,v 1.12 2005/07/13 03:57:50 xmldoc Exp $
|
---|
8 | ********************************************************************
|
---|
9 |
|
---|
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.
|
---|
13 |
|
---|
14 | ******************************************************************** -->
|
---|
15 |
|
---|
16 | <!-- ==================================================================== -->
|
---|
17 |
|
---|
18 | <xsl:template match="replaceable|varname">
|
---|
19 | <xsl:if test="$man.hyphenate.computer.inlines = 0">
|
---|
20 | <xsl:call-template name="suppress.hyphenation"/>
|
---|
21 | </xsl:if>
|
---|
22 | <xsl:apply-templates mode="italic" select="."/>
|
---|
23 | </xsl:template>
|
---|
24 |
|
---|
25 | <xsl:template match="option|userinput|envar|errorcode|constant|type">
|
---|
26 | <xsl:if test="$man.hyphenate.computer.inlines = 0">
|
---|
27 | <xsl:call-template name="suppress.hyphenation"/>
|
---|
28 | </xsl:if>
|
---|
29 | <xsl:apply-templates mode="bold" select="."/>
|
---|
30 | </xsl:template>
|
---|
31 |
|
---|
32 | <xsl:template match="classname">
|
---|
33 | <xsl:if test="$man.hyphenate.computer.inlines = 0">
|
---|
34 | <xsl:call-template name="suppress.hyphenation"/>
|
---|
35 | </xsl:if>
|
---|
36 | <xsl:apply-templates/>
|
---|
37 | </xsl:template>
|
---|
38 |
|
---|
39 | <xsl:template match="filename">
|
---|
40 | <!-- * add hyphenation suppression in Filename output only if -->
|
---|
41 | <!-- * break.after.slash is also non-zero -->
|
---|
42 | <xsl:if test="$man.hyphenate.filenames = 0 and
|
---|
43 | $man.break.after.slash = 0">
|
---|
44 | <xsl:call-template name="suppress.hyphenation"/>
|
---|
45 | </xsl:if>
|
---|
46 | <xsl:apply-templates mode="italic" select="."/>
|
---|
47 | </xsl:template>
|
---|
48 |
|
---|
49 | <xsl:template match="emphasis">
|
---|
50 | <xsl:choose>
|
---|
51 | <xsl:when test="@role = 'bold' or @role = 'strong'">
|
---|
52 | <xsl:apply-templates mode="bold" select="."/>
|
---|
53 | </xsl:when>
|
---|
54 | <xsl:otherwise>
|
---|
55 | <xsl:apply-templates mode="italic" select="."/>
|
---|
56 | </xsl:otherwise>
|
---|
57 | </xsl:choose>
|
---|
58 | </xsl:template>
|
---|
59 |
|
---|
60 | <xsl:template match="optional">
|
---|
61 | <xsl:value-of select="$arg.choice.opt.open.str"/>
|
---|
62 | <xsl:apply-templates/>
|
---|
63 | <xsl:value-of select="$arg.choice.opt.close.str"/>
|
---|
64 | </xsl:template>
|
---|
65 |
|
---|
66 | <xsl:template name="do-citerefentry">
|
---|
67 | <xsl:param name="refentrytitle" select="''"/>
|
---|
68 | <xsl:param name="manvolnum" select="''"/>
|
---|
69 | <xsl:variable name="title">
|
---|
70 | <bold><xsl:value-of select="$refentrytitle"/></bold>
|
---|
71 | </xsl:variable>
|
---|
72 | <xsl:apply-templates mode="bold" select="exsl:node-set($title)"/>
|
---|
73 | <xsl:text>(</xsl:text>
|
---|
74 | <xsl:value-of select="$manvolnum"/>
|
---|
75 | <xsl:text>)</xsl:text>
|
---|
76 | </xsl:template>
|
---|
77 |
|
---|
78 | <xsl:template match="citerefentry">
|
---|
79 | <xsl:call-template name="do-citerefentry">
|
---|
80 | <xsl:with-param name="refentrytitle" select="refentrytitle"/>
|
---|
81 | <xsl:with-param name="manvolnum" select="manvolnum"/>
|
---|
82 | </xsl:call-template>
|
---|
83 | </xsl:template>
|
---|
84 |
|
---|
85 | <xsl:template match="trademark|productname">
|
---|
86 | <xsl:apply-templates/>
|
---|
87 | <xsl:choose>
|
---|
88 | <!-- * Just use true Unicode chars for copyright, trademark, etc., -->
|
---|
89 | <!-- * symbols (by default, we later automatically translate them -->
|
---|
90 | <!-- * with the apply-string-subst-map template, or with the -->
|
---|
91 | <!-- * default character map, if man.charmap.enabled is true). -->
|
---|
92 | <xsl:when test="@class = 'copyright'">
|
---|
93 | <xsl:text>©</xsl:text>
|
---|
94 | </xsl:when>
|
---|
95 | <xsl:when test="@class = 'registered'">
|
---|
96 | <xsl:text>®</xsl:text>
|
---|
97 | </xsl:when>
|
---|
98 | <xsl:when test="@class = 'service'">
|
---|
99 | <xsl:text>℠</xsl:text>
|
---|
100 | </xsl:when>
|
---|
101 | <xsl:when test="self::trademark" >
|
---|
102 | <xsl:text>™</xsl:text>
|
---|
103 | </xsl:when>
|
---|
104 | <xsl:otherwise>
|
---|
105 | <!-- * don't render any default symbol after productname -->
|
---|
106 | </xsl:otherwise>
|
---|
107 | </xsl:choose>
|
---|
108 | </xsl:template>
|
---|
109 |
|
---|
110 | </xsl:stylesheet>
|
---|