2
- Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC")
4
- Permission to use, copy, modify, and distribute this software for any
5
- purpose with or without fee is hereby granted, provided that the above
6
- copyright notice and this permission notice appear in all copies.
8
- THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
17
<!-- $Id: isc-manpage.xsl.in,v 1.4.4.3 2005/09/12 00:05:27 marka Exp $ -->
19
<!-- ISC customizations for Docbook-XSL manual page generator. -->
21
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
23
<!-- Import the Docbook manpages stuff -->
24
<xsl:import href="@XSLT_DOCBOOK_STYLE_MAN@"/>
26
<!-- Include our copyright generator -->
27
<xsl:include href="copyright.xsl"/>
29
<!-- Set comment string for this output format -->
30
<xsl:param name="isc.copyright.leader">.\" </xsl:param>
32
<!-- We're not writing any kind of SGML, thanks -->
33
<xsl:output method="text" encoding="us-ascii"/>
35
<!-- ANSI C function prototypes, please -->
36
<xsl:param name="funcsynopsis.style">ansi</xsl:param>
38
<!-- Use ranges when constructing copyrights -->
39
<xsl:param name="make.year.ranges" select="1"/>
41
<!-- Stuff we want in our nroff preamble. -->
42
<xsl:variable name="isc.nroff.preamble">
43
<xsl:text>.\" </xsl:text>
44
<xsl:text>.\" $Id$ </xsl:text>
45
<xsl:text>.\" </xsl:text>
46
<xsl:text>.hy 0 </xsl:text>
47
<xsl:text>.ad l </xsl:text>
51
- Override Docbook template to insert our copyright,
52
- disable chunking, and suppress output of .so files.
54
<xsl:template name="write.text.chunk">
55
<xsl:if test="substring($content, 1, 4) != '.so ' or
56
substring-after($content, ' ') != ''">
57
<xsl:call-template name="isc.no.blanks">
58
<xsl:with-param name="text" select="
59
concat($isc.copyright,
67
- Suppress blank lines in nroff source we output.
69
<xsl:template name="isc.no.blanks">
70
<xsl:param name="text"/>
72
<xsl:when test="contains($text, ' ')">
73
<xsl:call-template name="isc.no.blanks">
74
<xsl:with-param name="text"
75
select="substring-before($text, ' ')"/>
77
<xsl:call-template name="isc.no.blanks">
78
<xsl:with-param name="text"
79
select="substring-after($text, ' ')"/>
82
<xsl:when test="translate($text, '	 ', '')">
83
<xsl:value-of select="$text"/>
84
<xsl:text> </xsl:text>
90
- Override Docbook template to change formatting.
91
- We just want the element name in boldface, no subsection header.
93
<xsl:template match="caution|important|note|tip|warning">
94
<xsl:text> .RS .B "</xsl:text>
95
<!-- capitalize word -->
97
select="translate (substring (name(.), 1, 1), 'cintw', 'CINTW')" />
98
<xsl:value-of select="substring (name(), 2)" />
100
<xsl:text>: </xsl:text>
101
<xsl:value-of select="title[1]"/>
103
<xsl:text>:" </xsl:text>
104
<xsl:apply-templates/>
105
<xsl:text> .RE </xsl:text>
109
- Override template to change formatting.
110
- We don't want hyphenation or justification.
112
<xsl:template match="cmdsynopsis">
113
<xsl:text>.HP </xsl:text>
114
<xsl:value-of select="string-length (normalize-space (command)) + 1"/>
115
<xsl:text> </xsl:text>
116
<xsl:apply-templates/>
117
<xsl:text> </xsl:text>
121
- Override template to change formatting.
122
- We don't want hyphenation or justification.
124
<xsl:template match="funcsynopsis">
125
<xsl:apply-templates/>
129
- Override template to change formatting.
130
- Line breaks in funcsynopsisinfo are significant.
132
<xsl:template match="funcsynopsisinfo">
133
<xsl:text> .nf </xsl:text>
134
<xsl:apply-templates/>
135
<xsl:text> .fi </xsl:text>