source: trunk/third/ifplugd/man/xmltoman.xsl @ 20388

Revision 20388, 3.3 KB checked in by amb, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r20387, which included commits to RCS files with non-trunk default branches.
Line 
1<?xml version="1.0" encoding="iso-8859-1"?>
2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
3
4<!--
5  This file is part of ifplugd.
6
7  ifplugd is free software; you can redistribute it and/or modify it under
8  the terms of the GNU General Public License as published by the Free
9  Software Foundation; either version 2 of the License, or (at your
10  option) any later version.
11
12  ifplugd is distributed in the hope that it will be useful, but WITHOUT
13  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15  for more details.
16
17  You should have received a copy of the GNU General Public License
18  along with ifplugd; if not, write to the Free Software Foundation,
19  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
20-->
21
22<xsl:template match="/manpage">
23    <xsl:text disable-output-escaping="yes">
24    &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
25    </xsl:text>
26    <html>
27
28    <head>
29      <title>
30        <xsl:value-of select="@name"/>(<xsl:value-of select="@section"/>)
31      </title>
32      <link rel="stylesheet" type="text/css" href="xmltoman.css"/>
33    </head>
34    <body>
35      <h1>Name</h1>
36      <p><xsl:value-of select="@name"/>
37        <xsl:if test="string-length(@desc) &gt; 0">
38          - <xsl:value-of select="@desc"/>
39        </xsl:if>
40      </p>
41      <xsl:apply-templates />
42    </body>
43  </html>
44</xsl:template>
45
46<xsl:template match="p">
47 <p>
48  <xsl:apply-templates/>
49 </p>
50</xsl:template>
51
52<xsl:template match="cmd">
53 <p class="cmd">
54  <xsl:apply-templates/>
55 </p>
56</xsl:template>
57
58<xsl:template match="arg">
59  <span class="arg"><xsl:apply-templates/></span>
60</xsl:template>
61
62<xsl:template match="opt">
63  <span class="opt"><xsl:apply-templates/></span>
64</xsl:template>
65
66<xsl:template match="file">
67  <span class="file"><xsl:apply-templates/></span>
68</xsl:template>
69
70<xsl:template match="optdesc">
71  <div class="optdesc">
72    <xsl:apply-templates/>
73  </div>
74</xsl:template>
75
76<xsl:template match="synopsis">
77  <h1>Synopsis</h1>
78  <xsl:apply-templates/>
79</xsl:template>
80
81<xsl:template match="seealso">
82  <h1>Synopsis</h1>
83  <xsl:apply-templates/>
84</xsl:template>
85
86<xsl:template match="description">
87  <h1>Description</h1>
88  <xsl:apply-templates/>
89</xsl:template>
90
91<xsl:template match="options">
92  <h1>Options</h1>
93  <xsl:apply-templates/>
94</xsl:template>
95
96<xsl:template match="section">
97  <h1><xsl:value-of select="@name"/></h1>
98  <xsl:apply-templates/>
99</xsl:template>
100
101<xsl:template match="option">
102  <div class="option"><xsl:apply-templates/></div>
103</xsl:template>
104
105<xsl:template match="manref">
106  <xsl:choose>
107    <xsl:when test="string-length(@href) &gt; 0">
108    <a class="manref"><xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute><xsl:value-of select="@name"/>(<xsl:value-of select="@section"/>)</a>
109    </xsl:when>
110    <xsl:otherwise>
111    <span class="manref"><xsl:value-of select="@name"/>(<xsl:value-of select="@section"/>)</span>
112    </xsl:otherwise>
113  </xsl:choose>
114</xsl:template>
115
116<xsl:template match="url">
117  <a class="url"><xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute><xsl:value-of select="@href"/></a>
118</xsl:template>
119
120</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.