~andreserl/ubuntu/lucid/bind9/bind9-apport-533601

« back to all changes in this revision

Viewing changes to doc/xsl/isc-manpage.xsl.in

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2006-01-05 12:29:28 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060105122928-oih7ttkkmpb90q8q
Tags: 1:9.3.2-1
* New upstream
* use lsb-base for start/stop messages in init.d.
* switch to debhelper 4

Show diffs side-by-side

added added

removed removed

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