1 <?xml version="1.0" encoding="utf-8"?>
3 <!-- written for madmutt by: -->
4 <!-- Felix Meinhold <felix.meinhold@gmx.net> -->
6 <!-- some more things were added/ajusted by: -->
7 <!-- Rocco Rutte <pdmef@cs.tu-berlin.de> -->
9 <!-- see "Hacking Documentation" chapter of the Fine Manual for -->
10 <!-- usage details -->
12 <xsl:stylesheet version="1.0"
13 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
14 xmlns:madmutt-doc="http://madmutt.berlios.de/doc/#NS"
19 doctype-public="-//OASIS//DTD DocBook XML V4.3//EN"
20 doctype-system="http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
22 output-encoding="utf-8"
25 <xsl:strip-space elements="*"/>
27 <!-- as default, copy each node -->
28 <xsl:template match="/ | node() | @* | comment() | processing-instruction()">
30 <xsl:apply-templates select="@* | node()"/>
34 <xsl:template match="madmutt-doc:man">
37 <xsl:when test="@sect">
38 <xsl:value-of select="concat(@name,'(',@sect,')')"/>
41 <xsl:value-of select="concat(@name,'(1)')"/>
47 <xsl:template match="madmutt-doc:envvar">
48 <literal><xsl:value-of select="concat('$', @name)"/></literal>
50 <primary sortas="{@name}"><literal>$<xsl:value-of select="@name"/></literal></primary>
54 <xsl:template match="madmutt-doc:hook">
55 <literal><link linkend="{concat(@name, '-hook')}"><xsl:value-of select="concat(@name, '-hook')"/></link></literal>
57 <primary sortas="{@name}-hook"><literal><xsl:value-of select="concat(@name, '-hook')"/></literal></primary>
61 <xsl:template match="madmutt-doc:cmddef">
63 <xsl:when test="@noanchor='1'"/>
65 <anchor id="command-{translate(@name,'_','-')}"/>
68 Usage: <literal><xsl:value-of select="@name"/></literal> <emphasis><xsl:apply-templates/></emphasis>
70 <primary sortas="{@name}"><literal><xsl:value-of select="@name"/></literal></primary>
74 <xsl:template match="madmutt-doc:cmdref">
75 <link linkend="command-{translate(@name,'_','-')}"><literal><xsl:value-of select="@name"/></literal></link>
77 <primary sortas="{@name}"><literal><xsl:value-of select="@name"/></literal></primary>
81 <xsl:template match="madmutt-doc:pattern">
82 <literal>~<xsl:value-of select="@name"/></literal>
83 <xsl:if test="@full='1'">/<literal>=<xsl:value-of select="@name"/></literal></xsl:if>
85 <primary sortas="~{@name}"><literal>~<xsl:value-of select="@name"/></literal>/
86 <literal>=<xsl:value-of select="@name"/></literal></primary>
90 <xsl:template match="madmutt-doc:funcdef">
91 <literal><<xsl:value-of select="@name"/>></literal> (default: <xsl:apply-templates/>)
92 <anchor id="func-{@name}"/>
94 <primary sortas="{@name}"><literal><<xsl:value-of select="@name"/>></literal></primary>
98 <xsl:template match="madmutt-doc:funcref">
99 <!-- currently b0rken as not all defined via :funcdef yet ;-((
100 <link linkend="func-{@name}">
102 <xsl:value-of select="concat('<',@name,'>')"/>
107 <primary sortas="{@name}"><literal><<xsl:value-of select="@name"/>></literal></primary>
111 <xsl:template match="madmutt-doc:vardef">
112 <sect1 id="{translate(@name,'_','-')}">
113 <title><xsl:value-of select="concat('$',@name)"/></title>
115 <primary sortas="{@name}"><literal>$<xsl:value-of select="@name"/></literal></primary>
117 <xsl:apply-templates/>
121 <xsl:template match="madmutt-doc:varref">
122 <link linkend="{@name}"><literal><xsl:value-of select="concat('$',translate(@name,'-','_'))"/></literal></link><indexterm>
123 <primary sortas="{@name}"><literal>$<xsl:value-of select="translate(@name,'-','_')"/></literal></primary>
127 <xsl:template match="madmutt-doc:web">
128 <ulink url="{@url}"><literal><<xsl:value-of select="@url"/>></literal></ulink>
131 <xsl:template match="madmutt-doc:rfc">
132 <ulink url="{concat('http://www.faqs.org/rfcs/rfc', @num, '.html')}">RfC <xsl:value-of select="@num"/></ulink>
133 <indexterm><primary>RfC</primary><secondary><xsl:value-of select="@num"/></secondary></indexterm>
136 <xsl:template match="madmutt-doc:lstconf">
138 <xsl:apply-templates/>
142 <xsl:template match="madmutt-doc:lstmail">
144 <xsl:apply-templates/>
148 <xsl:template match="madmutt-doc:lstshell">
150 <xsl:apply-templates/>
154 <xsl:template match="madmutt-doc:key">
157 <xsl:value-of select="concat(@mod,'-')"/>
159 <xsl:apply-templates/>
163 <xsl:template match="madmutt-doc:special">
164 <xsl:value-of select="@docbook"/>