<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="platform">
<td><xsl:value-of select="@status"/></td>
</xsl:template>

<xsl:template match="supported">
<xsl:apply-templates select="platform[@name='gtk']"/>
<xsl:apply-templates select="platform[@name='win32']"/>
<xsl:apply-templates select="platform[@name='motif']"/>
<xsl:apply-templates select="platform[@name='x11']"/>
<xsl:apply-templates select="platform[@name='nanox']"/>
<xsl:apply-templates select="platform[@name='mgl']"/>
<xsl:apply-templates select="platform[@name='macos']"/>
<xsl:apply-templates select="platform[@name='os2']"/>
</xsl:template>

<xsl:template match="class">
<tr>
<td><xsl:value-of select="@name"/></td>
<xsl:apply-templates select="supported"/>
</tr>
</xsl:template>

<xsl:template match="/classes">
  <html>
  <head>
  <link rel="stylesheet" type="text/css" href="wx.css"/>
  </head>
  <body> 
  <h1> Supported classes by port </h1>
   This table refers to code in CVS head. Please note that it may not be totally accurate.
  <table>
  <tr>
  <th>GTK+</th>
  <th>WIN32</th>
  <th>Motif</th>
  <th>X11</th>
  <th>Nano-X</th>
  <th>MGL</th>
  <th>MacOS</th>
  <th>OS/2</th>
  </tr>
  <xsl:apply-templates select="class">
    <xsl:sort data-type="text" select="@name"/>
  </xsl:apply-templates>

  <xsl:key name="classes-by-letter" match="class" use="@name"/>
  <xsl:apply-templates select="key('classes-by-letter', letter)"/>

  <!--<xsl:for-each select="class[generate-id(.)=generate-id(key('letter',@name">
    <xsl:sort data-type="text" select="@name"/>
    <xsl:apply-templates select="."/>
  </xsl:for-each>-->

  </table>
  </body>
  </html>
</xsl:template>

</xsl:stylesheet>

