<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" indent="yes"
		doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
		doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" />
	<xsl:template match="/">
		<html>
		 	<xsl:attribute name="lang">en</xsl:attribute>
			<head>
				<title><xsl:value-of select="resume/personal/name" />'s Resume</title>
				<meta>
					<xsl:attribute name="name">author</xsl:attribute>
					<xsl:attribute name="content">John L. Batzer, Jr.</xsl:attribute>
				</meta>
				<meta>
					<xsl:attribute name="name">description</xsl:attribute>
					<xsl:attribute name="content">John L. Batzer, Jr.'s Resume</xsl:attribute>
				</meta>
				<meta>
					<xsl:attribute name="name">keywords</xsl:attribute>
					<xsl:attribute name="content">john,batzer,home page,homepage,resume,computer,software,web,asp,developer</xsl:attribute>
				</meta>
				<meta>
					<xsl:attribute name="name">language</xsl:attribute>
					<xsl:attribute name="content">en</xsl:attribute>
				</meta>
				<meta>
					<xsl:attribute name="http-equiv">Content-Type</xsl:attribute>
					<xsl:attribute name="content">text/html; charset=UTF-16</xsl:attribute>
				</meta>
				<link>
					<xsl:attribute name="rel">stylesheet</xsl:attribute>
					<xsl:attribute name="type">text/css</xsl:attribute>
					<xsl:attribute name="href">/resume/resume.css</xsl:attribute>
				</link>
				<style>
					<xsl:attribute name="type">text/css</xsl:attribute>
					table	{
						width:	671px;
					}

					a	{
						font-family:	"Garamond", sans-serif;
						font-size: 11pt;
					}

					li	{
						font-family: "Garamond", sans-serif;
						font-size: 11pt;
					}

					.packages	{
						padding-top: 12px;
					}

					.contactInformation	{
						font-family: "Garamond", sans-serif;
						font-size: 10pt;
						text-align: center;
					}

					.headerName	{
						font-family: "Garamond", sans-serif;
						font-size: 22pt;
						text-align: center;
						padding-top: 36px;
						padding-bottom: 36px;
					}

					.headerText	{
						font-family: "Garamond", sans-serif;
						font-size: 10pt;
						font-weight: normal;
						text-align: left;
					}

					.objectiveText	{
						font-family: "Garamond", sans-serif;
						font-size: 11pt;
						font-weight: normal;
						text-align: left;
					}

					.spacerCell	{
						width: 20px;
					}

					.spacerText	{
						font-size: 			1pt;
						color:				inherit;
						background-color: 	#FFFFFF;
						display: 			none;
					}

					.datesCell	{
						width: 217px;
						text-align: left;
						vertical-align: top;
					}

					.datesText		{
						font-family: "Garamond", sans-serif;
						font-size: 11pt;
						text-align: left;
						vertical-align: top;
					}

					.companyCell	{
						width: 259px;
						text-align: left;
						vertical-align: top;
					}

					.companyText	{
						font-family:	"Garamond", sans-serif;
						font-size: 11pt;
						text-align: left;
						vertical-align: top;
					}

					.addressCell	{
						width:			175px;
						text-align:		right;
						vertical-align:	top;
					}

					.addressText	{
						font-family: "Garamond", sans-serif;
						font-size: 11pt;
						vertical-align: top;
					}

					.jobTitleText	{
						font-family:	"Garamond", sans-serif;
						font-size: 12pt;
						font-weight: normal;
						font-style: italic;
					}

					.accomplishmentsText	{
						font-family:	"Garamond", sans-serif;
						font-size:		11pt;
						font-weight:	normal;
					}

					.infoText	{
						font-family:	"Garamond", sans-serif;
						font-size:		10pt;
						font-weight:	normal;
					}

					.referenceName	{
						font-size: 11pt;
						font-weight: bolder;
					}

					.note	{
						font-size: 9pt;
					}
				</style>
			</head>
			<body>
				<div>
					<xsl:attribute name="class">container</xsl:attribute>
					<xsl:attribute name="id">resume</xsl:attribute>
					<xsl:apply-templates />
				</div>
			</body>
		</html>
	</xsl:template>

	<xsl:template match="personal">
		<div>
			<xsl:attribute name="id">personal</xsl:attribute>
			<div>
				<xsl:attribute name="class">contactInformation</xsl:attribute>
				<a><xsl:attribute name="href">mailto:<xsl:value-of select="email" /></xsl:attribute><xsl:value-of select="email" /></a><br />
				<xsl:value-of select="address/street" /> - <xsl:value-of select="address/city" />, <xsl:value-of select="address/state" />  <xsl:value-of select="address/zip" /><br />
				<xsl:for-each select="phone">
					(<xsl:value-of select="@type" />): <xsl:value-of select="." />
				</xsl:for-each><br />
				<xsl:if test="string(homepage)">
					<a>
						<xsl:attribute name="href"><xsl:value-of select="homepage" /></xsl:attribute>
						<xsl:value-of select="homepage" />
					</a>
				</xsl:if>
			</div>
			<div>
				<xsl:attribute name="class">headerName</xsl:attribute>
				<xsl:value-of select="name" />
			</div>
		</div>
	</xsl:template>

	<xsl:template match="objective">
		<div>
			<xsl:attribute name="id">objective</xsl:attribute>
			<div>
				<xsl:attribute name="id">objectiveheader</xsl:attribute>
				<xsl:attribute name="class">headerText</xsl:attribute>
				OBJECTIVE
			</div>
			<hr />
			<table>
				<xsl:attribute name="summary">This is a layout table, formatting the objective of the resume</xsl:attribute>
				<tr>
					<td>
						<xsl:attribute name="class">spacerCell</xsl:attribute>
						<span>
							<xsl:attribute name="class">spacerText</xsl:attribute>
							-
						</span>
					</td>
					<td>
						<xsl:attribute name="class">infoCell</xsl:attribute>
						<div>
							<xsl:attribute name="class">objectiveText</xsl:attribute>
							<xsl:value-of select="." />
						</div>
					</td>
				</tr>
			</table>
		</div>
	</xsl:template>

	<xsl:template match="education">
		<div>
			<xsl:attribute name="id">education</xsl:attribute>
			<div>
				<xsl:attribute name="id">educationheaer</xsl:attribute>
				<xsl:attribute name="class">headerText</xsl:attribute>
				EDUCATION
			</div>
			<hr />
			<xsl:for-each select="school">
				<div>
					<table>
						<xsl:attribute name="summary">This is a layout table, formatting the education section of the resume</xsl:attribute>
						<tr>
							<td>
								<xsl:attribute name="class">spacerCell</xsl:attribute>
								<xsl:attribute name="rowspan">2</xsl:attribute>
								<span>
									<xsl:attribute name="class">spacerText</xsl:attribute>
									-
								</span>
							</td>
							<td>
								<xsl:attribute name="class">datesCell</xsl:attribute>
								<span>
									<xsl:attribute name="class">datesText</xsl:attribute>
									<xsl:if test="string(dates/start)">
										<xsl:for-each select="dates">
											<xsl:value-of select="start" /> - <xsl:value-of select="end" /><br />
										</xsl:for-each>
									</xsl:if>
								</span>
							</td>
							<td>
								<xsl:attribute name="class">companyCell</xsl:attribute>
								<span>
									<xsl:attribute name="class">companyText</xsl:attribute>
									<xsl:value-of select="name" />
								</span>
							</td>
							<td>
								<xsl:attribute name="class">addressCell</xsl:attribute>
								<span>
									<xsl:attribute name="class">addressText</xsl:attribute>
									<xsl:value-of select="address/city" />, <xsl:value-of select="address/state" />
								</span>
							</td>
						</tr>
						<tr>
							<td>
								<xsl:attribute name="colspan">3</xsl:attribute>
								<div>
									<xsl:attribute name="class">accomplishmentsText</xsl:attribute>
									<ul>
										<li><xsl:value-of select="degree" /> in <xsl:value-of select="major" /></li>
										<xsl:if test="string(minor)">
											<li>Minor In <xsl:value-of select="minor" /></li>
										</xsl:if>
										<xsl:if test="string(GPA)">
											<li>GPA: <xsl:value-of select="GPA" /></li>
										</xsl:if>
									</ul>
								</div>
							</td>
						</tr>
					</table>
				</div>
			</xsl:for-each>
		</div>
	</xsl:template>

	<xsl:template match="experience">
		<div>
			<xsl:attribute name="id">experience</xsl:attribute>
			<div>
				<xsl:attribute name="id">experienceheader</xsl:attribute>
				<xsl:attribute name="class">headerText</xsl:attribute>
				EXPERIENCE
			</div>
			<hr />
			<xsl:for-each select="job">
				<div>
					<table>
						<xsl:attribute name="summary">This is a layout table, formatting the job experience section of the resume</xsl:attribute>
						<tr>
							<td>
								<xsl:attribute name="class">spacerCell</xsl:attribute>
								<xsl:attribute name="rowspan">3</xsl:attribute>
								<span>
									<xsl:attribute name="class">spacerText</xsl:attribute>
									-
								</span>
							</td>
							<td>
								<xsl:attribute name="class">datesCell</xsl:attribute>
								<span>
									<xsl:attribute name="class">datesText</xsl:attribute>
									<xsl:for-each select="dates">
										<xsl:value-of select="start" /> - <xsl:value-of select="end" /><br />
									</xsl:for-each>
								</span>
							</td>
							<td>
								<xsl:attribute name="class">companyCell</xsl:attribute>
								<span>
									<xsl:attribute name="class">companyText</xsl:attribute>
									<xsl:value-of select="company" />
								</span>
							</td>
							<td>
								<xsl:attribute name="class">addressCell</xsl:attribute>
								<span>
									<xsl:attribute name="class">addressText</xsl:attribute>
									<xsl:if test="string(address/city)">
										<xsl:value-of select="address/city" />, <xsl:value-of select="address/state" />
									</xsl:if>
								</span>
							</td>
						</tr>
						<tr>
							<td>
								<xsl:attribute name="colspan">3</xsl:attribute>
								<xsl:attribute name="class">jobTitleCell</xsl:attribute>
								<div>
									<xsl:attribute name="class">jobTitleText</xsl:attribute>
									<xsl:value-of select="title" />
								</div>
							</td>
						</tr>
						<tr>
							<td>
								<xsl:attribute name="colspan">3</xsl:attribute>
								<xsl:attribute name="class">accomplishmentsCell</xsl:attribute>
								<div>
									<xsl:attribute name="class">accomplishmentsText</xsl:attribute>
									<ul>
										<xsl:for-each select="accomplishments/accomplishment">
											<li><xsl:value-of select="." /></li>
										</xsl:for-each>
									</ul>
								</div>
							</td>
						</tr>
					</table>
				</div>
			</xsl:for-each>
		</div>
	</xsl:template>

	<xsl:template match="languages">
		<div>
			<xsl:attribute name="id">languages</xsl:attribute>
			<div>
				<xsl:attribute name="id">languagesheader</xsl:attribute>
				<xsl:attribute name="class">headerText</xsl:attribute>
				PROGRAMMING LANGUAGES
			</div>
			<hr />
			<table>
				<xsl:attribute name="summary">This is a layout table, formatting the programming languages section of the resume</xsl:attribute>
				<tr>
					<td>
						<xsl:attribute name="class">spacerCell</xsl:attribute>
						<span>
							<xsl:attribute name="class">spacerText</xsl:attribute>
							-
						</span>
					</td>
					<td>
						<xsl:attribute name="class">infoCell</xsl:attribute>
						<ul>
							<xsl:attribute name="class">packages</xsl:attribute>
							<xsl:for-each select="package">
								<li>
									<xsl:value-of select="name" />
									<xsl:if test="string(abbreviation)"> (<xsl:value-of select="abbreviation" />)</xsl:if>
									 (<xsl:value-of select="familiarity" /> experience,
									 <xsl:choose>
										<xsl:when test="lastused='Currently'">currently used)</xsl:when>
										<xsl:otherwise>
											last used <xsl:value-of select="lastused" />)
										</xsl:otherwise>
									 </xsl:choose>
									 <xsl:if test="string(note)">
										<br />
										<span>
											<xsl:attribute name="class">note</xsl:attribute>
											<xsl:value-of select="note" />
										</span>
									 </xsl:if>
								</li>
							</xsl:for-each>
						</ul>
					</td>
				</tr>
			</table>
		</div>
	</xsl:template>

	<xsl:template match="software">
		<div>
			<xsl:attribute name="id">software</xsl:attribute>
			<div>
				<xsl:attribute name="id">softwareheader</xsl:attribute>
				<xsl:attribute name="class">headerText</xsl:attribute>
				SOFTWARE PACKAGES
			</div>
			<hr />
			<table>
				<xsl:attribute name="summary">This is a layout table, formatting the software packages section of the resume</xsl:attribute>
				<tr>
					<td>
						<xsl:attribute name="class">spacerCell</xsl:attribute>
						<span>
							<xsl:attribute name="class">spacerText</xsl:attribute>
							-
						</span>
					</td>
					<td>
						<xsl:attribute name="class">infoCell</xsl:attribute>
						<ul>
							<xsl:attribute name="class">packages</xsl:attribute>
							<xsl:for-each select="package">
								<li>
									<xsl:value-of select="name" />
									<xsl:if test="string(abbreviation)"> (<xsl:value-of select="abbreviation" />)</xsl:if>
									 (<xsl:value-of select="familiarity" /> experience,
									 <xsl:choose>
										<xsl:when test="lastused='Currently'">currently used)</xsl:when>
										<xsl:otherwise>
											last used <xsl:value-of select="lastused" />)
										</xsl:otherwise>
									 </xsl:choose>
									 <xsl:if test="string(note)">
										<br /><span>
											<xsl:attribute name="class">note</xsl:attribute>
											<xsl:value-of select="note" />
										</span>
									 </xsl:if>
								</li>
							</xsl:for-each>
						</ul>
					</td>
				</tr>
			</table>
		</div>
	</xsl:template>

	<xsl:template match="writing">
		<div>
			<xsl:attribute name="id">writing</xsl:attribute>
			<div>
				<xsl:attribute name="id">writingheader</xsl:attribute>
				<xsl:attribute name="class">headerText</xsl:attribute>
				WRITING SAMPLES
			</div>
			<hr />
			<table>
				<xsl:attribute name="summary">This is a layout table, formatting the writing samples of the resume</xsl:attribute>
				<tr>
					<td>
						<xsl:attribute name="class">spacerCell</xsl:attribute>
						<span>
							<xsl:attribute name="class">spacerText</xsl:attribute>
							-
						</span>
					</td>
					<td>
						<xsl:attribute name="class">infoCell</xsl:attribute>
						<ul>
							<xsl:attribute name="class">packages</xsl:attribute>
							<xsl:for-each select="sample">
								<li>
									<a>
										<xsl:attribute name="href"><xsl:value-of select="@url" /></xsl:attribute>
										<xsl:attribute name="onclick">window.open('<xsl:value-of select="@url" />'); return false;</xsl:attribute>
										<xsl:attribute name="onkeypress">window.open('<xsl:value-of select="@url" />'); return false;</xsl:attribute>
										<xsl:value-of select="." />
									</a>
								</li>
							</xsl:for-each>
						</ul>
					</td>
				</tr>
			</table>
		</div>
	</xsl:template>

	<xsl:template match="references">
		<div>
			<xsl:attribute name="id">references</xsl:attribute>
			<div>
				<xsl:attribute name="id">referencesheader</xsl:attribute>
				<xsl:attribute name="class">headerText</xsl:attribute>
				REFERENCES
			</div>
			<hr />
			<table>
				<xsl:attribute name="summary">This is a layout table, formatting the references section of the resume</xsl:attribute>
				<tr>
					<td>
						<xsl:attribute name="class">spacerCell</xsl:attribute>
						<span>
							<xsl:attribute name="class">spacerText</xsl:attribute>
							-
						</span>
					</td>
					<td>
						<xsl:attribute name="class">infoCell</xsl:attribute>
						<xsl:for-each select="reference">
							<div>
								<xsl:attribute name="class">infoText</xsl:attribute>
								<div>
									<xsl:attribute name="class">referenceName</xsl:attribute>
									<xsl:value-of select="name" />
								</div>
								<div>
									<xsl:value-of select="title" />, <xsl:value-of select="company" />
								</div>
								<div>
									<xsl:for-each select="address/street">
										<xsl:value-of select="." /><br />
									</xsl:for-each>
									<xsl:value-of select="address/city" />, <xsl:value-of select="address/state" />  <xsl:value-of select="address/zip" /><br />
								</div>
								<div>
									<xsl:for-each select="phone">
										<i><xsl:value-of select="@type" />: <xsl:value-of select="." /></i><br />
									</xsl:for-each>
									<xsl:for-each select="email">
										<i>
											<a>
												<xsl:attribute name="href">mailto:<xsl:value-of select="." /></xsl:attribute>
												<xsl:value-of select="." />
											</a>
										</i><br />
									</xsl:for-each>
								</div>
							</div><br />
						</xsl:for-each>
					</td>
				</tr>
			</table>
		</div>
	</xsl:template>
</xsl:stylesheet>