1 <?xml version=
"1.0" encoding=
"UTF-8"?>
3 <!-- This file is part of Shapes. -->
5 <!-- Shapes is free software: you can redistribute it and/or modify -->
6 <!-- it under the terms of the GNU General Public License as published by -->
7 <!-- the Free Software Foundation, either version 3 of the License, or -->
8 <!-- any later version. -->
10 <!-- Shapes is distributed in the hope that it will be useful, -->
11 <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
12 <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
13 <!-- GNU General Public License for more details. -->
15 <!-- You should have received a copy of the GNU General Public License -->
16 <!-- along with Shapes. If not, see <http://www.gnu.org/licenses/>. -->
18 <!-- Copyright 2008 Henrik Tidefelt -->
22 xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
23 xmlns=
"http://www.w3.org/1999/xhtml"
25 <xsl:output method=
"xml" indent=
"no"
26 doctype-system=
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
27 doctype-public=
"-//W3C//DTD XHTML 1.0 Strict//EN"
30 <xsl:include href=
"../../formats/html.xsl" />
31 <xsl:include href=
"../../formats/bindings-html.xsl" />
33 <xsl:template match=
"/man">
36 <title><xsl:apply-templates select=
"manhead/center-header" /></title>
37 <xsl:element name=
"link">
38 <xsl:attribute name=
"rel">stylesheet
</xsl:attribute>
39 <xsl:attribute name=
"href"><xsl:value-of select=
"/book/base/@href" />shapes.css
</xsl:attribute>
43 <xsl:call-template name=
"head-navigation" />
44 <xsl:apply-templates select=
"manhead" />
46 <xsl:for-each select=
"section">
49 <xsl:element name=
"a">
50 <xsl:attribute name=
"name"><xsl:call-template name=
"id-to-anchor-name"><xsl:with-param name=
"id"><xsl:value-of select=
"@id" /></xsl:with-param></xsl:call-template></xsl:attribute>
51 <h3><xsl:apply-templates select=
"title" /></h3>
55 <h3><xsl:apply-templates select=
"title" /></h3>
58 <xsl:apply-templates select=
"top/*" />
59 <xsl:apply-templates select=
"body/*" />
60 <xsl:for-each select=
"section">
63 <xsl:element name=
"a">
64 <xsl:attribute name=
"name"><xsl:call-template name=
"id-to-anchor-name"><xsl:with-param name=
"id"><xsl:value-of select=
"@id" /></xsl:with-param></xsl:call-template></xsl:attribute>
65 <h4><xsl:apply-templates select=
"title" /></h4>
69 <h4><xsl:apply-templates select=
"title" /></h4>
72 <xsl:apply-templates select=
"top/*" />
73 <xsl:apply-templates select=
"body/*" />
76 <xsl:call-template name=
"SF-placeholder" />
81 <xsl:template match=
"manhead">
82 <h2><xsl:apply-templates select=
"center-header" /></h2>
83 <div class=
"p">This page corresponds to the man page
<b><xsl:value-of select=
"@prog-name" /></b>(
<xsl:value-of select=
"@section" />), dated
<xsl:value-of select=
"@modification-date" />.
</div>
84 <div class=
"p"><em><b>Note:
</b> The examples here may be presented using characters that may not be available in the man page format. Hence, the examples may be presented differently in the man page.
</em></div>
87 <xsl:template match=
"synopsis-table">
88 <xsl:for-each select=
"synopsis-case">
89 <div class=
"p"><xsl:apply-templates/></div>
93 <xsl:template match=
"see-also-items">
95 <xsl:for-each select=
"see-also"><xsl:apply-templates/><xsl:text> </xsl:text></xsl:for-each>
98 <xsl:template match=
"manpage[@tool,@section]">
99 <xsl:element name=
"a"><xsl:attribute name=
"href">http://www.google.com/search?btnI=I%
27m%
20Feeling%
20Lucky
&q=%
22man%
20page%
22%
20%
22<xsl:value-of select=
"encode-for-uri(@tool)" />(
<xsl:value-of select=
"@section" />)%
22</xsl:attribute><b><xsl:value-of select=
"@tool" /></b>(
<xsl:value-of select=
"@section" />)
</xsl:element>
102 <xsl:template match=
"man-only">
103 <!-- Ignore in HTML output -->
106 <xsl:template match=
"env-variable-list">
107 <ul><xsl:apply-templates /></ul>
109 <xsl:template match=
"env-variable-item[@name]">
111 <xsl:element name=
"a">
112 <xsl:attribute name=
"name"><xsl:call-template name=
"env-var-to-anchor-name"><xsl:with-param name=
"id"><xsl:value-of select=
"@name" /></xsl:with-param></xsl:call-template></xsl:attribute>
113 <b><xsl:value-of select=
"@name" /></b>
115 <xsl:apply-templates select=
"description/*"/>
119 <xsl:template match=
"command-line-option-list">
120 <ul><xsl:apply-templates /></ul>
122 <xsl:template match=
"command-line-item">
124 <xsl:if test=
"./@id">
125 <xsl:element name=
"a">
126 <xsl:attribute name=
"name"><xsl:call-template name=
"id-to-anchor-name"><xsl:with-param name=
"id"><xsl:value-of select=
"@id" /></xsl:with-param></xsl:call-template></xsl:attribute>
129 <xsl:apply-templates select=
"parameters" />
130 <xsl:apply-templates select=
"nosep-parameter" />
131 <xsl:apply-templates select=
"description/*"/>
134 <xsl:template match=
"command-line-tolparam[@name]">
135 <xsl:variable name=
"tolname">
136 <xsl:value-of select=
"@name" />
138 <xsl:apply-templates select=
"/man/external/tolerance-parameter[@name=$tolname]" />
140 <xsl:template match=
"command-line-tolparam-remaining">
141 <xsl:for-each select=
"/man/external/tolerance-parameter">
142 <xsl:variable name=
"tolname">
143 <xsl:value-of select=
"@name" />
145 <xsl:if test=
"not(//command-line-tolparam[@name=$tolname])">
146 <xsl:apply-templates select=
"." />
151 <xsl:template match=
"command-line-item/parameters[@flag]">
152 <b><xsl:value-of select=
"@flag" /></b> <xsl:apply-templates /><br />
155 <xsl:template match=
"command-line-item/nosep-parameter[@flag]">
156 <b><xsl:value-of select=
"@flag" /></b><span class=
"program-param replacable"><xsl:value-of select=
"."/></span><br />
159 <xsl:template match=
"tolerance-parameter[@name]">
161 <xsl:apply-templates select=
"command-line-option-derived" />
162 <xsl:apply-templates select=
"command-line-option" />
163 <xsl:apply-templates select=
"description/*"/>
164 <div class=
"p">Default value:
<xsl:apply-templates select=
"default" /></div>
168 <xsl:template match=
"tolerance-parameter/command-line-option[@flag]">
169 <b><xsl:value-of select=
"@flag" /></b> <xsl:apply-templates /><br />
171 <xsl:template match=
"tolerance-parameter[@name]/command-line-option-derived">
172 <b>--
<xsl:value-of select=
"../@name" />=
</b><span class=
"program-param replacable"><xsl:value-of select=
"." /></span><br />
175 <xsl:template match=
"exit-code-list">
177 <xsl:apply-templates select=
"/man/external/exit-code" />
182 <xsl:template match=
"exit-code[@value]">
184 <b><xsl:apply-templates select=
"@value" /> —
<xsl:apply-templates select=
"short" /></b><br />
185 <xsl:apply-templates select=
"description/*" />
189 <xsl:template match=
"prog-name[@class='other']"><xsl:value-of select=
"." /></xsl:template>
190 <xsl:template match=
"prog-name"><b><xsl:value-of select=
"." /></b></xsl:template>
192 <xsl:template match=
"synopsis-case/replacable"><span class=
"program-param replacable"><xsl:value-of select=
"." /></span></xsl:template>
193 <xsl:template match=
"parameters/replacable"><span class=
"program-param replacable"><xsl:value-of select=
"." /></span></xsl:template>
194 <xsl:template match=
"command-line-option/replacable"><span class=
"program-param replacable"><xsl:value-of select=
"." /></span></xsl:template>