<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" result-ns="html">
 <xsl:template match="/">
  <html>
   <head>
    <title>Recipe Book
    </title>
   </head>
   <body bgcolor="#faf0e6">
    <xsl:apply-templates></xsl:apply-templates>
    <h1 style="text-align: center; color:#00008b;
               font-family: Lucida Sans Unicode, Comic Sans MS, sans-serif; 
               text-decoration:none;">Tasty Recipes
    </h1>
    <table align="center" width="100%" border="1" cellspacing="5">
     <xsl:value-of select="@ID"></xsl:value-of>
     <xsl:for-each select="recipe_book/record">
      <tr>
       <th style="text-align: center; color:#00008b;
               font-family: Lucida Sans Unicode, Comic Sans MS, sans-serif">Recipe Name
       </th>
      </tr>
      <tr style="background-color:#faf0e6; color:#00008b; text-align: center; font-size: 14pts;font-family: Lucida Sans Unicode, Comic Sans MS, sans-serif">
       <td>
        <xsl:value-of select="name"></xsl:value-of>
       </td>
      </tr>
      <tr>
       <td align="center">
        <xsl:value-of select="picture"></xsl:value-of>
       </td>
      </tr>
      <tr style="background-color:#faf0e6; color:#00008b;">
       <td>
        <xsl:value-of select="ingredient_list"></xsl:value-of>
       </td>
      </tr>
      <tr style="background-color:#faf0e6; color:#00008b;">
       <td>
        <xsl:value-of select="preparation_steps"></xsl:value-of>
       </td>
      </tr>
      <tr style="background-color:#faf0e6; color:#00008b;">
       <td>
        <xsl:value-of select="nutritional_facts"></xsl:value-of>
       </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:value-of>
   </xsl:attribute>
   <xsl:attribute name="width">
    <xsl:value-of select="./@x"></xsl:value-of>
   </xsl:attribute>
   <xsl:attribute name="height">
    <xsl:value-of select="./@y"></xsl:value-of>
   </xsl:attribute>
  </img>
 </xsl:template>
 <!--     template "ingredient_list"       -->
 <xsl:template match="ingredient_list">
  <xsl:for-each select="ingredient">
   <xsl:value-of select="."></xsl:value-of>
   <br></br>
  </xsl:for-each>
 </xsl:template>
 <!--     template "preparation_steps"       -->
 <xsl:template match="preparation_steps">
  <xsl:for-each select="step">
   <xsl:value-of select="."></xsl:value-of>
   <br></br>
  </xsl:for-each>
 </xsl:template>
 <!--     template "nutritional_facts"       -->
 <xsl:template match="nutritional_facts">
  <xsl:for-each select="item">
   <td style="font-size:9pt;">
    <xsl:value-of select="."></xsl:value-of>
   </td>
  </xsl:for-each>
 </xsl:template>
</xsl:stylesheet>


