<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
  <head>
    <title>Chinese Medicine: The Five Elements</title>
  </head>
  <body bgcolor="#ffffff">
    <h1 style="text-align: center; color:#7788aa;font-family: sand, comic sans ms, Arial, sans-serif;">
    Chinese Medicine: The Five Elements
    </h1>
    
<table width="100%" border="0" cellspacing="10">
  <xsl:for-each select="FiveElements/ElementRecord"> 
  <tr>
       <td><xsl:apply-templates select="picture"/></td>
     <td>
      <table width="635" height="200" border="0" style="font-size:10pt; text-align:center; 
       font-family:sand, comic sans ms, arial, sans-serif;">
      <tr style="background-color:#bb9088; color:#ffddcc">
       <th width="80">Element</th>
       <th width="125">General Characteristics</th>
       <th width="90">Season</th>
       <th width="90">Direction</th>
       <th width="80">Climate</th>
	   <th width="95">Color</th>
	   <th width="75">Taste</th>
      </tr>
      <tr style="background-color:#8899bb; color:#ddeeff;">
       <td align="center" style="color:#334477;"><xsl:value-of select="element"/></td>
       <td align="center"><xsl:value-of select="GeneralCharacteristics"/></td>
       <td align="center"><xsl:value-of select="properties/season"/></td>
       <td align="center"><xsl:value-of select="properties/direction"/></td>
       <td align="center"><xsl:value-of select="properties/climate"/></td>
	   <td align="center"><xsl:value-of select="properties/color"/></td>
	   <td align="center"><xsl:value-of select="properties/taste"/></td>
      </tr>
      <tr style="background-color:#bb9088; color:#ffddcc;">
       <th>Smell</th>
       <th>Yin Organ</th>
	   <th>Yang Organ</th>
	   <th>Orifice</th>
	   <th>Tissue</th>
	   <th>Emotion</th>
	   <th>Voice</th>
	  </tr>
      <tr style="background-color:#8899bb; color:#ddeeff;">
       <td align="center"><xsl:value-of select="properties/smell"/></td>
       <td align="center"><xsl:value-of select="properties/YinOrgan"/></td>
       <td align="center"><xsl:value-of select="properties/YangOrgan"/></td>
	   <td align="center"><xsl:value-of select="properties/orifice"/></td>
	   <td align="center"><xsl:value-of select="properties/tissue"/></td>
	   <td align="center"><xsl:value-of select="properties/emotion"/></td>
	   <td align="center"><xsl:value-of select="properties/voice"/></td>
      </tr>
      
      </table>
     </td>
   </tr> 
         
    </xsl:for-each>
</table>     
</body>
</html>
</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>

