<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:param name="VideoName"/>


	<xsl:output method="html" encoding="UTF-8"/>

	<xsl:template match="/">
		<html>
			<head>
				<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
				<title>VideoCenter - Video Listing</title>
				<style type="text/css"><![CDATA[            body
                { color: #ffffff;
                background: #000000;        
                font-family: Helvetica, Arial}
            
            table
                {
                
               }
        
            th
                {
                text-align: left;
                font-family: Times;
                color: #ffffff;
                background: #ff0000;
                vertical-align: bottom; }
        
            tr
                { vertical-align: top; }

            td
                {
                font-size: 80%;
                color: #ffffff; 
                background: #000000;
                vertical-align: top; }
                
            a { color: #ffffff;
              text-decoration: none }
]]>
				</style>
			</head>
			<title>VideoCenter - Video Listing</title>
			<body>
				<!-- Page Headers -->
				<center>
					<img align="bottom" width="600" src="images/header/title.gif" alt="Video Center" border="0" height="26"/>
					<br/>
					<img align="bottom" width="600" src="images/header/listing.gif" alt="listing" border="0" height="22"/>
					<br/>
				</center>
				<center>
					<table cellSpacing="0" width="600" border="0" cellPadding="4">
						<tr bgColor="#00a000">
							<th width="185" style="BACKGROUND: #00a000">
								<b>Title</b>
							</th>
							<th width="200" style="BACKGROUND: #00a000">
								<b>Summary</b>
							</th>
							<th width="50" style="BACKGROUND: #00a000">
								<b>Genre</b>
							</th>
							<th width="50" style="BACKGROUND: #00a000">
								<b>Format</b>
							</th>
							<th width="65" style="BACKGROUND: #00a000">
								<b>Price</b>
							</th>
						</tr>
						<xsl:choose>
							<xsl:when test="string-length($VideoName)=0">
								<xsl:apply-templates select="/result/videos/video"/>
							</xsl:when>
							<xsl:otherwise>
								<xsl:apply-templates select="/result/videos/video[title=$VideoName]"/>
							</xsl:otherwise>
						</xsl:choose>
					</table>
				</center>
				<center>
					<table cellSpacing="0" width="600" border="0" cellPadding="4">
						<!-- Navigation -->
						<tr>
							<td width="600" colSpan="3">
								<center>
									<a style="TEXT-DECORATION: none" href="/scripts/xlnisapi.dll/videoctr/videos.xml?xslsheet=videoctr:/style/list.xsl&amp;imageRoot=/videoctr/images/&amp;genre=action">action</a>|<a style="TEXT-DECORATION: none" href="/scripts/xlnisapi.dll/videoctr/videos.xml?xslsheet=videoctr:/style/list.xsl&amp;imageRoot=/videoctr/images/&amp;genre=comedy">comedy</a> |<a style="TEXT-DECORATION: none" href="/scripts/xlnisapi.dll/videoctr/videos.xml?xslsheet=videoctr:/style/list.xsl&amp;imageRoot=/videoctr/images/&amp;genre=drama">drama</a> |<a style="TEXT-DECORATION: none" href="/scripts/xlnisapi.dll/videoctr/videos.xml?xslsheet=videoctr:/style/list.xsl&amp;imageRoot=/videoctr/images/&amp;genre=family">family</a> |<a style="TEXT-DECORATION: none" href="/scripts/xlnisapi.dll/videoctr/videos.xml?xslsheet=videoctr:/style/list.xsl&amp;imageRoot=/videoctr/images/&amp;genre=foreign">foreign</a> |<a style="TEXT-DECORATION: none" href="/scripts/xlnisapi.dll/videoctr/videos.xml?xslsheet=videoctr:/style/list.xsl&amp;imageRoot=/videoctr/images/&amp;genre=horror">horror</a> |<a style="TEXT-DECORATION: none" href="/scripts/xlnisapi.dll/videoctr/videos.xml?xslsheet=videoctr:/style/list.xsl&amp;imageRoot=/videoctr/images/&amp;genre=musical">musical</a> |<a style="TEXT-DECORATION: none" href="/scripts/xlnisapi.dll/videoctr/videos.xml?xslsheet=videoctr:/style/list.xsl&amp;imageRoot=/videoctr/images/&amp;genre=special">special</a> |<a style="TEXT-DECORATION: none" href="/videoctr/cart.asp"><font color="#ff0000">shopping cart</font></a></center>
							</td>
						</tr>
						<tr>
							<td align="left" width="100">
								<a href="http://www.exceloncorp.com/products/excelon.html">
									<img src="images/powerxln.gif" alt="Powered by eXcelon" border="0"/>
								</a>
							</td>
							<td width="400"/>
							<td align="right" width="100">
								<a href="http://www.exceloncorp.com/products/excelon_stylus.html">
									<img src="images/powerstylus.gif" alt="Designed with Stylus" border="0"/>
								</a>
							</td>
						</tr>
					</table>
				</center>
			</body>
		</html>
	</xsl:template>


	<!-- *** Start Video *** -->

	<xsl:template match="video">

		<tr>
			<!-- Title -->
			<td width="185" valign="TOP">
				<b>
					<xsl:apply-templates select="title"/>
				</b>
			</td>

			<!-- Image -->
			<td width="200" valign="TOP">
				<table border="0" cellpadding="2" cellspacing="0" width="215">
					<tr>
						<td width="47">
							<img src="images/video/{@id}.gif" align="BOTTOM" border="0" height="100"/>
						</td>

						<!--Summary -->
						<td width="153" valign="TOP">
							<font size="-1">
								<xsl:apply-templates select="summary"/>
							</font>
						</td>
					</tr>

					<!--Director-->
					<tr>
						<td width="153">
							<font size="-2">
								<xsl:apply-templates select="director"/>
								<br/>
								<br/>

								<!--Runtime-->
								<xsl:apply-templates select="runtime"/>
							</font>
						</td>
					</tr>
				</table>
			</td>

			<!-- Genre -->
			<td width="50" valign="TOP">
				<xsl:apply-templates select="genre"/>
			</td>

			<!-- Format -->
			<td width="165" valign="top" colspan="3">
				<table width="165">
					<tr>
						<td width="50" valign="TOP">
							<img src="images/format/vhs.gif" align="BOTTOM" border="0" width="45" height="15" alt="vhs"/>
						</td>
						<td width="61" valign="TOP">$16.99</td>
					</tr>

					<tr>
						<td width="50" valign="TOP">
							<img src="images/format/dvd.gif" align="BOTTOM" border="0" width="45" height="15" alt="dvd"/>
						</td>
						<td width="61" valign="TOP">$29.99</td>
					</tr>
				</table>
			</td>
		</tr>

		<tr>
			<td width="600" height="1" colspan="6">
				<img src="images/shared/white.gif" width="600" height="1"/>
			</td>
		</tr>
	</xsl:template>

	<!-- *** End Video *** -->


	<!--Templates-->

	<xsl:template match="title">
		<xsl:value-of select="."/>
	</xsl:template>

	<xsl:template match="summary">
		<xsl:value-of select="."/>
	</xsl:template>

	<xsl:template match="director">Director: <xsl:value-of select="."/><br/><xsl:apply-templates select="parent::video/studio"/><xsl:apply-templates select="parent::video/year"/></xsl:template>

	<xsl:template match="studio">Studio: <xsl:value-of select="parent::video/studio"/><br/></xsl:template>

	<xsl:template match="year">Year: <xsl:value-of select="parent::video/studio"/></xsl:template>


	<xsl:template match="runtime">Running Time: <xsl:value-of select="."/> minutes</xsl:template>

	<xsl:template match="genre">
		<xsl:value-of select="."/>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp.
<metaInformation>
<scenarios ><scenario default="yes" name="DebugVideosScenario" userelativepaths="yes" externalpreview="no" url="videos.xml" htmlbaseurl="..\VideoCenter" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" ><parameterValue name="VideoName" value="'Contact'"/></scenario></scenarios><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
</metaInformation>
-->