* xdocs/style/spdf.xsl: Add title.
[elisp/semi-variants.git] / xdocs / style / spdf.xsl
1 <?xml version="1.0"?>
2 <!-- Copyright (C) 2000 Daiki Ueno. -->
3
4 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
5   <xsl:output method="xml" encoding="UTF-8"/>
6   <xsl:output doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
7               doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"/>
8
9   <xsl:template match="products">
10     <html xmlns="http://www.w3.org/1999/xhtml">
11       <head>
12         <title>SEMI family products</title>
13         <meta content="text/html" http-equiv="Content-Type"/>
14         <link href="default.css" type="text/css" rel="stylesheet" />
15         <meta content="text/css" http-equiv="Content-Style-Type" />
16       </head>
17       <body>
18         <h1>SEMI family products</h1>
19         <xsl:apply-templates select="product"/>
20       </body>
21     </html>
22   </xsl:template>
23
24   <xsl:template match="product">
25     <h2><xsl:value-of select="@name"/>/<xsl:value-of select="@version"/></h2>
26     <xsl:apply-templates select="variant"/>
27   </xsl:template>
28
29   <xsl:template match="variant">
30     <table border="1" width="99%">
31       <tbody>
32         <tr>
33           <th width="17%">name</th>
34           <td><xsl:value-of select="@name"/></td>
35         </tr>
36         <tr>
37           <th>version</th>
38           <td><xsl:value-of select="@version"/></td>
39         </tr>
40         <tr>
41           <th>maintainer</th>
42           <td>
43             <xsl:choose>
44               <xsl:when test="maintainer/@href">
45                 <a href="{maintainer/@href}"><xsl:value-of select="maintainer"/></a>
46               </xsl:when>
47               <xsl:otherwise>
48                 <xsl:value-of select="maintainer"/>
49               </xsl:otherwise>
50             </xsl:choose>
51           </td>
52         </tr>
53         <tr><th>description</th><td><xsl:value-of select="description"/></td></tr>
54         <xsl:apply-templates select="implementation"/>
55       </tbody>
56     </table>
57   </xsl:template>
58
59   <xsl:template match="implementation">
60     <xsl:apply-templates select="codebase"/>
61     <xsl:apply-templates select="dependency"/>
62   </xsl:template>
63
64   <xsl:template match="codebase">
65     <tr>
66       <th>code</th>
67       <td>
68         <xsl:choose>
69           <xsl:when test="@cvsroot">
70             <table>
71               <tbody>
72                 <tr><th>CVSROOT</th><td><xsl:value-of select="@cvsroot"/></td></tr>
73                 <tr><th>module</th><td><xsl:value-of select="@module"/></td></tr>
74                 <tr><th>tag</th><td><xsl:value-of select="@tag"/></td></tr>
75               </tbody>
76             </table>
77           </xsl:when>
78           <xsl:otherwise>
79             <a href="@href"><xsl:value-of select="@href"/></a>
80           </xsl:otherwise>
81         </xsl:choose>
82       </td>
83     </tr>
84   </xsl:template>
85
86   <xsl:template name="separate">
87     <xsl:if test="position() &lt; last()">
88       <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
89     </xsl:if>
90   </xsl:template>
91
92   <xsl:template match="variant|product" mode="dependency.mode">
93     <xsl:value-of select="@name"/> (<xsl:value-of select="@version"/>)
94     <xsl:call-template name="separate"/>
95   </xsl:template>
96   
97   <xsl:template match="dependency">
98     <tr>
99       <th>dependency</th>
100       <td>
101         <xsl:apply-templates select="./*" mode="dependency.mode"/>
102       </td>
103     </tr>
104   </xsl:template>
105 </xsl:stylesheet>