<?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>
					div	{
						width: 100%;
						padding-left: 2px;
						padding-right: 2px;
					}

					table	{
						width: 100%;
					}

					li	{
						font-family: "Arial", sans-serif;
						font-size: 10pt;
						list-style-type: square;
					}

					.packages	{
						padding-top: 12px;
					}

					.headerAddressCell	{
						width: 194px;
						text-align: left;
						vertical-align: top;
					}

					.headerName	{
						font-family: "Arial Black", sans-serif;
						font-size: 27pt;
						text-align: left;
					}

					.headerAddressText	{
						font-family: "Arial", sans-serif;
						font-size: 7pt;
					}

					.headerPhoneCell	{
						width: 194px;
						text-align: left;
						vertical-align: top;
					}

					.headerPhoneText	{
						font-family: "Arial", sans-serif;
						font-size: 7pt;
					}

					.headerCell	{
						width: 96px;
						text-align: left;
						vertical-align: top;
					}

					.headerText	{
						width: 128px;
						font-family: "Arial Black", sans-serif;
						font-size: 10pt;
					}

					.objectiveText	{
						font-family: "Arial", sans-serif;
						font-size: 10pt;
						font-weight: normal;
						text-align: left;
					}

					.infoCell	{
						width: 575px;
						text-align: left;
						vertical-align: top;
					}

					.infoText	{
						font-family:	"Arial", sans-serif;
						font-size:	10pt;
						font-weight: normal;
					}

					.datesCell	{
						width: 175px;
						text-align: left;
						vertical-align: top;
					}

					.datesText		{
						font-family: "Arial", sans-serif;
						font-size: 10pt;
						text-align: left;
						vertical-align: top;
					}

					.companyCell	{
						vertical-align: top;
					}

					.companyText	{
						font-family:	"Arial", sans-serif;
						font-size: 10pt;
						vertical-align: top;
					}

					.addressCell	{
						width: 130px;
						text-align: right;
						vertical-align: top;
					}

					.addressText	{
						font-family: "Arial", sans-serif;
						font-size: 10pt;
						text-align: right;
						vertical-align: top;
					}

					.jobTitleText	{
						font-family:	"Arial Black", sans-serif;
						font-size: 10pt;
						font-weight: bolder;
					}

					.accomplishmentsText	{
						font-family:	"Arial", sans-serif;
						font-size:		10pt;
						font-weight:	normal;
					}

					.note	{
						font-family:	"Arial", sans-serif;
						font-size:		8pt;
						font-style:		italic;
					}

					.referenceName	{
						font-family:	"Arial Black", sans-serif;
						font-size:		10pt;
					}
				</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>
			<table>
				<xsl:attribute name="summary">This is a layout table, formatting the personal information section of the resume</xsl:attribute>
				<tr>
					<td>
						<xsl:attribute name="style">width: 258px;</xsl:attribute>
						<span>
							<xsl:attribute name="style">display: none;</xsl:attribute>
							---
						</span>
					</td>
					<td>
						<xsl:attribute name="class">headerAddressCell</xsl:attribute>
						<div>
							<xsl:attribute name="class">headerAddressText</xsl:attribute>
							<xsl:value-of select="address/street" /><br />
							<xsl:value-of select="address/city" />, <xsl:value-of select="address/state" />  <xsl:value-of select="address/zip" /><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>
					</td>
					<td>
						<xsl:attribute name="class">headerPhoneCell</xsl:attribute>
						<div>
							<xsl:attribute name="class">headerPhoneText</xsl:attribute>
							<xsl:for-each select="phone">
								(<xsl:value-of select="@type" />): <xsl:value-of select="." /><br />
							</xsl:for-each>
							<a>
								<xsl:attribute name="href">mailto:<xsl:value-of select="email" /></xsl:attribute><xsl:value-of select="email" />
							</a>
						</div>
					</td>
				</tr>
			</table>
			<span>
				<xsl:attribute name="class">headerName</xsl:attribute>
				<xsl:value-of select="name" />
			</span>
		</div>
		<hr />
	</xsl:template>

	<xsl:template match="objective">
		<div>
			<xsl:attribute name="id">objective</xsl:attribute>
			<table>
				<xsl:attribute name="summary">This is a layout table, formatting the objective of the resume</xsl:attribute>
				<tr>
					<td>
						<xsl:attribute name="class">headerCell</xsl:attribute>
						<span>
							<xsl:attribute name="id">objectiveheader</xsl:attribute>
							<xsl:attribute name="class">headerText</xsl:attribute>
							Objective
						</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>
		<br />
	</xsl:template>

	<xsl:template match="education">
		<div>
			<xsl:attribute name="id">education</xsl:attribute>
			<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">headerCell</xsl:attribute>
						<span>
							<xsl:attribute name="id">educationheaer</xsl:attribute>
							<xsl:attribute name="class">headerText</xsl:attribute>
							Education
						</span>
					</td>
					<td>
						<xsl:attribute name="class">infoCell</xsl:attribute>
						<xsl:for-each select="school">
							<div>
								<table>
									<xsl:attribute name="summary">This is a layout table, formatting the education detail of the resume</xsl:attribute>
									<tr>
										<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>
								</table>
								<div>
									<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>
							</div>
						</xsl:for-each>
					</td>
				</tr>
			</table>
		</div>
	</xsl:template>

	<xsl:template match="experience">
		<div>
			<xsl:attribute name="id">experience</xsl:attribute>
			<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">headerCell</xsl:attribute>
						<span>
							<xsl:attribute name="id">experienceheader</xsl:attribute>
							<xsl:attribute name="class">headerText</xsl:attribute>
							Experience
						</span>
					</td>
					<td>
						<xsl:attribute name="class">infoCell</xsl:attribute>
						<xsl:for-each select="job">
							<div>
								<table>
									<xsl:attribute name="summary">This is a layout table, formatting the job experience detail of the resume</xsl:attribute>
									<tr>
										<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>
								</table>
								<div>
									<xsl:attribute name="class">jobTitleText</xsl:attribute>
									<xsl:value-of select="title" />
								</div>
								<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>
							</div><br />
						</xsl:for-each>
					</td>
				</tr>
			</table>
		</div>
	</xsl:template>

	<xsl:template match="languages">
		<div>
			<xsl:attribute name="id">languages</xsl:attribute>
			<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">headerCell</xsl:attribute>
						<span>
							<xsl:attribute name="id">languagesheader</xsl:attribute>
							<xsl:attribute name="class">headerText</xsl:attribute>
							Programming Languages
						</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>
			<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">headerCell</xsl:attribute>
						<span>
							<xsl:attribute name="id">softwareheader</xsl:attribute>
							<xsl:attribute name="class">headerText</xsl:attribute>
							Software
						</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>
			<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">headerCell</xsl:attribute>
						<span>
							<xsl:attribute name="id">writingheader</xsl:attribute>
							<xsl:attribute name="class">headerText</xsl:attribute>
							Writing Samples
						</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>
			<table>
				<xsl:attribute name="summary">This is a layout table, formatting the references of the resume</xsl:attribute>
				<tr>
					<td>
						<xsl:attribute name="class">headerCell</xsl:attribute>
						<span>
							<xsl:attribute name="id">referencesheader</xsl:attribute>
							<xsl:attribute name="class">headerText</xsl:attribute>
							References
						</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>