<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<!-- marine_fish.xsl., COIN 78: XML, Final Project, Jeffrey Maramba, November 13, 2001 -->

<xsl:template match="/">
<html>
	<head><title>Marine Fish Collection</title></head>
	<body bgcolor="white">
	<xsl:apply-templates /> 
	</body>
</html>
</xsl:template>

<xsl:template match="marine_fish_collection">
	<center><h1><font color="blue" face="Arial, Helvetica, sans-serif">Marine Fish Collection</font></h1></center>


	<xsl:for-each select="/marine_fish_collection/marine_fish">
	<center>
	<table width="580" border="0" cellpadding="8" cellspacing="10" bgcolor="lightblue" rules="none">
		<tr>
		<td width="200" bgcolor="darkblue">
			<div align="center"><font face="Arial, Helvetica, sans-serif" size="6" color="white"><b><xsl:value-of select="name_common" /></b></font></div>
		</td>
		<td rowspan="2" align="center"><xsl:apply-templates select="picture"/></td>
		</tr>
		<tr>
		<td width="200">
                      	<div align="center"><font color="darkblue" face="Arial, Helvetica, sans-serif" size="4"><i><b><xsl:value-of select="name_scientific" /></b></i></font></div>
		</td>
		</tr>
		<tr> 
		<td colspan="2" width="540" bgcolor="lightyellow">
			<font face="Arial, Helvetica, sans-serif" size="3" color="black"><b><xsl:value-of select="family/family_label" /></b>
			<xsl:value-of select="family/family_name" /></font>
		</td>
		</tr>
		<tr>
		<td colspan="2" width="540" bgcolor="lightblue">
			<font face="Arial, Helvetica, sans-serif" size="3" color="black"><b><xsl:value-of select="original_locations/location_label" /></b>
		<xsl:value-of select="original_locations/location" /></font>
		</td>
		</tr>
		<tr>
		<td colspan="2" width="540" bgcolor="lightyellow">
			<font face="Arial, Helvetica, sans-serif" size="3" color="black"><b><xsl:value-of select="description/description_label" /></b>
			<xsl:value-of select="description/shape" />
			<xsl:value-of select="description/color" />
			<xsl:value-of select="description/size" />
			</font>
		</td>
		</tr>
		<tr>
		<td colspan="2" width="540" bgcolor="lightblue">
			<font face="Arial, Helvetica, sans-serif" size="3" color="black"><b><xsl:value-of select="environment/environment_label" /></b>
			<div><xsl:value-of select="environment/temperature" /></div>
			<div><xsl:value-of select="environment/ph" /></div>
			<div><xsl:value-of select="environment/salinity" /></div>
			<div><xsl:value-of select="environment/lighting" /></div>
			<div><xsl:value-of select="environment/landscape" /></div>
			</font>
		</td>
		</tr>
		<td colspan="2" width="540" bgcolor="lightyellow">
			<font face="Arial, Helvetica, sans-serif" size="3" color="black"><b><xsl:value-of select="feeding/feeding_label" /></b>
			<div><xsl:value-of select="feeding/food" /></div>
			<div><xsl:value-of select="feeding/feeding_habits" /></div>
			</font>
		</td>
		<tr>
		<td colspan="2" width="540" bgcolor="lightblue">
			<font face="Arial, Helvetica, sans-serif" size="3" color="black"><b><xsl:value-of select="behavior/behavior_label" /></b>
			<xsl:value-of select="behavior/reproduction" />
			<xsl:value-of select="behavior/other_species" />
			<xsl:value-of select="behavior/same_species" />
			</font>
		</td>
		</tr>
	</table>
	</center>
	<br></br>
	</xsl:for-each>
</xsl:template>

<!--       "picture" template         -->

<xsl:template match="picture">
  <img>
    <xsl:attribute name="src">
      <xsl:value-of select="./@filename"/>
    </xsl:attribute>
    <xsl:attribute name="width">
      <xsl:value-of select="./@x"/>
    </xsl:attribute>
    <xsl:attribute name="height">
      <xsl:value-of select="./@y"/>
    </xsl:attribute>
  </img>
</xsl:template>

</xsl:stylesheet>
