Fix 'nvidia with ncurses segfaults' (sf.net #3006233)
[monky] / doc / lua.xsl
1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3         version="1.0">
4
5         <xsl:output method="html"/>
6
7         <xsl:template match="/">
8                 <html>
9                         <head>
10                                 <title>Lua API</title>
11                         </head>
12                         <body bgcolor="#FFFFFF">
13                                 <xsl:apply-templates />
14                         </body>
15                 </html>
16         </xsl:template>
17
18         <xsl:template match="member/command">
19                 <strong>
20                         <xsl:value-of select="." />
21                 </strong> - 
22         </xsl:template>
23
24         <xsl:template match="member/option">
25                 <xsl:value-of select="." />
26         </xsl:template>
27
28         <xsl:template match="member">
29                 <li>
30                         <xsl:apply-templates />
31                 </li>
32         </xsl:template>
33
34         <xsl:template match="simplelist">
35                 <ul>
36                         <xsl:apply-templates select="member" />
37                 </ul>
38         </xsl:template>
39
40         <xsl:template match="para">
41                 <p>
42                         <xsl:value-of select="." />
43                 </p>
44         </xsl:template>
45
46         <xsl:template match="variablelist" >
47                 <table cellpadding="3">
48
49                         <tr bgcolor = "#eecfa1">
50                                 <th>Name</th>
51                                 <th>Type</th>
52                                 <th>Details</th>
53                         </tr>
54
55                         <xsl:for-each select="varlistentry">
56                                 <xsl:variable name="row_bg">
57                                         <xsl:choose>
58                                                 <xsl:when test="position() mod 2 = 1">#fffafa</xsl:when>
59                                                 <xsl:otherwise>#b4cdcd</xsl:otherwise>
60                                         </xsl:choose>
61                                 </xsl:variable>
62                                 <tr bgcolor = "{$row_bg}">
63                                         <td align="center">
64                                                 <xsl:value-of select="term/command/option" />
65                                         </td>
66                                         <td align="center">
67                                                 <xsl:value-of select="term/option" />
68                                         </td>
69                                         <td>
70                                                 <xsl:apply-templates select="listitem" />
71                                         </td>
72                                 </tr>
73                         </xsl:for-each>
74                 </table>
75         </xsl:template>
76
77 </xsl:stylesheet>