1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
<!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- ISC customizations for Docbook-XSL manual page generator. -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:db="http://docbook.org/ns/docbook">
<!-- Import the Docbook manpages stuff -->
<xsl:include href="@XSLT_DOCBOOK_STYLE_MAN@"/>
<!-- Include our copyright generator -->
<xsl:include href="copyright.xsl"/>
<!-- Set comment string for this output format -->
<xsl:param name="isc.copyright.leader">.\" </xsl:param>
<xsl:param name="isc.copyright.breakline"/>
<!-- We're not writing any kind of SGML, thanks -->
<xsl:output method="text" encoding="us-ascii" indent="no"/>
<!-- ANSI C function prototypes, please -->
<xsl:param name="funcsynopsis.style">ansi</xsl:param>
<!-- Use ranges when constructing copyrights -->
<xsl:param name="make.year.ranges" select="1"/>
<!-- Stuff we want in our nroff preamble. -->
<xsl:variable name="isc.nroff.preamble">
<xsl:text>.\" </xsl:text>
<xsl:text>.hy 0 </xsl:text>
<xsl:text>.ad l </xsl:text>
</xsl:variable>
<!--
- Override Docbook template to insert our copyright,
- disable chunking, and suppress output of .so files.
-->
<xsl:template name="write.text.chunk">
<xsl:param name="content"/>
<xsl:if test="substring($content, 1, 4) != '.so ' or
substring-after($content, ' ') != ''">
<xsl:call-template name="isc.no.blanks">
<xsl:with-param name="text" select="
concat($isc.copyright,
$isc.nroff.preamble,
$content)"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<!--
- Suppress blank lines in nroff source we output.
-->
<xsl:template name="isc.no.blanks">
<xsl:param name="text"/>
<xsl:choose>
<xsl:when test="contains($text, ' ')">
<xsl:call-template name="isc.no.blanks">
<xsl:with-param name="text"
select="substring-before($text, ' ')"/>
</xsl:call-template>
<xsl:call-template name="isc.no.blanks">
<xsl:with-param name="text"
select="substring-after($text, ' ')"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="translate($text, '	 ', '')">
<xsl:value-of select="$text"/>
<xsl:text> </xsl:text>
</xsl:when>
</xsl:choose>
</xsl:template>
<!--
- Override Docbook template to change formatting.
- We just want the element name in boldface, no subsection header.
-->
<xsl:template match="caution|important|note|tip|warning">
<xsl:text> .RS .B "</xsl:text>
<!-- capitalize word -->
<xsl:value-of
select="translate (substring (name(.), 1, 1), 'cintw', 'CINTW')" />
<xsl:value-of select="substring (name(), 2)" />
<xsl:if test="title">
<xsl:text>: </xsl:text>
<xsl:value-of select="title[1]"/>
</xsl:if>
<xsl:text>:" </xsl:text>
<xsl:apply-templates/>
<xsl:text> .RE </xsl:text>
</xsl:template>
<!--
- Override template to change formatting.
- We don't want hyphenation or justification.
-->
<xsl:template match="cmdsynopsis">
<xsl:text>.HP </xsl:text>
<xsl:value-of select="string-length (normalize-space (command)) + 1"/>
<xsl:text> </xsl:text>
<xsl:apply-templates/>
<xsl:text> </xsl:text>
</xsl:template>
<!--
- Override template to change formatting.
- We don't want hyphenation or justification.
-->
<xsl:template match="funcsynopsis">
<xsl:apply-templates/>
</xsl:template>
<!--
- Override template to change formatting.
- Line breaks in funcsynopsisinfo are significant.
-->
<xsl:template match="funcsynopsisinfo">
<xsl:text> .nf </xsl:text>
<xsl:apply-templates/>
<xsl:text> .fi </xsl:text>
</xsl:template>
</xsl:stylesheet>
<!--
- Local variables:
- mode: sgml
- End:
-->
|