<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
  <html>
	<head>
		<title>Planet Specs </title>
	</head>
  <body bgcolor="#FEF7D8">
		<table align="center" width="50%" cellpadding="5" border="0">
	     <xsl:for-each select="planetspecs/photo">
		<tr>
		 <th align="right"><h1 style="font-family: Brush Script MT, Times New Roman, Times, serif; 
		      font-size:50 ; font-weight: bold; color: #006600; text-indent:20%;">Planet Specs</h1></th>
	         <th align="left"><xsl:apply-templates select="picture"/></th>	
		</tr>
	     </xsl:for-each>
		</table>
	<table align="center" width="100%" bordercolordark="#215e21" border="5" cellspacing="1" cellpadding="5">
      	 <tr style="background-color:#CEFBCF; font-size: 14pt; font-family: Georgia, Times New Roman, Times, serif; color:#0C8C09;">
       		<th rowspan="2" colspan="2">Planet</th>
       		<th rowspan="2" >Km from Sun</th>
       		<th rowspan="2" >Lowest Temp</th>
       		<th rowspan="2" >Atmosphere</th>
       		<th rowspan="2" >Orbital Period</th>
       		<th rowspan="2" >Tilt of Axis in Degrees</th>
       		<th align="center" colspan="2"> <p>&#xA0; &#xA0; Rotational &#xA0; &#xA0;  Period &#xA0; &#xA0; </p> </th>
       		<th rowspan="2" >Vo Magnitude</th>
      	 </tr>
	<tr style="background-color:#CEFBCF; font-size: 12pt; font-family: Georgia, Times New Roman, Times, serif; color:#0C8C09;">
		<th>Days: </th><th>Hours:</th>
	</tr>

      <xsl:for-each select="planetspecs/planet">
        <tr style="background-color:#CEFBCF; font-size: 12pt; font-family: Georgia, Times New Roman, Times, serif; color:#5E3704;">
         
         <td><xsl:apply-templates select="picture"/></td>
    
         <td><font color="#8E2323"><b><xsl:value-of select="name" /></b></font></td>
         <td><xsl:value-of select="distance" /></td>
         <td><xsl:value-of select="lowtemp" /></td>        
         <td><xsl:value-of select="atmosphere/." /></td>
         <td><xsl:value-of select="orbit" /></td>
         <td><xsl:value-of select="tilt" /></td>
         <td><xsl:value-of select="rotate/days" /></td>
	 <td><xsl:value-of select="rotate/hours" /></td>
         <td align="center"><xsl:value-of select="magnitude" /></td>


       </tr>

      </xsl:for-each>
    </table>
  </body>
  </html>
</xsl:template>


<!-- "photo" template -->
<xsl:template match="photo">
<img>
    <xsl:attribute name="src">
      <xsl:value-of select="./@photo"/>
    </xsl:attribute>
    <xsl:attribute name="width">
      <xsl:value-of select="./@y"/>
    </xsl:attribute>
    <xsl:attribute name="height">
      <xsl:value-of select="./@x"/>
    </xsl:attribute>
</img>
</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="./@y"/>
    </xsl:attribute>
    <xsl:attribute name="height">
      <xsl:value-of select="./@x"/>
    </xsl:attribute>
  </img>
</xsl:template>
</xsl:stylesheet>
