<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/02/xpath-functions" xmlns:xdt="http://www.w3.org/2005/02/xpath-datatypes">

<xsl:template  match="/">

<html>
	<head>
		<title>Penpals and Snacks</title>
	</head>
	<body>
	<table width="650" align="center">
		<tbody>
			<tr>
				<td>
					<h3>News From Glenda's Penpals!</h3>
		<p>Here's what we like to eat:</p>
		<table frame="box">
			<tbody>
				<tr>
					<td>
						<xsl:for-each select="//SnackFood">
						<ul >										
						<li>
						<xsl:value-of select="."></xsl:value-of>					
						</li>					
						</ul>
						</xsl:for-each>	
					</td>
				</tr>
			</tbody>
		</table>
		
		
		<p>Whenever we have a party, my first penpal, 
			<span style="color:purple">
			<xsl:value-of select="PenPals/Person[1]/FirstName"></xsl:value-of>
			<span style="margin-left:5px">
			<xsl:value-of select="PenPals/Person[1]/LastName"></xsl:value-of>,
			</span>
			</span>
			starts with her last snackfood, <xsl:value-of select="PenPals/Person[1]/SnackFood[2]"></xsl:value-of>, just like my last penpal, 
			<span style="color:green">
			<xsl:value-of select="PenPals/Person[3]/FirstName"></xsl:value-of>
			<span style="margin-left:5px">
			<xsl:value-of select="PenPals/Person[3]/LastName"></xsl:value-of>,
			</span>
			</span>
			who eats <xsl:value-of select="PenPals/Person[3]/SnackFood[2]"></xsl:value-of>. It's my second penpal, 
			<span style="color:maroon">
			<xsl:value-of select="PenPals/Person[2]/FirstName"></xsl:value-of>
			<span style="margin-left:5px">
			<xsl:value-of select="PenPals/Person[2]/LastName"></xsl:value-of>,
			</span>
			</span>
			who insists at starting with her first snack: <xsl:value-of select="PenPals/Person[2]/SnackFood[1]"></xsl:value-of>!
		</p>
		
		<p>We always scream: "If everybody started with their first snack we'd be eating"</p>
		<table frame="box" >
			<tbody>
				<tr>
					<td>
						<xsl:for-each select="//SnackFood[1]">
						<ul>
						<li><xsl:value-of select="."></xsl:value-of>	</li>						
						</ul>
						</xsl:for-each>	
					</td>
				</tr>
			</tbody>
		</table>
				</td>
			</tr>
		</tbody>
	</table>
		
		
					
		
	<hr width="75%"></hr>					
	</body>
</html>
</xsl:template>	
</xsl:stylesheet>

