<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns="http://www.w3.org/1999/xhtml">

	<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"
		media-type="application/xhtml+xml" encoding="iso-8859-1"
		doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
		doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>

  <xsl:template match="/">
		<html>
			<head>
				<title>Photo Gallery with XML</title>
				<meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-1"/>
				<link href="../myxmlproject.css" rel="stylesheet" type="text/css" ></link>
				<link href="autogallery.css" rel="stylesheet" type="text/css" ></link>
				<script src="sherrypics.js" ></script>
			</head>

			<body onload="showpicture('{body/photo/photofile}')">
			    <div id="page"  align="center">
				   <div id="mainphotos">
				      <div id="photomenu">
				         <div class="photobutton">
  				         <xsl:for-each select="body/photo">
   						    <xsl:variable name="photofile" select="photofile" /> 
						    <xsl:variable name="buttonfile" select="buttonfile" /> 
						    <a onclick="showpicture('{photofile}')"> <img height="40" width="40" src="{photofile}" /></a>
				         </xsl:for-each>
				         </div> 
				      </div>
				      <div id="photos">
	   				     <div id="picturearea" style="float: left; width: 550px; height: 550px; margin-left: 20px"> </div>
				      </div>
				   </div>
				</div>
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>