2 <!-- vim:set sts=2 shiftwidth=2 syntax=xml: -->
3 <xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
4 xmlns:xlink='http://www.w3.org/
1999/xlink'
7 <xsl:import href=
"http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"/>
9 <xsl:param name=
"chunk.section.depth" select=
"0"/>
10 <xsl:param name=
"chunk.first.sections" select=
"1"/>
11 <xsl:param name=
"use.id.as.filename" select=
"1"/>
12 <xsl:param name=
"man.endnotes.are.numbered" select=
"0"/>
15 Our ulink stylesheet omits @url part if content was specified
17 <xsl:template match=
"ulink">
18 <xsl:variable name=
"content">
19 <xsl:apply-templates/>
21 <xsl:if test=
"$content = ''">
22 <xsl:text>:
</xsl:text>
24 <xsl:if test=
"$content != ''">
25 <xsl:value-of select=
"$content" />
27 <xsl:if test=
"$content = ''">
28 <xsl:apply-templates mode=
"italic" select=
"@url" />
32 <xsl:template match=
"itemizedlist|orderedlist|procedure">
34 <xsl:text>.PP
</xsl:text>
35 <xsl:call-template name=
"bold">
36 <xsl:with-param name=
"node" select=
"title"/>
37 <xsl:with-param name=
"context" select=
"."/>
39 <xsl:text> </xsl:text>
41 <!-- * DocBook allows just about any block content to appear in -->
42 <!-- * lists before the actual list items, so we need to get that -->
43 <!-- * content (if any) before getting the list items -->
45 select=
"*[not(self::listitem) and not(self::title)]"/>
46 <xsl:text> .RS
</xsl:text>
47 <xsl:apply-templates select=
"listitem"/>
48 <xsl:if test=
"(parent::para or parent::listitem) or following-sibling::node()">
49 <xsl:text>.sp
</xsl:text>
50 <xsl:text>.RE
</xsl:text>
54 <xsl:template match=
"refsect3">
55 <xsl:text> .SS
"</xsl:text>
56 <xsl:value-of select="title[
1]
"/>
57 <xsl:text>" </xsl:text>
58 <xsl:apply-templates/>
61 <!-- ================================================================== -->
62 <!-- These macros are from Docbook manpages XSLT development tree -->
63 <!-- help to maintain manpage generation clean when difference between -->
64 <!-- roff processors is important to note. -->
66 <xsl:template name=
"roff-if-else-start">
67 <xsl:param name=
"condition">n
</xsl:param>
68 <xsl:text>.ie
</xsl:text>
69 <xsl:value-of select=
"$condition"/>
70 <xsl:text> \{\
</xsl:text>
73 <xsl:template name=
"roff-if-start">
74 <xsl:param name=
"condition">n
</xsl:param>
75 <xsl:text>.if
</xsl:text>
76 <xsl:value-of select=
"$condition"/>
77 <xsl:text> \{\
</xsl:text>
80 <xsl:template name=
"roff-else">
81 <xsl:text>.\}
</xsl:text>
82 <xsl:text>.el \{\
</xsl:text>
85 <xsl:template name=
"roff-if-end">
86 <xsl:text>.\}
</xsl:text>