<?xml version="1.0" ?>
<!--
	XSLT StyleSheet Document
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" version="1.0">

<xsl:template match="/">
<html>
	<head>
	<title>Preambles</title>
	<link rel="stylesheet" type="text/css" href="preambles.css" />
	<link rel="stylesheet" type="text/css" href="../tlcstyle.css" />
	</head>
	<body>
		<h1 align="center">Preambles</h1>
		<p align="center">Preambles to great documents in American History</p>
		<table width="550" border="1" align="center">					
			<xsl:for-each select="preambles/preamble">
				<tr><td>
				<xsl:apply-templates />
				</td></tr>
			</xsl:for-each>	
		</table>
	</body>
</html>
    </xsl:template>
    <xsl:template match="document">
<table width="100%" class="document">
	<tr><td class="document_name"><xsl:value-of select="document_name" /></td></tr>
	<tr><td><table width="100%" class="document"><tr><td width="150"><xsl:value-of select="document_type" /></td><td class="author_name"><xsl:value-of select="author_name" /></td></tr></table></td></tr>
<tr><td><xsl:apply-templates select="date" /></td></tr>
</table>
    </xsl:template>

<xsl:template match="date">
<xsl:apply-templates />
</xsl:template>

<xsl:template match="year">
<xsl:value-of select="." />
</xsl:template>

<xsl:template match="date_of_speech">
<table width="100%" class="document"><tr><td width="150"><xsl:value-of select="." /></td><td><xsl:value-of select="../where_delivered" /></td></tr></table></xsl:template>


<xsl:template match="quote">
	<table class="quote">
		<tr><td>
			<span class="excerpt"><xsl:value-of select="excerpt" /></span>
			<span class="dropcap"><xsl:value-of select="text/drop_cap" /></span>
			<xsl:value-of select="text" />
		</td></tr>
	</table>
</xsl:template>

<xsl:template match="description">
<table width="100%" class="description">
	<tr><td><xsl:apply-templates select="document_link" /></td></tr>
	<tr><td><xsl:apply-templates select="more_info_link" /></td></tr>
</table>
</xsl:template>

<xsl:template match="document_link">
<a>
<xsl:attribute name="href"><xsl:value-of select="@doclink" /></xsl:attribute>View Entire Document
</a>
</xsl:template>

<xsl:template match="more_info_link">
<a>
<xsl:attribute name="href"><xsl:value-of select="@morelink" /></xsl:attribute>More Information
</a><br />
</xsl:template>

</xsl:stylesheet>