<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsl:include href="htmlformat.xml"/> 

	<xsl:template match="/">
		<html>
			<head>
			    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
				<script type="text/javascript">
				_uacct = "UA-482330-5";
				urchinTracker();
				</script>	
				<xsl:for-each select="feature">
					<xsl:for-each select="title">
					<title>
						<xsl:apply-templates select="text() "/>
					</title>
					</xsl:for-each>
				 </xsl:for-each>
        <script language="javascript" src="scripts/xsl_mop-up.js"></script>

      </head>
			<body onload="go_decoding();">
        <div id="cometestme" style="display:none;">
          <xsl:text disable-output-escaping="yes">&amp;amp;</xsl:text>
        </div>
			<table width="340" border="0" cellpadding="8" cellspacing="0" bgcolor="#ffffff">
			<tr><td><a href="javascript:history.back();">Back</a></td></tr>
				<xsl:for-each select="feature">
					<tr>
						<td>
							<xsl:if test="title/text()">
								<span name="decodeable">
									<b>
										<font size="5"><xsl:value-of select="title/text()" disable-output-escaping="yes"/></font>
									</b>
									<br />
								</span>
								<!--<b>
									<font size="5">
										<xsl:apply-templates/>
									</font>
								</b>-->
							</xsl:if>
							<xsl:if test="subTitle/text()">
								<span name="decodeable">
									<b><xsl:value-of select="subTitle/text()" disable-output-escaping="yes"/></b>
									<br/>
								</span>
								<!--<xsl:for-each select="subTitle">
									<b>
										<xsl:apply-templates/>
									</b>
									<br/>
								</xsl:for-each>-->
							</xsl:if>
							<img src="http://www.culinary.net/images/onlinefeatures/onthemenu_green.gif" border="0" alt=""/>
							<br/>
							
								<xsl:for-each select="recipe">
									<xsl:variable name="id" select="@id"/>
									<a href="#{$id}">										
										<xsl:for-each select="title">
											<xsl:apply-templates/>
										</xsl:for-each>
									</a>
									<br/>
								</xsl:for-each>
							
							<br/>
							<xsl:for-each select="feature">
								<xsl:apply-templates/>
							</xsl:for-each>
						</td>
					</tr>

					<xsl:for-each select="section">
						<tr>
							<td>
								<a>
									<xsl:attribute name="name">
										<xsl:value-of select="@id"/>
									</xsl:attribute>
								</a>
								<xsl:for-each select="image">
									<xsl:if test="string-length(@src)>0">
										<xsl:for-each select="@src">
											<img  align="right" vspace="5" hspace="8" border="1" width="150" height="150">
												<xsl:attribute name="src">
													<xsl:value-of select="." />
												</xsl:attribute>
												<xsl:attribute name="alt">
													<xsl:value-of select="../alt" />
												</xsl:attribute>
											</img>
										</xsl:for-each>
									</xsl:if>
								</xsl:for-each>
								<xsl:if test="title/text()">
									<b>
										<font size="4">
											<xsl:for-each select="title">
												<xsl:apply-templates/>
											</xsl:for-each>
										</font>
									</b>
								</xsl:if>
								<p>
								  <span name="decodeable">
									<xsl:value-of select="content/text()" disable-output-escaping="yes"/>
								  </span>
								</p>
							</td>
						</tr>					

					</xsl:for-each>
					<xsl:for-each select="recipe">
						<tr>
							<td>
								<xsl:variable name="id" select="@id"/>
								<a name="{$id}">
									<xsl:attribute name="name">
										<xsl:value-of select="@id"/>
									</xsl:attribute>
								</a>
								<xsl:for-each select="descriptionImage">
									<xsl:if test="string-length(@src)>0">
										<xsl:for-each select="@src">
											<img align="right" vspace="5" hspace="8" border="1" width="150" height="150">
												<xsl:attribute name="src">
													<xsl:value-of select="." />
												</xsl:attribute>
												<xsl:attribute name="alt">
													<xsl:value-of select="../alt" />
												</xsl:attribute>
											</img>
										</xsl:for-each>
									</xsl:if>
								</xsl:for-each>
								<b>
									<font size="5">
										<xsl:for-each select="title">
											<xsl:apply-templates/>
										</xsl:for-each>
									</font>
								</b>
								<xsl:if test="difficulty/text()">
									<p>
										<font>
											<strong>Recipe Difficulty</strong>
										</font>
										<br/>
										<xsl:for-each select="difficulty">
											<xsl:apply-templates/>
										</xsl:for-each>
									</p>
								</xsl:if>
								<xsl:if test="description/text()">
									<p>
										<font>
											<strong>Description</strong>
										</font>
										<br/>
										<span name="decodeable">
											<xsl:value-of select="description/text()" disable-output-escaping="yes"/>
										</span>
									</p>
								</xsl:if>
								<xsl:if test="ingredients/text()">
									<p>
										<font>
											<strong>Ingredients</strong>
										</font>
										<br/>
										<span name="decodeable">
											<xsl:value-of select="ingredients/text()" disable-output-escaping="yes"/>
										</span>
									</p>
								</xsl:if>
								<xsl:if test="preparation/text()">
									<p>
										<font>
											<strong>Preparation</strong>
										</font>
										<br/>
										<span name="decodeable">
											<xsl:value-of select="preparation/text()" disable-output-escaping="yes"/>
										</span>
									</p>
								</xsl:if>
                <xsl:if test="nutrition/text()">
                  <p>
                    <!--<font>
											<strong>Nutrition</strong>
										</font>
										<br/>-->
                    <strong>
                      <span name="decodeable">
                        <xsl:value-of select="nutrition/text()" disable-output-escaping="yes"/>
                      </span>
                    </strong>
                    <!--<xsl:for-each select="nutrition">
										<xsl:apply-templates/>
									</xsl:for-each>-->
                  </p>

                </xsl:if>
                <table width="340" border="0" cellpadding="8" cellspacing="0" bgcolor="#ffffff">
                  <tr>
                    <xsl:choose>
                      <xsl:when test="calories/text()">
                        <td align="right">
                          <font>
                            <strong>Calories</strong>
                          </font>
                        </td>
                        <td align="left">
                          <xsl:for-each select="calories">
                            <xsl:apply-templates/>
                          </xsl:for-each>
                        </td>
                        <td></td>
                      </xsl:when>
                      <xsl:otherwise>

                      </xsl:otherwise>
                    </xsl:choose>

                    <xsl:choose>
                      <xsl:when test="totalFat/text()">
                        <td align="right">
                          <font>
                            <strong>Total Fat</strong>
                          </font>
                        </td>
                        <td align="left">
                          <xsl:for-each select="totalFat">
                            <xsl:apply-templates/>
                          </xsl:for-each>
                        </td>
                      </xsl:when>
                      <xsl:otherwise>

                      </xsl:otherwise>
                    </xsl:choose>
                  </tr>
                  <tr>
                    <xsl:choose>
                      <xsl:when test="cholesterol/text()">
                        <td align="right">
                          <font>
                            <strong>Cholesterol</strong>
                          </font>
                        </td>
                        <td align="left">
                          <xsl:for-each select="cholesterol">
                            <xsl:apply-templates/>
                          </xsl:for-each>
                        </td>
                        <td></td>
                      </xsl:when>
                      <xsl:otherwise>

                      </xsl:otherwise>
                    </xsl:choose>

                    <xsl:choose>
                      <xsl:when test="sodium/text()">
                        <td align="right">
                          <font>
                            <strong>Sodium</strong>
                          </font>
                        </td>
                        <td align="left">
                          <xsl:for-each select="sodium">
                            <xsl:apply-templates/>
                          </xsl:for-each>
                        </td>
                      </xsl:when>
                      <xsl:otherwise>
                      </xsl:otherwise>
                    </xsl:choose>
                  </tr>
                  <tr>
                    <xsl:choose>
                      <xsl:when test="carbs/text()">
                        <td align="right">
                          <font>
                            <strong>Carbohydrates</strong>
                          </font>
                        </td>
                        <td align="left">
                          <xsl:for-each select="carbs">
                            <xsl:apply-templates/>
                          </xsl:for-each>
                        </td>
                        <td></td>
                      </xsl:when>
                      <xsl:otherwise>

                      </xsl:otherwise>
                    </xsl:choose>

                    <xsl:choose>
                      <xsl:when test="protien/text()">
                        <td align="right">
                          <font>
                            <strong>Protein</strong>
                          </font>
                        </td>
                        <td align="left">
                          <xsl:for-each select="protien">
                            <xsl:apply-templates/>
                          </xsl:for-each>
                        </td>
                      </xsl:when>
                      <xsl:otherwise>

                      </xsl:otherwise>
                    </xsl:choose>
                  </tr>
                </table>
								<xsl:if test="timeType1/text()">
									<p>
										<font>
											<strong>
												<xsl:for-each select="timeType1">
													<xsl:apply-templates/>
												</xsl:for-each>
												Time
											</strong>
										</font>
										<br/>
										<xsl:for-each select="time1">
											<xsl:apply-templates/>
										</xsl:for-each>
									</p>
								</xsl:if>
								<xsl:if test="timeType2/text()">
									<p>
										<font>
											<strong>
												<xsl:for-each select="timeType2">
													<xsl:apply-templates/>
												</xsl:for-each>
												Time
											</strong>
										</font>
										<br/>
										<xsl:for-each select="time2">
											<xsl:apply-templates/>
										</xsl:for-each>
									</p>
								</xsl:if>
								<xsl:if test="timeType3/text()">
									<p>
										<font>
											<strong>
												<xsl:for-each select="timeType3">
													<xsl:apply-templates/>
												</xsl:for-each>
												Time
											</strong>
										</font>
										<br/>
										<xsl:for-each select="time3">
											<xsl:apply-templates/>
										</xsl:for-each>
									</p>
								</xsl:if>
								<xsl:if test="timeType4/text()">
									<p>
										<font>
											<strong>
												<xsl:for-each select="timeType4">
													<xsl:apply-templates/>
												</xsl:for-each>
												Time
											</strong>
										</font>
										<br/>
										<xsl:for-each select="time4">
											<xsl:apply-templates/>
										</xsl:for-each>
									</p>
								</xsl:if>
								<xsl:if test="timeType5/text()">
									<p>
										<font>
											<strong>
												<xsl:for-each select="timeType5">
													<xsl:apply-templates/>
												</xsl:for-each>
												Time
											</strong>
										</font>
										<br/>
										<xsl:for-each select="time5">
											<xsl:apply-templates/>
										</xsl:for-each>
									</p>
								</xsl:if>
                <xsl:if test="serves/text()">
                  <p>
                    <font>
                      <strong>Serves</strong>
                    </font>
                    <br/>
                    <span name="decodeable">
                      <xsl:value-of select="serves/text()" disable-output-escaping="yes"/>
                    </span>
                  </p>
                </xsl:if>
                <xsl:if test="variations/text()">
                  <p>
                    <font>
                      <strong>Notes, Tips &amp; Suggestions</strong>
                    </font>
                    <br/>
                    <span name="decodeable">
                      <xsl:value-of select="variations/text()" disable-output-escaping="yes"/>
                    </span>
                  </p>
                </xsl:if>
							</td>
						</tr>
					</xsl:for-each>
					<xsl:if test="count(sponsor)>0">
						<tr>
							<td>
								<b>Source:</b>
							</td>
						</tr>
					</xsl:if>
					<xsl:for-each select="sponsor">
						<tr>
							<td>
								<a>
									<xsl:if test="string-length(url)>0">
										<xsl:attribute name="onClick">
											javascript:urchinTracker('<xsl:value-of select="url"/>');
										</xsl:attribute>
										<xsl:attribute name="href">
											<xsl:value-of select="url"/>
										</xsl:attribute>
									</xsl:if>
									<xsl:for-each select="name">
										<xsl:apply-templates/>
									</xsl:for-each>
								</a>
							</td>
						</tr>
					</xsl:for-each>
					<xsl:if test="count(link)>0">
						<tr>
							<td>
								<b>Links:</b>
							</td>
						</tr>
					</xsl:if>
					<xsl:for-each select="link">
						<tr>
							<td>
								<a>
									<xsl:if test="string-length(url)>0">
										<xsl:attribute name="onClick">
											javascript:urchinTracker('<xsl:value-of select="url"/>');
										</xsl:attribute>
										<xsl:attribute name="href">
											<xsl:value-of select="url"/>
										</xsl:attribute>
									</xsl:if>
									<xsl:for-each select="name">
										<xsl:apply-templates/>
									</xsl:for-each>
								</a>
							</td>
						</tr>
					</xsl:for-each>					
					<tr>
						<td>
							<p>
                <span name="decodeable">
                  <xsl:value-of select="footer/text()" disable-output-escaping="yes"/>
                </span>
							</p>
						</td>
					</tr>
				</xsl:for-each>
			</table>

			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>

