2453bc0b4e3ac29cff4251bc14832f1faa4edc12
[debian/amanda] / man / xslt / man.xsl.in
1 <?xml version='1.0'?>
2 <!-- vim:set sts=2 shiftwidth=2 syntax=xml: -->
3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4                 version='1.0'>
5
6
7 <!-- the @..@ is substituted by config.status to contain the XSL release selected
8      at configure time -->
9 <xsl:import href="http://docbook.sourceforge.net/release/xsl/@XSLREL@/manpages/docbook.xsl"/>
10
11 <xsl:import href="settings.xsl"/>
12
13 <xsl:param name="chunk.section.depth" select="0"/>
14 <xsl:param name="chunk.first.sections" select="1"/>
15 <xsl:param name="use.id.as.filename" select="0"/>
16
17 <!--
18     Our ulink stylesheet omits @url part if content was specified
19 -->
20 <xsl:template match="ulink">
21   <xsl:variable name="content">
22     <xsl:apply-templates/>
23   </xsl:variable>
24   <xsl:if test="$content = ''">
25     <xsl:text>: </xsl:text>
26   </xsl:if>
27   <xsl:if test="$content != ''">
28     <xsl:value-of select="$content" />
29   </xsl:if>
30   <xsl:if test="$content = ''">
31     <xsl:apply-templates mode="italic" select="@url" />
32   </xsl:if>
33 </xsl:template>
34
35 <xsl:template match="informalexample|screen|programlisting">
36   <xsl:text>.nf&#10;</xsl:text>
37   <xsl:apply-templates/>
38   <xsl:text>.fi&#10;</xsl:text>
39 </xsl:template>
40
41 <xsl:template match="para|simpara|remark" mode="list">
42   <xsl:variable name="foo">
43     <xsl:apply-templates/>
44   </xsl:variable>
45   <xsl:choose match="node()">
46     <!-- Don't normalize-space() for verbatim paragraphs        -->
47     <xsl:when test="informalexample|screen|programlisting">
48       <xsl:value-of select="$foo"/>
49     </xsl:when>
50     <xsl:otherwise>
51       <xsl:value-of select="normalize-space($foo)"/>
52       <xsl:text>&#10;</xsl:text>
53     </xsl:otherwise>
54   </xsl:choose>
55   <xsl:text>&#10;</xsl:text>
56   <xsl:if test="following-sibling::para or following-sibling::simpara or
57                 following-sibling::remark">
58     <!-- Make sure multiple paragraphs within a list item don't -->
59     <!-- merge together.                                        -->
60     <xsl:text>&#10;</xsl:text>
61   </xsl:if>
62 </xsl:template>
63
64 <xsl:template match="refsect3">
65   <xsl:text>&#10;.SS "</xsl:text>
66   <xsl:value-of select="title[1]"/>
67   <xsl:text>"&#10;</xsl:text>
68   <xsl:apply-templates/>
69 </xsl:template>
70
71
72 </xsl:stylesheet>