<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="html"/>

<xsl:template match="/">
  <HTML>
    <HEAD>
      <TITLE>File List</TITLE>
    </HEAD>
    <BODY>
      <H1>Available Files</H1>
       <table border="1" width="80%">
         <TR><TH>Filename</TH><TH>Version</TH><TH>CRC32</TH></TR>
         <xsl:apply-templates/>
       </table>
    </BODY>
  </HTML>
</xsl:template>

<xsl:template match="file">
  <xsl:variable name="dir"><xsl:value-of select="/fileList/@dir"/></xsl:variable>
  <xsl:variable name="filename"><xsl:value-of select="@filename"/></xsl:variable>
	<tr>
          <td><A HREF="{$dir}/{$filename}"><xsl:value-of select="@filename"/></A></td>
	  <td><xsl:value-of select="@version"/></td>
	  <td><xsl:value-of select="@crc32"/></td>
        </tr>
</xsl:template>

<xsl:template match="*">
	<xsl:apply-templates/>
</xsl:template>

</xsl:stylesheet>


