014404391dbf8b888ded4c01813d3a355b82560b
[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         <h2>Related links</h2>
20         <ul>
21           <li><a href="http://www.m17n.org/FLIM/">FLIM</a></li>
22           <li><a href="http://www.m17n.org/SEMI/">SEMI</a></li>
23           <li><a href="http://cvs.m17n.org/">cvs.m17n.org</a></li>
24           <li><a href="http://cvs.m17n.org/cvs/anonymous.ja.html">How to explore cvs repository</a></li>
25         </ul>
26         <xsl:apply-templates select="product"/>
27         <div class="button">
28           <a href="http://jigsaw.w3.org/css-validator"><img
29              src="http://jigsaw.w3.org/css-validator/images/vcss.gif" 
30              alt="Valid CSS!" height="31" width="88" /></a>
31           <a href="http://validator.w3.org/check/referer"><img
32              src="http://validator.w3.org/images/vxhtml10"
33              alt="Valid XHTML 1.0!" height="31" width="88" /></a>
34         </div>
35       </body>
36     </html>
37   </xsl:template>
38
39   <xsl:template match="product">
40     <h2><xsl:value-of select="@name"/>/<xsl:value-of select="@version"/></h2>
41     <xsl:apply-templates select="variant"/>
42   </xsl:template>
43
44   <xsl:template match="variant">
45     <table border="1" width="99%">
46       <col width="17%"/>
47       <tbody>
48         <tr>
49           <th>name</th>
50           <td><xsl:value-of select="@name"/></td>
51         </tr>
52         <tr>
53           <th>version</th>
54           <td><xsl:value-of select="@version"/></td>
55         </tr>
56         <tr>
57           <th>maintainer</th>
58           <td>
59             <xsl:choose>
60               <xsl:when test="maintainer/@href">
61                 <a href="{maintainer/@href}"><xsl:value-of select="maintainer"/></a>
62               </xsl:when>
63               <xsl:otherwise>
64                 <xsl:value-of select="maintainer"/>
65               </xsl:otherwise>
66             </xsl:choose>
67           </td>
68         </tr>
69         <tr><th>description</th><td><xsl:value-of select="description"/></td></tr>
70         <xsl:apply-templates select="implementation"/>
71       </tbody>
72     </table>
73   </xsl:template>
74
75   <xsl:template match="implementation">
76     <xsl:apply-templates select="codebase"/>
77     <xsl:apply-templates select="dependency"/>
78   </xsl:template>
79
80   <xsl:template match="codebase">
81     <tr>
82       <th>code</th>
83       <td>
84         <xsl:choose>
85           <xsl:when test="@cvsroot">
86             <table>
87               <tbody>
88                 <tr><th>CVSROOT</th><td><xsl:value-of select="@cvsroot"/></td></tr>
89                 <tr><th>module</th><td><xsl:value-of select="@module"/></td></tr>
90                 <tr><th>tag</th><td><xsl:value-of select="@tag"/></td></tr>
91               </tbody>
92             </table>
93           </xsl:when>
94           <xsl:otherwise>
95             <a href="@href"><xsl:value-of select="@href"/></a>
96           </xsl:otherwise>
97         </xsl:choose>
98       </td>
99     </tr>
100   </xsl:template>
101
102   <xsl:template name="separate">
103     <xsl:if test="position() &lt; last()">
104       <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
105     </xsl:if>
106   </xsl:template>
107
108   <xsl:template match="variant|product" mode="dependency.mode">
109     <xsl:value-of select="@name"/> (<xsl:value-of select="@version"/>)
110     <xsl:call-template name="separate"/>
111   </xsl:template>
112   
113   <xsl:template match="dependency">
114     <tr>
115       <th>dependency</th>
116       <td>
117         <xsl:apply-templates select="./*" mode="dependency.mode"/>
118       </td>
119     </tr>
120   </xsl:template>
121 </xsl:stylesheet>