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:apply-templates select=
"listitem"/>
47 <xsl:if test=
"(parent::para or parent::listitem) or following-sibling::node()">
48 <xsl:text>.sp
</xsl:text>
49 <xsl:text>.RE
</xsl:text>
53 <xsl:template match=
"refsect3">
54 <xsl:text> .SS
"</xsl:text>
55 <xsl:value-of select="title[
1]
"/>
56 <xsl:text>" </xsl:text>
57 <xsl:apply-templates/>
60 <!-- ================================================================== -->
61 <!-- These macros are from Docbook manpages XSLT development tree -->
62 <!-- help to maintain manpage generation clean when difference between -->
63 <!-- roff processors is important to note. -->
65 <xsl:template name=
"roff-if-else-start">
66 <xsl:param name=
"condition">n
</xsl:param>
67 <xsl:text>.ie
</xsl:text>
68 <xsl:value-of select=
"$condition"/>
69 <xsl:text> \{\
</xsl:text>
72 <xsl:template name=
"roff-if-start">
73 <xsl:param name=
"condition">n
</xsl:param>
74 <xsl:text>.if
</xsl:text>
75 <xsl:value-of select=
"$condition"/>
76 <xsl:text> \{\
</xsl:text>
79 <xsl:template name=
"roff-else">
80 <xsl:text>.\}
</xsl:text>
81 <xsl:text>.el \{\
</xsl:text>
84 <xsl:template name=
"roff-if-end">
85 <xsl:text>.\}
</xsl:text>