2 - Copyright (C) 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
4 - Permission to use, copy, modify, and/or 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.9 2007/06/18 23:47:34 tbox 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:param name="content"/>
56 <xsl:if test="substring($content, 1, 4) != '.so ' or
57 substring-after($content, ' ') != ''">
58 <xsl:call-template name="isc.no.blanks">
59 <xsl:with-param name="text" select="
60 concat($isc.copyright,
68 - Suppress blank lines in nroff source we output.
70 <xsl:template name="isc.no.blanks">
71 <xsl:param name="text"/>
73 <xsl:when test="contains($text, ' ')">
74 <xsl:call-template name="isc.no.blanks">
75 <xsl:with-param name="text"
76 select="substring-before($text, ' ')"/>
78 <xsl:call-template name="isc.no.blanks">
79 <xsl:with-param name="text"
80 select="substring-after($text, ' ')"/>
83 <xsl:when test="translate($text, '	 ', '')">
84 <xsl:value-of select="$text"/>
85 <xsl:text> </xsl:text>
91 - Override Docbook template to change formatting.
92 - We just want the element name in boldface, no subsection header.
94 <xsl:template match="caution|important|note|tip|warning">
95 <xsl:text> .RS .B "</xsl:text>
96 <!-- capitalize word -->
98 select="translate (substring (name(.), 1, 1), 'cintw', 'CINTW')" />
99 <xsl:value-of select="substring (name(), 2)" />
100 <xsl:if test="title">
101 <xsl:text>: </xsl:text>
102 <xsl:value-of select="title[1]"/>
104 <xsl:text>:" </xsl:text>
105 <xsl:apply-templates/>
106 <xsl:text> .RE </xsl:text>
110 - Override template to change formatting.
111 - We don't want hyphenation or justification.
113 <xsl:template match="cmdsynopsis">
114 <xsl:text>.HP </xsl:text>
115 <xsl:value-of select="string-length (normalize-space (command)) + 1"/>
116 <xsl:text> </xsl:text>
117 <xsl:apply-templates/>
118 <xsl:text> </xsl:text>
122 - Override template to change formatting.
123 - We don't want hyphenation or justification.
125 <xsl:template match="funcsynopsis">
126 <xsl:apply-templates/>
130 - Override template to change formatting.
131 - Line breaks in funcsynopsisinfo are significant.
133 <xsl:template match="funcsynopsisinfo">
134 <xsl:text> .nf </xsl:text>
135 <xsl:apply-templates/>
136 <xsl:text> .fi </xsl:text>