Importing SEMI variants docs.
[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         <xsl:apply-templates select="product"/>
19       </body>
20     </html>
21   </xsl:template>
22
23   <xsl:template match="product">
24     <h2><xsl:value-of select="@name"/>/<xsl:value-of select="@version"/></h2>
25     <xsl:apply-templates select="variant"/>
26   </xsl:template>
27
28   <xsl:template match="variant">
29     <table border="1" width="99%">
30       <tbody>
31         <tr>
32           <th width="17%">name</th>
33           <td><xsl:value-of select="@name"/></td>
34         </tr>
35         <tr>
36           <th>version</th>
37           <td><xsl:value-of select="@version"/></td>
38         </tr>
39         <tr>
40           <th>maintainer</th>
41           <td>
42             <xsl:choose>
43               <xsl:when test="maintainer/@href">
44                 <a href="{maintainer/@href}"><xsl:value-of select="maintainer"/></a>
45               </xsl:when>
46               <xsl:otherwise>
47                 <xsl:value-of select="maintainer"/>
48               </xsl:otherwise>
49             </xsl:choose>
50           </td>
51         </tr>
52         <tr><th>description</th><td><xsl:value-of select="description"/></td></tr>
53         <xsl:apply-templates select="implementation"/>
54       </tbody>
55     </table>
56   </xsl:template>
57
58   <xsl:template match="implementation">
59     <xsl:apply-templates select="codebase"/>
60     <xsl:apply-templates select="dependency"/>
61   </xsl:template>
62
63   <xsl:template match="codebase">
64     <tr>
65       <th>code</th>
66       <td>
67         <xsl:choose>
68           <xsl:when test="@cvsroot">
69             <table>
70               <tbody>
71                 <tr><th>CVSROOT</th><td><xsl:value-of select="@cvsroot"/></td></tr>
72                 <tr><th>module</th><td><xsl:value-of select="@module"/></td></tr>
73                 <tr><th>tag</th><td><xsl:value-of select="@tag"/></td></tr>
74               </tbody>
75             </table>
76           </xsl:when>
77           <xsl:otherwise>
78             <a href="@href"><xsl:value-of select="@href"/></a>
79           </xsl:otherwise>
80         </xsl:choose>
81       </td>
82     </tr>
83   </xsl:template>
84
85   <xsl:template name="separate">
86     <xsl:if test="position() &lt; last()">
87       <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
88     </xsl:if>
89   </xsl:template>
90
91   <xsl:template match="variant|product" mode="dependency.mode">
92     <xsl:value-of select="@name"/> (<xsl:value-of select="@version"/>)
93     <xsl:call-template name="separate"/>
94   </xsl:template>
95   
96   <xsl:template match="dependency">
97     <tr>
98       <th>dependency</th>
99       <td>
100         <xsl:apply-templates select="./*" mode="dependency.mode"/>
101       </td>
102     </tr>
103   </xsl:template>
104 </xsl:stylesheet>