1 <?xml version=
"1.0" encoding=
"utf-8"?>
2 <xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
6 This file contains XSLT stylesheet customizations that are common to
7 all output formats (HTML, XSL-FO, man, etc.).
10 <xsl:include href=
"stylesheet-speedup-common.xsl" />
15 <xsl:param name="draft.mode">
17 <xsl:when test="contains($pg.version, 'devel')">yes</xsl:when>
18 <xsl:otherwise>no</xsl:otherwise>
23 <xsl:param name=
"show.comments">
25 <xsl:when test=
"contains($pg.version, 'devel')">1</xsl:when>
26 <xsl:otherwise>0</xsl:otherwise>
30 <xsl:param name=
"callout.graphics" select=
"'0'"></xsl:param>
31 <xsl:param name=
"glossentry.show.acronym">yes
</xsl:param>
32 <xsl:param name=
"toc.section.depth">2</xsl:param>
33 <xsl:param name=
"linenumbering.extension" select=
"'0'"></xsl:param>
34 <xsl:param name=
"section.autolabel" select=
"1"></xsl:param>
35 <xsl:param name=
"section.label.includes.component.label" select=
"1"></xsl:param>
36 <xsl:param name=
"refentry.generate.name" select=
"0"></xsl:param>
37 <xsl:param name=
"refentry.generate.title" select=
"1"></xsl:param>
38 <xsl:param name=
"refentry.xref.manvolnum" select=
"0"/>
39 <xsl:param name=
"formal.procedures" select=
"0"></xsl:param>
40 <xsl:param name=
"generate.consistent.ids" select=
"1"/>
41 <xsl:param name=
"punct.honorific" select=
"''"></xsl:param>
42 <xsl:param name=
"variablelist.term.break.after">1</xsl:param>
43 <xsl:param name=
"variablelist.term.separator"></xsl:param>
44 <xsl:param name=
"xref.with.number.and.title" select=
"0"></xsl:param>
47 This is the default setting, but putting it here makes sure the variable
48 exists even with older (<1.79) stylesheet versions, because it is used in
49 our customization layer.
51 <xsl:param name=
"autolink.index.see" select=
"1"/>
54 <!-- Change display of some elements -->
56 <xsl:template match=
"productname">
57 <xsl:call-template name=
"inline.charseq"/>
60 <!-- Render <returnvalue> with a right arrow then the type name -->
61 <!-- Avoid adding unnecessary white space in this template! -->
62 <xsl:template match=
"returnvalue">→ <xsl:call-template name=
"inline.monoseq"/></xsl:template>
64 <xsl:template match=
"structfield">
65 <xsl:call-template name=
"inline.monoseq"/>
68 <xsl:template match=
"structname">
69 <xsl:call-template name=
"inline.monoseq"/>
72 <xsl:template match=
"symbol">
73 <xsl:call-template name=
"inline.monoseq"/>
76 <xsl:template match=
"systemitem">
77 <xsl:call-template name=
"inline.charseq"/>
80 <xsl:template match=
"token">
81 <xsl:call-template name=
"inline.monoseq"/>
84 <xsl:template match=
"type">
85 <xsl:call-template name=
"inline.monoseq"/>
88 <xsl:template match=
"programlisting/emphasis">
89 <xsl:call-template name=
"inline.boldseq"/>
93 <!-- Special support for Tcl synopses -->
95 <xsl:template match=
"optional[@role='tcl']">
96 <xsl:text>?
</xsl:text>
97 <xsl:call-template name=
"inline.charseq"/>
98 <xsl:text>?
</xsl:text>
102 <!-- Support for generating xref link text to additional elements -->
104 <xsl:template match=
"command" mode=
"xref-to">
105 <xsl:apply-templates select=
"." mode=
"xref"/>
108 <xsl:template match=
"function" mode=
"xref-to">
109 <xsl:apply-templates select=
"." mode=
"xref"/>
114 Support for copying images to the output directory, so the output is self
117 <xsl:template name=
"write-image">
118 <xsl:variable name=
"input_filename">
119 <xsl:value-of select=
"imagedata/@fileref"/>
122 <!-- references images directly, without images/ -->
123 <xsl:variable name=
"output_filename">
124 <xsl:value-of select=
"concat($chunk.base.dir, substring-after($input_filename, '/'))"/>
127 <xsl:call-template name=
"write.chunk">
128 <xsl:with-param name=
"filename" select=
"$output_filename"/>
129 <xsl:with-param name=
"content" select=
"document($input_filename)"/>