<?xml version="1.0" encoding="UTF-8"?>
<!-- http://www.language-archives.org/tools/metadata/metadata.xsl
     A stylesheet for transforming free-standing OLAC metadata
       into a web page following the OLAC Display Format.
     Gary Simons, SIL International (last updated 7 June 2003)

Copyright (c) 2003 Gary Simons (SIL International). This material may be
distributed only subject to the terms and conditions set forth in the
Open Publication License, v1.0 or later (the latest version is presently
available at http://www.opencontent.org/openpub/).
 -->
 <!-- Modified by Marisa Ferrara, The LINGUIST List, 26-JUN-03 to display
 the metadata as an annotated bibliography in HTML format.
 -->
 <!--This header calls up the namespaces needed to identify the elements -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:olac="http://www.language-archives.org/OLAC/1.0/" extension-element-prefixes="olac">
	<xsl:output method="html" version="4.0"/>
	<xsl:template match="/olac:olac">
<!-- What follows is the naming of all variables that will be needed for display-->
		<xsl:variable name="title">
			<xsl:choose>
				<xsl:when test="dc:title|dcterms:alternative">
					<xsl:value-of select="(dc:title|dcterms:alternative)[1]"/>
				</xsl:when>
				<xsl:otherwise></xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="creator">
			<xsl:choose>
				<xsl:when test="dc:creator">
					<xsl:value-of select="dc:creator"/>
				</xsl:when>
				<xsl:otherwise></xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="publisher">
			<xsl:choose>
				<xsl:when test="dc:publisher">
					<xsl:value-of select="dc:publisher"/>
				</xsl:when>
				<xsl:otherwise></xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="created">
			<xsl:choose>
				<xsl:when test="dcterms:created">
					<xsl:value-of select="dcterms:created"/>
				</xsl:when>
				<xsl:otherwise></xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="identifier">
			<xsl:choose>
				<xsl:when test="dc:identifier">
					<xsl:value-of select="dc:identifier"/>
				</xsl:when>
				<xsl:otherwise></xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="description">
			<xsl:choose>
				<xsl:when test="dc:description">
					<xsl:value-of select="dc:description"/>
				</xsl:when>
				<xsl:otherwise></xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<!-- The following code defines how the elements will appear in HTML format.  Each variable is called upon when it is needed and displayed in a standard bibliography format.-->
		<html>
			<head>
				<title>
					<xsl:value-of select="$title"/>					
				</title>				
			</head>
			<body>
				<table width="478" align="center">
					<tr valign="top">
						<td colspan="2">
							<span style="color:black ; font-size:x-small ; font-family:'Verdana' ; font-weight:bold">
								<xsl:value-of select="$creator"></xsl:value-of>
								<xsl:text>.  </xsl:text>
							</span>
							<span style="color:black ; font-size:x-small ; font-family:'Verdana' ; font-weight:bold">
								<xsl:value-of select="$created"></xsl:value-of>
								<xsl:text>.  </xsl:text>
							</span>
							<span style="color:black ; font-size:x-small ; font-family:'Verdana' ; font-weight:bold">
								<xsl:value-of select="$title"></xsl:value-of>
								<xsl:text>.  </xsl:text>
							</span>
							<span style="color:black ; font-size:x-small ; font-family:'Verdana' ; font-weight:bold">
								<xsl:value-of select="$publisher"></xsl:value-of>
								<xsl:text>.  </xsl:text>
							</span>
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<a href="$identifier">
							<span style="color:blue ; font-size:x-small ; font-family:'Verdana' ; font-weight:bold">
								<xsl:value-of select="$identifier"></xsl:value-of>
								<xsl:text>.</xsl:text>
							</span>
							</a>
						</td>
					</tr>
					<tr>
						<td width="20"></td>
						<td align="justify">
							<p>								
								<br></br>
								<span style="color:black ; font-size:x-small ; font-family:'Verdana'">
									<xsl:value-of select="$description"></xsl:value-of>
								</span>
							</p>
						</td>	
					</tr>			
				</table>
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>
