<?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="cv/@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="cv"/>
					<tr>
						<td>
							<br/>
							<br/>
							<br/>
							<div align="center" style="border-top:1px solid black;font-family:verdana; font-size:10px; color:red;">
						End of Curriculum Vitae
					</div>
						</td>
					</tr>
				</table>
			</body>
		</html>
	</xsl:template>
	<xsl:template match="cv">
		<tr>
			<td>
				<table width="100%" cellspacing="0" cellpadding="0">
					<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>
							<font color="darkblue" style="font-size:13px">
								<xsl:value-of select="@roll"/>, International Institute of Information Technology,<br/>
						Gachibowli, Hyderabad-500019, INDIA. <br/>
								<br/>
								<table border="0" cellpadding="0" cellspacing="0">
									<tr>
										<td width="100">EMail: </td>
										<td>
											<xsl:value-of select="@login"/>@students.iiit.net</td>
									</tr>
									<tr>
										<td>HomePage:</td>
										<td>
											<a>
												<xsl:attribute name="href">
											http://students.iiit.net/~<xsl:value-of select="@login"/></xsl:attribute>
										http://students.iiit.net/~<xsl:value-of select="@login"/>/
									</a>
										</td>
									</tr>
								</table>
							</font>
						</td>
						<td align="right">
							<img height="200">
<!--								<xsl:attribute name="src"><xsl:value-of select="base"/>/<xsl:value-of select="photo"/></xsl:attribute>	-->
								<xsl:attribute name="src"><xsl:value-of select="photo"/></xsl:attribute>
							</img>
						</td>
					</tr>
				</table>
				<br/>
				<br/>
			</td>
		</tr>
		<xsl:apply-templates select="education"/>
		<xsl:apply-templates select="awards"/>
		<xsl:apply-templates select="publications"/>
		<xsl:apply-templates select="projects"/>
		<xsl:apply-templates select="workexp"/>
		<xsl:apply-templates select="softskills"/>
		<xsl:apply-templates select="interests"/>
		<xsl:apply-templates select="objective"/>
		<xsl:apply-templates select="misc"/>
	</xsl:template>
	<xsl:template match="education">
		<tr>
			<td>
				<div class="Title">Education</div>
				<table width="85%" align="right">
					<xsl:apply-templates select="edurecord"/>
				</table>
				<br/>
				<br/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="edurecord">
		<tr>
			<td rowspan="2" valign="top">
				<li/>
			</td>
			<td>
				<b>
					<xsl:value-of select="degree"/>
				</b>
			</td>
		</tr>
		<tr>
			<td>
				<xsl:value-of select="inst"/>(<xsl:value-of select="desc"/>)</td>
		</tr>
	</xsl:template>
	<xsl:template match="awards">
		<tr>
			<td>
				<div class="Title">Achievements</div>
				<table width="85%" align="right">
					<xsl:for-each select="awardrecord">
						<tr>
							<td valign="top">
								<li/>
							</td>
							<td>
								<xsl:value-of select="."/>
							</td>
						</tr>
					</xsl:for-each>
				</table>
				<br/>
				<br/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="publications">
		<tr>
			<td>
				<div class="Title">Publications</div>
				<table width="85%" align="right">
					<xsl:for-each select="pubrecord">
						<tr>
							<td valign="top">
								<li/>
							</td>
							<td>
								<xsl:value-of select="."/>
							</td>
						</tr>
					</xsl:for-each>
				</table>
				<br/>
				<br/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="projects">
		<tr>
			<td>
				<div class="Title">Projects</div>
				<table width="85%" align="right">
					<xsl:apply-templates select="prorecord"/>
				</table>
				<br/>
				<br/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="prorecord">
		<tr>
			<td rowspan="2" valign="top">
				<li/>
			</td>
			<td align="left">
				<a class="Project">
					<a>
						<xsl:if test="url">
<!--							<xsl:attribute name="href">
							project://<xsl:value-of select="url"/>@<xsl:value-of select="/cv/@login"/></xsl:attribute>	-->
							<xsl:attribute name="href"><xsl:value-of select="url"/></xsl:attribute>
						</xsl:if>
						<xsl:value-of select="title"/>
					</a>
				</a>
			</td>
		</tr>
		<tr>
			<td>
				<xsl:value-of select="desc"/>
			</td>
		</tr>
		<tr>
			<td>
				<img src="trans.gif" height="3" width="3"/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="workexp">
		<tr>
			<td>
				<div class="Title">Work Experience</div>
				<table width="85%" align="right">
					<xsl:for-each select="exprecord">
						<tr>
							<td valign="top">
								<li/>
							</td>
							<td>
								<xsl:value-of select="."/>
							</td>
						</tr>
					</xsl:for-each>
				</table>
				<br/>
				<br/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="softskills">
		<tr>
			<td>
				<div class="Title">Skillset</div>
				<table width="85%" align="right">
					<xsl:apply-templates select="softrecord"/>
				</table>
				<br/>
				<br/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="softrecord">
		<tr>
			<td style="font-weight:bold" width="35%">
				<xsl:value-of select="category"/>
			</td>
			<td>
				<xsl:value-of select="softwarelist"/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="interests">
		<tr>
			<td>
				<div class="Title">Interests</div>
				<table width="85%" align="right">
					<xsl:for-each select="intrecord">
						<tr>
							<td>
								<xsl:value-of select="."/>
							</td>
						</tr>
					</xsl:for-each>
				</table>
				<br/>
				<br/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="objective">
		<tr>
			<td>
				<div class="Title">Objective</div>
				<table width="85%" align="right">
					<tr>
						<td>
							<xsl:value-of select="."/>
						</td>
					</tr>
				</table>
				<br/>
				<br/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="misc">
		<tr>
			<td>
				<div class="Title">Miscellaneous</div>
				<table width="85%" align="right">
					<xsl:apply-templates select="paragraph"/>
					<xsl:apply-templates select="points"/>
				</table>
				<br/>
				<br/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="paragraph">
		<tr>
			<td>
				<xsl:value-of select="."/>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="points">
		<xsl:for-each select="point">
			<tr>
				<td valign="top">
					<li/>
				</td>
				<td>
					<xsl:value-of select="."/>
				</td>
			</tr>
		</xsl:for-each>
	</xsl:template>
</xsl:stylesheet>
