<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:urwg="http://www.gridforum.org/2003/ur-wg" xmlns:SimpleDateFormat="http://xml.apache.org/xalan/java/java.text.SimpleDateFormat" xmlns:Date="http://xml.apache.org/xalan/java/java.util.Date">
	<xsl:output method="html"/>
	<!-- Main Template outputs our HTML page -->
	<xsl:template match="/">
				<html>
					<head>
						<title>
							<xsl:value-of select="/ospiPresentation/name_title/artifact/structuredData/name_title/professor_name"/>
						</title>
						<style type="text/css" media="all">@import "http://www.longsight.com/osp-style.css";</style>
						<link rel="stylesheet" type="text/css">
							<!--<xsl:attribute name="href">blogStyle.css</xsl:attribute>-->
							<xsl:attribute name="href"><xsl:value-of select="/ospiPresentation/presentationFiles/style/artifact/fileArtifact/uri"/></xsl:attribute>
						</link>
					</head>
					<body>
						<div id="container">
							<div id="header">
								<h1>
									<xsl:value-of select="/ospiPresentation/name_title/artifact/structuredData/name_title/professor_name"/>
								</h1>
							</div>
							<div id="sub_header">
								<xsl:value-of select="/ospiPresentation/name_title/artifact/structuredData/name_title/professor_title"/>
							</div>
							<!-- a little menu to navigate -->
							<div id="main_content_top"/>
							<div id="main_content">
								<div class="menu">
									<ul>
										<li>
											<xsl:call-template name="menuLink">
												<xsl:with-param name="section">teaching</xsl:with-param>
												<xsl:with-param name="text">Teaching</xsl:with-param>
											</xsl:call-template>
										</li>
										<li>
											<xsl:call-template name="menuLink">
												<xsl:with-param name="section">scholarship</xsl:with-param>
												<xsl:with-param name="text">Scholarship</xsl:with-param>
											</xsl:call-template>
										</li>
										<li>
											<xsl:call-template name="menuLink">
												<xsl:with-param name="section">professional_development</xsl:with-param>
												<xsl:with-param name="text">Professional Development</xsl:with-param>
											</xsl:call-template>
										</li>
										<li>
											<xsl:call-template name="menuLink">
												<xsl:with-param name="section">service</xsl:with-param>
												<xsl:with-param name="text">Service</xsl:with-param>
											</xsl:call-template>
										</li>
									</ul>
								</div>
								<div class="content">
									<div class="cv">
										<div>
											<img>
												<xsl:attribute name="src"><xsl:value-of select="/ospiPresentation/presentationFiles/myPicture/artifact/fileArtifact/uri"/></xsl:attribute>
												<xsl:attribute name="alt">

											</xsl:attribute>
											</img>
										</div>
										<strong>CV: </strong>
										<a>
											<xsl:attribute name="href"><xsl:value-of select="/ospiPresentation/presentationFiles/myCV/artifact/fileArtifact/uri"/></xsl:attribute>
											<xsl:value-of select="/ospiPresentation/presentationFiles/myCV/artifact/metaData/displayName"/>
										</a>
									</div>
									<div class="section" id="teaching">
										<a name="#teaching"/>
										<h2>Teaching</h2>
										<xsl:for-each select="/ospiPresentation/teaching/artifact">
											<xsl:for-each select="structuredData/teaching">
												<h4 class="header">Courses Taught</h4>
												<div class="content">
													<xsl:value-of select="course_taught"/>
												</div>
												<h4 class="header">Courses Created or Substantially Revised</h4>
												<div class="content">
													<xsl:value-of select="courses_created"/>
												</div>
												<h4 class="header">Curricular Reform</h4>
												<div class="content">
													<xsl:value-of select="curricular_reform"/>
												</div>
												<h4 class="header">Methodological Innovation and Experimentation</h4>
												<div class="content">
													<xsl:value-of select="methodological_innovation"/>
												</div>
												<h4 class="header">Directed Student Presentations and Achievements</h4>
												<div class="content">
													<xsl:value-of select="directed_presentations"/>
												</div>
											</xsl:for-each>
										</xsl:for-each>
									</div>
									<div class="section" id="scholarship">
										<a name="#scholarship"/>
										<h2>Scholarship</h2>
										<xsl:for-each select="/ospiPresentation/scholarship/artifact">
											<xsl:for-each select="structuredData/scholarship">
												<h4 class="header">Book Publications</h4>
												<div class="content">
													<xsl:value-of select="book_publications"/>
												</div>
												<h4 class="header">Article Publications</h4>
												<div class="content">
													<xsl:value-of select="article_publications"/>
												</div>
												<h4 class="header">Book Reviews</h4>
												<div class="content">
													<xsl:value-of select="book_reviews"/>
												</div>
												<h4 class="header">Creative Works</h4>
												<div class="content">
													<xsl:value-of select="creative_works"/>
												</div>
												<h4 class="header">Scholarly/Research, Workshop, Seminar Presentations</h4>
												<div class="content">
													<xsl:value-of select="scholarly_research"/>
												</div>
												<h4 class="header">External Research Grants</h4>
												<div class="content">
													<xsl:value-of select="research_grants"/>
												</div>
												<h4 class="header">Awards, Honors, Recognitions</h4>
												<div class="content">
													<xsl:value-of select="awards"/>
												</div>
											</xsl:for-each>
										</xsl:for-each>
									</div>
									<div class="section" id="professional_development">
										<a name="#professional_development"/>
										<h2>Professional Development</h2>
										<xsl:for-each select="/ospiPresentation/professional_development/artifact">
											<xsl:for-each select="structuredData/development">
												<h4 class="header">Professional Meetings, Workshops, Seminars Attended</h4>
												<div class="content">
													<xsl:value-of select="professional_meetings"/>
												</div>
												<h4 class="header">Professional Memberships</h4>
												<div class="content">
													<xsl:value-of select="professional_memberships"/>
												</div>
												<h4 class="header">Additional Study</h4>
												<div class="content">
													<xsl:value-of select="additional_study"/>
												</div>
											</xsl:for-each>
										</xsl:for-each>
									</div>
									<div class="section" id="service">
										<a name="#service"/>
										<h2>Service</h2>
										<xsl:for-each select="/ospiPresentation/service/artifact">
											<xsl:for-each select="structuredData/service">
												<h4 class="header">Service to the College</h4>
												<div class="content">
													<xsl:value-of select="service_college"/>
												</div>
												<h4 class="header">Service to the Community</h4>
												<div class="content">
													<xsl:value-of select="service_community"/>
												</div>
												<h4 class="header">Service to the Profession</h4>
												<div class="content">
													<xsl:value-of select="service_profession"/>
												</div>
											</xsl:for-each>
										</xsl:for-each>
									</div>
									<!-- a switch to select content for this page based on the value of pageNumber -->
									<div id="content-delete">
										<xsl:choose>
											<xsl:when test="$pageNumber=1">
												<!-- about me --> About me Page </xsl:when>
											<xsl:when test="$pageNumber=2">
												<!-- display an index of all blog entries -->
												<h3>All Entries</h3>
												<ul id="datedEntryList">
													<xsl:for-each select="/ospiPresentation/blogEntry/artifact">
														<li>

                                                    </li>
													</xsl:for-each>
												</ul>
											</xsl:when>
											<xsl:when test="$pageNumber=3">
												<!-- individual entry displayed -->
												<xsl:for-each select="/ospiPresentation/blogEntry/artifact[metaData/repositoryNode/created=$created]">
													<xsl:call-template name="entry">
														<xsl:with-param name="title">
															<xsl:value-of select="./metaData/displayName"/>
														</xsl:with-param>
														<xsl:with-param name="date">
															<xsl:value-of select="./metaData/repositoryNode/created"/>
														</xsl:with-param>
														<xsl:with-param name="body">
															<xsl:value-of select="./structuredData/blogEntry/entryBody"/>
														</xsl:with-param>
													</xsl:call-template>
												</xsl:for-each>
											</xsl:when>
											<xsl:otherwise>
												<!-- last 5 blog entries -->
												<xsl:for-each select="/ospiPresentation/blogEntry/artifact[position() &gt; 0]">
													<!-- sort by year, moth, day created dates formatted like: Tue Jan 09 09:59:52 EST 2007 -->
													<xsl:sort data-type="number" select="Date:getTime(SimpleDateFormat:parse(SimpleDateFormat:new('EEE MMM dd kk:mm:ss zzz yyyy'), ./metaData/repositoryNode/created))" order="descending"/>
													<xsl:call-template name="entry">
														<xsl:with-param name="title">
															<xsl:value-of select="./metaData/displayName"/>
														</xsl:with-param>
														<xsl:with-param name="date">
															<xsl:value-of select="./metaData/repositoryNode/created"/>
														</xsl:with-param>
														<xsl:with-param name="body">
															<xsl:value-of select="./structuredData/blogEntry/entryBody"/>
														</xsl:with-param>
													</xsl:call-template>
												</xsl:for-each>
											</xsl:otherwise>
										</xsl:choose>
									</div>
									<!-- content -->
									<div id="clear"/>
								</div>
								<!-- contentWrapper -->
							</div>
							<div id="main_content_bottom">
</div>
							<div id="footer">
								<strong>Last modified on <xsl:value-of select="/ospiPresentation/scholarship/artifact/metaData/repositoryNode/created"/>
								</strong> | <b>OSP Template by </b>
								<a href="mailto:ottenhoff@longsight.com">Sam Ottenhoff</a>, <a href="http://www.longsight.com">The Longsight Group LLC</a>
							</div>
						</div>
						<!-- end wrapper div -->
					</body>
				</html>

	</xsl:template>

	<xsl:template name="menuLink">
		<xsl:param name="section"/>
		<xsl:param name="text"/>
		<a>
			<xsl:attribute name="href"><xsl:text disable-output-escaping="yes">#</xsl:text><xsl:value-of select="$section"/></xsl:attribute>
			<xsl:value-of select="$text"/>
		</a>
	</xsl:template>
</xsl:stylesheet>
