<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

  <xsl:template match="/">
    <xsl:apply-templates/>
  </xsl:template>

  <xsl:template match="xml">
    <xsl:apply-templates/>
  </xsl:template>

  <xsl:template match="inuit_data">
    <HTML>
      <BODY>
        <p><b><u>Data File Details</u></b></p>
        <p><b>Authority: </b><xsl:value-of select="@authority"/></p>
        <p><b>Master: </b><xsl:value-of select="@master"/></p>
        <p><b>Master URL: </b><a>
          <xsl:attribute name="href">
            <xsl:value-of select="@master_url"/>
          </xsl:attribute>
          <xsl:value-of select="@master_url"/>
        </a></p>
        <xsl:apply-templates/>
      </BODY>
    </HTML>
  </xsl:template>

  <xsl:template match="taxa">
    <table border="1">
      <td>
        <table>
          <td align="center">
            <img>
               <xsl:attribute name="src">
                 http://www.pml-nematode.org.uk/images/taxa/<xsl:value-of select="@name"/>.gif
               </xsl:attribute>
               <xsl:attribute name="alt">
                 <xsl:value-of select="@name"/>
               </xsl:attribute>
            </img>
          </td>
          <tr>
            <td align="center">
              <xsl:value-of select="@name"/>
            </td>
          </tr>
        </table>
      </td>
      <td>
        <xsl:apply-templates/>
      </td>
    </table>
  </xsl:template>

  <xsl:template match="description">
    <table border="1">
      <tr>
        <xsl:for-each select="ch_st">
          <td align="center">          
            <img>
               <xsl:attribute name="src">
                 http://www.pml-nematode.org.uk/images/ch_states/<xsl:value-of select="@chst_ref"/>.gif
               </xsl:attribute>
               <xsl:attribute name="alt">
                 <xsl:value-of select="@chst_ref"/>
               </xsl:attribute>
            </img>
          </td>
        </xsl:for-each>
      </tr>
    </table>
  </xsl:template>

</xsl:stylesheet>
