2 <!-- vim:set sts=2 shiftwidth=2 syntax=xml: -->
3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
7 <!-- the @..@ is substituted by config.status to contain the XSL release selected
9 <xsl:import href="http://docbook.sourceforge.net/release/xsl/@XSLREL@/html/docbook.xsl"/>
11 <xsl:import href="settings.xsl"/>
13 <xsl:param name="citerefentry.link" select="'1'"/>
14 <xsl:param name="css.decoration" select="1"/>
15 <xsl:param name="html.stylesheet" select="'amanda.css'"/>
16 <xsl:param name="html.stylesheet.type">text/css</xsl:param>
17 <xsl:param name="html.cleanup" select="1"/>
18 <xsl:param name="use.extensions" select="'0'"/>
19 <xsl:param name="use.id.as.filename" select="'0'"/>
20 <xsl:param name="use.local.olink.style" select="1"/>
21 <xsl:param name="use.role.as.xrefstyle" select="1"/>
22 <xsl:param name="refentry.generate.title" select="1"/>
24 <!-- generate correct links to other manpages -->
25 <xsl:template name="generate.citerefentry.link">
26 <xsl:value-of select="refentrytitle"/><xsl:text>.</xsl:text><xsl:value-of select="manvolnum"/><xsl:text>.html</xsl:text>
29 <!-- add missing AUTHOR(S) section -->
30 <!-- this section originated with fglrx_man:
31 http://vcs.wgdd.de/cvsweb/fglrx_man/fglrx_html.xsl?rev=1.5
32 License information from that file:
33 This file is free software. The copyright owner gives unlimited
34 permission to copy, distribute and modify it.
36 <xsl:template match="refentry">
37 <div class="refentry">
38 <xsl:apply-templates/>
40 <xsl:when test="refentryinfo//author">
41 <xsl:apply-templates select="refentryinfo" mode="authorsect"/>
47 <xsl:template match="refentryinfo" mode="authorsect">
48 <div class="refsect1">
50 <xsl:text>AUTHOR</xsl:text>
51 <xsl:if test="count(.//author)+count(.//othercredit)>1">
52 <xsl:text>S</xsl:text>
55 <xsl:text> </xsl:text>
56 <xsl:if test="count(.//author)>0">
58 <xsl:text>This manual page was written by </xsl:text>
59 <xsl:for-each select=".//author">
60 <xsl:if test="position() > 1">
62 <xsl:when test="position() = last()">
63 <xsl:text> and </xsl:text>
66 <xsl:text>, </xsl:text>
70 <xsl:apply-templates select="." mode="authorsect"/>
72 <xsl:text>.</xsl:text>
75 <xsl:if test="count(.//othercredit)>0">
77 <xsl:text>Contributions were derived from </xsl:text>
78 <xsl:for-each select=".//othercredit">
79 <xsl:if test="position() > 1">
81 <xsl:when test="position() = last()">
82 <xsl:text> and </xsl:text>
85 <xsl:text>, </xsl:text>
89 <xsl:apply-templates select="." mode="authorsect"/>
91 <xsl:text>.</xsl:text>
94 <xsl:if test="count(.//editor)>0">
96 <xsl:text disable-output-escaping="yes">Edited by </xsl:text>
97 <xsl:for-each select=".//editor">
98 <xsl:if test="position() > 1">
100 <xsl:when test="position() = last()">
101 <xsl:text> and </xsl:text>
104 <xsl:text>, </xsl:text>
108 <xsl:apply-templates select="." mode="authorsect"/>
110 <xsl:text>.</xsl:text>
116 <xsl:template match="affiliation" mode="authorsect">
118 <xsl:when test="./org/uri">
120 <xsl:attribute name="href">
121 <xsl:apply-templates select="./org/uri" />
123 <xsl:apply-templates select="./org/orgname" />
127 <xsl:apply-templates select="./org/orgname" />
132 <xsl:template match="author|editor|othercredit" mode="authorsect">
133 <span class="{name(.)}">
134 <xsl:call-template name="anchor"/>
135 <xsl:call-template name="person.name"/>
136 <xsl:if test=".//email">
137 <xsl:text> </xsl:text>
138 <xsl:apply-templates select=".//email"/>
140 <xsl:if test=".//affiliation">
141 <xsl:text> (</xsl:text>
142 <xsl:apply-templates mode="authorsect" select="./affiliation"/>
143 <xsl:text>)</xsl:text>