ready for tagging
[util-vserver.git] / doc / compatibility-xhtml.xsl
1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3                 xmlns="http://www.w3.org/1999/xhtml"
4                 version="1.0">
5
6   <xsl:output method="xml"
7               indent="yes"
8               doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
9               doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
10
11   <xsl:template match="/">
12     <html>
13       <head>
14         <title><xsl:apply-templates select="compatibility/title"/></title>
15         <link rel="stylesheet" type="text/css" href="compatibility.css" />
16       </head>
17       <body>
18         <h1><xsl:apply-templates select="compatibility/title"/></h1>
19         <xsl:apply-templates select="compatibility/program">
20           <xsl:sort select="compatibility/program/location"/>
21           <xsl:sort select="compatibility/program[name]"/>
22         </xsl:apply-templates>
23       </body>
24     </html>
25   </xsl:template>
26
27   <xsl:template name="compat">
28     <xsl:variable name="name" select="name()"/>
29     <xsl:variable name="descr">
30       <xsl:choose>
31         <xsl:when test="$name = 'clicompat'">
32           <xsl:text>Command line interface compatibility</xsl:text>
33         </xsl:when>
34         <xsl:when test="$name = 'funccompat'">
35           <xsl:text>Functional compatibility</xsl:text>
36         </xsl:when>
37         <xsl:otherwise>
38           <xsl:value-of select="$name"/>
39         </xsl:otherwise>
40       </xsl:choose>
41     </xsl:variable>
42     <div class="{$name}">
43       <xsl:value-of select="$descr"/>: <xsl:value-of select="@status"/>
44       <xsl:if test="text">
45         <div class="text">
46           <xsl:apply-templates select="text"/>
47         </div>
48       </xsl:if>      
49     </div>
50   </xsl:template>
51
52   <xsl:template match="clicompat|funccompat">
53     <xsl:call-template name="compat" />
54   </xsl:template>
55
56   <xsl:template match="program">
57     <div class="program">
58       <div class="name">
59         <xsl:value-of select="location"/>/<xsl:value-of select="@name"/>
60         <xsl:if test="@status">
61           <xsl:text> (</xsl:text>
62           <xsl:value-of select="@status"/>
63           <xsl:text>)</xsl:text>
64         </xsl:if>
65       </div>
66       <xsl:apply-templates select="clicompat|funccompat"/>
67     </div>
68   </xsl:template>
69
70 </xsl:stylesheet>