<?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:template match="/">
		<html>
			<head>
				<title>
					<xsl:value-of select="project/@name"/>
				</title>
				<style type="text/css">
					a:link	{
								font-family: verdana;
								font-size: 13px;
								font-weight: normal;
								color: brown;
								}
				
					a:visited	{ color: brown; }
					a:hover	{ color: red; }
					a:active{ color: brown; }
				
					.Title	{ 
								font-family: arial-black;
								font-size: 15px;
								font-weight: bold;
								color: green;
								border-bottom: 1px solid green;
								border-top: 1px solid lightblue;
								}
					
					.Project {
								border-bottom: 1px solid #fffdfd;
								border-top: 1px solid #fffdfd;
								border-right: 1px solid #fffdfd;
								border-left: 1px solid #fffdfd;
								}
					
					table 	{ 
								font-family: verdana;
								font-size: 13px;
								}
				</style>
			</head>
			<body topmargin="20" leftmargin="0">
				<table cellspacing="1" bgcolor="#ffffff" cellpadding="5" align="center" width="90%">
					<xsl:apply-templates select="project"/>
					<tr>
						<td>
							<br/>
							<br/>
							<br/>
							<div align="center" style="border-top:1px solid black;font-family:verdana; font-size:10px; color:red;">
						End of Project Page
					</div>
						</td>
					</tr>
				</table>
			</body>
		</html>
	</xsl:template>
	<xsl:template match="project">
		<tr>
			<td align="left" valign="bottom" style="font-family:arial-black; font-size:25px; font-weight:bold;">
				<font color="#000000">
					<xsl:value-of select="@name"/>
					<br/>
				</font>
				<br/>
			</td>
		</tr>
		<xsl:apply-templates select="team"/>
		<xsl:apply-templates select="duration"/>
		<xsl:apply-templates select="env"/>
		<xsl:apply-templates select="guide"/>
		<xsl:apply-templates select="abstract"/>
		<xsl:apply-templates select="misc"/>
	</xsl:template>
	<xsl:template match="team">
		<tr>
			<td>
				<div class="Title">Members</div>
				<table align="right" width="85%">
					<xsl:apply-templates select="member"/>
				</table>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="member">
		<tr>
			<td width="10">
				<li/>
			</td>
			<td>
				<a>
					<xsl:if test="login">
						<xsl:attribute name="href">../../~<xsl:value-of select="login"/>/cv.xml</xsl:attribute>
					</xsl:if>
					<xsl:value-of select="name"/>
				</a>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="duration">
		<tr>
			<td>
				<div class="Title">Duration</div>
				<table align="right" width="85%">
					<tr>
						<td>
							<xsl:value-of select="."/>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="env">
		<tr>
			<td>
				<div class="Title">Environment</div>
				<table align="right" width="85%">
					<tr>
						<td>
							<table width="100%">
								<xsl:if test="os">
									<tr>
										<td>
											<b>Operating Systems</b>
										</td>
										<td>
											<xsl:value-of select="os"/>
										</td>
									</tr>
								</xsl:if>
								<xsl:if test="soft">
									<tr>
										<td>
											<b>Software</b>
										</td>
										<td>
											<xsl:value-of select="soft"/>
										</td>
									</tr>
								</xsl:if>
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="guide">
		<tr>
			<td>
				<div class="Title">Project Guide/Company</div>
				<table align="right" width="85%">
					<tr>
						<td>
							<xsl:value-of select="."/>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="abstract">
		<tr>
			<td>
				<div class="Title">Abstract</div>
				<table align="right" width="85%">
					<xsl:apply-templates select="sub"/>
					<xsl:apply-templates select="paragraph"/>
					<xsl:apply-templates select="points"/>
				</table>
				<br/>
				<br/>
			</td>
		</tr>
		<tr>
			<td>
				<table align="right" width="85%">
					<xsl:for-each select="/project/descfile">
						<tr>
							<td/>
							<td>
								<br/>
								<a>
									<xsl:attribute name="href"><xsl:value-of select="url"/></xsl:attribute>
									<xsl:value-of select="@name"/>
								</a>
							</td>
						</tr>
					</xsl:for-each>
				</table>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="misc">
		<tr>
			<td>
				<div class="Title">Miscellaneous </div>
				<table align="right" width="85%">
					<tr>
						<td>
							<xsl:value-of select="."/>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="paragraph">
		<tr>
			<td>
				<xsl:value-of select="."/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="sub">
		<tr>
			<td>
				<b>
					<xsl:value-of select="@name"/>
				</b>
				<xsl:if test="paragraph">
					<xsl:value-of select="paragraph"/>
				</xsl:if>
				<table align="right" width="95%">
					<xsl:apply-templates select="points"/>
				</table>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="points">
		<xsl:for-each select="point">
			<tr>
				<td valign="top" width="1%">
					<li/>
				</td>
				<td>
					<xsl:value-of select="."/>
				</td>
			</tr>
		</xsl:for-each>
	</xsl:template>
</xsl:stylesheet>
