Stamped by Maciej.
[WebKit-https.git] / WebKitSite / projects / svg / svg-status.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3   <xsl:output method="html"/>
4   <xsl:template match="status">
5     <html xmlns="http://www.w3.org/1999/xhtml">
6       <head>
7         <title>WebKit SVG Status</title>
8         <link rel="StyleSheet" href="svg-status.css" />
9       </head>
10       <body>
11         <xsl:copy-of select="description"/>
12         <xsl:apply-templates select="module"/>
13       </body>
14     </html>
15   </xsl:template>
16   
17   <xsl:template match="status/module">
18     <xsl:variable name="url" select="url/text()"/>
19     <h3 class="modulename"><a href="{$url}"><xsl:value-of select="name/text()"/> Module</a></h3>
20     <table class="elements">
21     <colgroup><col class="element"/><col class="status"/></colgroup>
22     <tr><th>Element</th><th>Status</th></tr>
23     <xsl:apply-templates select="elements"/>
24     </table>
25   </xsl:template>
26   
27   <xsl:template match="elements/element">
28     <xsl:variable name="status" select="status/text()"/>
29     <xsl:variable name="statusclass" select="translate($status, 'UNIMPLETD', 'unimpletd')"/>
30     <tr class="element {$statusclass}">
31         <xsl:variable name="url" select="url/text()"/>
32         <xsl:variable name="elementText">
33             &lt;<xsl:value-of select="name/text()"/>&gt;
34         </xsl:variable>
35         <td class="tagname">
36         <xsl:choose>
37         <xsl:when test="$url"><a href="{$url}"><xsl:value-of select="$elementText"/></a></xsl:when>
38         <xsl:otherwise><xsl:value-of select="$elementText"/></xsl:otherwise>
39         </xsl:choose>
40         </td>
41         <td class="status">
42             <ul>
43                 <li>
44                      <xsl:choose>
45                       <xsl:when test="$status">
46                         <xsl:value-of select="$status"/>
47                       </xsl:when>
48                       <xsl:otherwise>
49                         <xsl:text>Partial</xsl:text>
50                       </xsl:otherwise>
51                     </xsl:choose>
52                 </li>
53                 <xsl:apply-templates select="issues"/>
54             </ul>
55         </td>
56     </tr>
57   </xsl:template>
58   
59   <xsl:template match="issues/issue">
60     <li><xsl:apply-templates /></li>
61   </xsl:template>
62   
63   <xsl:template match="bug">
64     <xsl:variable name="number" select="text()"/>
65     <a href="http://bugs.webkit.org/show_bug.cgi?id={$number}">
66     <xsl:value-of select="$number"/>
67     </a>
68   </xsl:template>
69   
70 </xsl:stylesheet>