<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:variable name="StoreInfo" select="document('StoreInfo.xml')/Horticulture_Heaven"/>
<xsl:variable name="bgcolor"><xsl:value-of select="$StoreInfo/pages[@color = $Color]/color"/></xsl:variable>
<xsl:variable name="image"><xsl:value-of select="$StoreInfo/pages[@color = $Color]/image"/></xsl:variable>
<xsl:param name="Color" />
<xsl:template match="FlowerStock">
<html>
<head>
<title>Horticulture Heaven | <xsl:value-of select="$StoreInfo/pages[@color = $Color]/title"/></title>
<link href="d2.css" rel="stylesheet" type="text/css"/>
</head>
<body style="background-color:{$bgcolor};">
<div align="center">
<table class="main" cellpadding="5" cellspacing="0" width="750px">
<tr>
<td colspan="2" align="center">
<img src="header.gif" alt="Header Image"/>
</td>
</tr>
<tr>
<td valign="top" width="10%">
<table class="navigation">
<tr>
<td valign="top" align="center">
<table cellpadding="0" cellspacing="0" style="width: 115px;">
<tr>
<td class="nav_title">Navigation</td>
</tr>
<tr>
<td class="nav_mid"><a href="index.html" title="Home">Home</a></td>
</tr>
<tr>
<td class="nav_mid"><a href="red.html" title="Red">Red Flowers</a></td>
</tr>
<tr>
<td class="nav_mid"><a href="pink.html" title="Pink">Pink Flowers</a></td>
</tr>
<tr>
<td class="nav_mid"><a href="yellow.html" title="Yellow">Yellow Flowers</a></td>
</tr>
<tr>
<td class="nav_mid"><a href="white.html" title="white">White Flowers</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" align="center">
<table cellpadding="0" cellspacing="0" style="width: 115px;">
<tr>
<td class="nav_title">Address</td>
</tr>
<tr>
<td class="nav_mid" style="font-size:10px;">
<xsl:value-of select="$StoreInfo/locations/address"/>,
<xsl:value-of select="$StoreInfo/locations/city"/>, <xsl:value-of select="$StoreInfo/locations/state"/><xsl:text> </xsl:text>
<xsl:value-of select="$StoreInfo/locations/zip"/>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" align="center">
<table cellpadding="0" cellspacing="0" style="width: 115px;">
<tr>
<td class="nav_title">Contact Info</td>
</tr>
<tr>
<td class="nav_mid" style="font-size:10px;">
Ph: <xsl:value-of select="$StoreInfo/locations/contact/phone"/>
<br/>
Fax: <xsl:value-of select="$StoreInfo/locations/contact/fax"/>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" style="width: 115px;">
<tr>
<td class="nav_title">Hours</td>
</tr>
<tr>
<td class="nav_mid" style="font-size:10px; text-align: left; padding: 3px;">
<xsl:for-each select="$StoreInfo/locations/hours">
<font style="font-weight: bold;">
<xsl:value-of select="@day"/>
</font>
<br/>
<span style="position: relative; left: 8px;">
<xsl:value-of select="./start"/><xsl:text> </xsl:text>-<xsl:text> </xsl:text><xsl:value-of select="./end"/>
</span>
<br/>
</xsl:for-each>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td valign="top" align="center" width="90%">
<table class="flowers" style="border-bottom: 1px solid #000000;" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style="border-right: 1px solid #000000;">
<img src="{$image}" alt="Image of Flower"/>
</td>
<td style="padding: 5px;">
<p>
<xsl:value-of select="$StoreInfo/pages[@color = $Color]/description"/>
</p>
</td>
</tr>
</table>
<br/>
<table class="flowers" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="flower_title" style="border-right:1px solid #000000;">Name</td>
<td class="flower_title" style="border-right:1px solid #000000;">ID #</td>
<td class="flower_title">Description</td>
</tr>
<xsl:for-each select="flower[@color = $Color]">
<xsl:sort select="@type"/>
<xsl:if test="not(preceding-sibling::flower[@color = $Color]/@type = @type)">
<tr>
<td class="flower_header" colspan="3"><xsl:value-of select="@type"/></td>
</tr>
</xsl:if>
<tr>
<td class="flower_info" style="border-right:1px solid #000000;">
<xsl:value-of select="name"/>
</td>
<td class="flower_info" style="border-right:1px solid #000000;">
<xsl:value-of select="id"/>
</td>
<td class="flower_info">
<xsl:value-of select="description"/>
</td>
</tr>
</xsl:for-each>
</table>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<table class="footer" cellpadding="0" cellspacing="0">
<tr>
<td>
<xsl:for-each select="$StoreInfo/footer/text">
<xsl:value-of select="."/>
<br/>
</xsl:for-each>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>