<xsl:stylesheet 
   xmlns:xsl="http://www.w3.org/TR/WD-xsl"
	xmlns="http://www.w3.org/TR/REC-html40"
	result-ns="">
	
	<xsl:template>
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="textnode()">
		<xsl:value-of select="."/>
	</xsl:template>

	<xsl:template match="/">
	   <html>
		<head>
			<title>Columbia Greene &amp; Greene Collection</title>
			<style type="text/css">
				body {margin: 5%}
			</style>
		</head>
		<body bgcolor="#ffffff">
		<font face="arial">
		<xsl:apply-templates select="ead/eadheader/filedesc"/>
		<p/>
		<xsl:apply-templates select="ead/archdesc/did"/>
		<p/>
		<xsl:apply-templates select="ead/archdesc/dsc"/>
		<p/>
		<xsl:apply-templates select="ead/archdesc/controlaccess"/>
		<p/>
		<xsl:apply-templates select="ead/archdesc/admininfo"/>
		<p/>
		<xsl:apply-templates select="ead/archdesc/bioghist"/>
		<p/>
		<xsl:apply-templates select="ead/archdesc/scopecontent"/>
		<p/>
		<xsl:apply-templates select="ead/archdesc/dsc"/>
		<p/>
		</font>
		</body>
		</html>
	</xsl:template>
	
	<xsl:template match="ead/eadheader/filedesc">
		<center>
		<br/><br/><br/>

			<h2>
				<xsl:value-of select="titlestmt/titleproper"/>
			</h2>			<br/><br/><br/>
			<img src="../../../gifs/cdl.gif"/>
			<p/>
			<xsl:apply-templates select="list"/>
		</center>
	</xsl:template>
	
	<xsl:template match="ead/archdesc/did">
	
		<xsl:value-of select="repository/@label"/> 
		<br/><br/><br/>

		<h3 align="center"> <xsl:value-of select="repository"/></h3>
		<hr/>

				
	</xsl:template>

	<xsl:template match="ead/archdesc/dsc">
	
	<h2 align="center"><xsl:value-of select="head"/></h2>


	<xsl:value-of select="unittitle/@label"/>
        <h3>Title:</h3> <xsl:value-of select="unittitle"/>


	<xsl:value-of select="physdesc/@label"/> 
	<h3>Physical Description: </h3><xsl:value-of select="physdesc"/>

			
	<xsl:value-of select="physloc/@label"/> 
	<xsl:value-of select="physloc"/><br/>
	</xsl:template>
	
	<xsl:template match="ead/archdesc/controlaccess">
		<xsl:apply-templates/>
	</xsl:template>
	
	<xsl:template match="ead/archdesc/admininfo">
		<h3>Administrative Information: </h3>
		<h3><xsl:value-of select="head"/></h3>
		<xsl:if test=".[accessrestrict]">
		<h4><xsl:value-of select="accessrestrict/head"/></h4> 
			<xsl:value-of select="accessrestrict/p"/>
			<br/><br/>
		</xsl:if>
		<xsl:if test=".[accruals]">
			<xsl:value-of select="accruals/head"/>
			<xsl:value-of select="accruals/p"/>
			<br/><br/>
		</xsl:if>
		<xsl:if test=".[acqinfo]">
		<h4><xsl:value-of select="acqinfo/head"/></h4> 
			<xsl:value-of select="acqinfo/p"/>
			<br/><br/>
		</xsl:if>
		<xsl:if test=".[address]">
			<xsl:value-of select="address/head"/> 
			<xsl:value-of select="address/p"/>
			<br/>
		</xsl:if>
		<xsl:if test=".[altformavail]">
			<xsl:value-of select="altformavail/head"/> 
			<xsl:value-of select="altformavail/p"/>
			<br/>
		</xsl:if>
		<xsl:if test=".[appraisal]">
			<xsl:value-of select="appraisal/head"/>
			<xsl:value-of select="appraisal/p"/>
			<br/>
		</xsl:if>
		<xsl:if test=".[custodhist]">
			<xsl:value-of select="custodhist/head"/> 
			<xsl:value-of select="custodhist/p"/>
			<br/>
		</xsl:if>
		<xsl:if test=".[prefercite]">
		<h4><xsl:value-of select="prefercite/head"/></h4> 
			<xsl:value-of select="prefercite/p"/>
			<br/><br/>
		</xsl:if>
		<xsl:if test=".[processinfo]">
		<h4><xsl:value-of select="processinfo/head"/></h4>
			<xsl:value-of select="processinfo/p"/>
			<br/><br/>
		</xsl:if>
		<xsl:if test=".[userestrict]">
		<h4><xsl:value-of select="userestrict/head"/></h4> 
			<xsl:value-of select="userestrict/p"/>
			<br/><br/>
		</xsl:if>
	</xsl:template>
	
	<xsl:template match="bioghist">
		<xsl:apply-templates/>
	</xsl:template>
	
	<xsl:template match="scopecontent">
		<xsl:apply-templates/>
	</xsl:template>
	
	<xsl:template match="ead/archdesc/dsc">
		<xsl:if test=".[@type='combined']">
			<h3>Arrangement and Container Information</h3>

			<xsl:apply-templates/>
		</xsl:if>
	</xsl:template>

	<xsl:template match="c">
		<div style="margin: 3%">
		<xsl:apply-templates/>
		</div>
	</xsl:template>
	
	<xsl:template match="c01">
		<div style="margin: 3%">
		<b>Series:</b>
		<xsl:apply-templates/>
		</div>
          <hr/><br/><br/>
	</xsl:template>
	
	<xsl:template match="c02">
		<div style="margin: 3%">
			<b>Subseries:</b>
			<xsl:apply-templates/>
		</div>
	<br/><br/>
	</xsl:template>
	
	<xsl:template match="c03">
		<div style="margin: 3%">
			<xsl:apply-templates/>
		</div>
	</xsl:template>
	
	<xsl:template match="c04">
		<div style="margin: 3%">
			<xsl:apply-templates/>
		</div>
	</xsl:template>
	
	<xsl:template match="c05">
		<div style="margin: 3%">
			<xsl:apply-templates/>
		</div>
	</xsl:template>

	<xsl:template match="c06">
		<div style="margin: 3%">
			<xsl:apply-templates/>
		</div>
	</xsl:template>

	<xsl:template match="c07">
		<div style="margin: 3%">
			<xsl:apply-templates/>
		</div>
	</xsl:template>

	<xsl:template match="c08">
		<div style="margin: 3%">
			<xsl:apply-templates/>
		</div>
	</xsl:template>
	
	<xsl:template match="c09">
		<div style="margin= 3%">
			<xsl:apply-templates/>
		</div>
	</xsl:template>

	<xsl:template match="c10">
		<div style="margin: 3%">
			<xsl:apply-templates/>
		</div>
	</xsl:template>

	<xsl:template match="c11">
		<div style="margin: 3%">
			<xsl:apply-templates/>
		</div>
	</xsl:template>
	
	<xsl:template match="c12">
		<div style="margin: 3%">
			<xsl:apply-templates/>
		</div>
	</xsl:template>
	
	<xsl:template match="list">
		<xsl:for-each select="item">
			<xsl:apply-templates/>
			<br/>
		</xsl:for-each>
		<xsl:for-each select="defitem">
		   <xsl:value-of select="label"/>
			<xsl:value-of select="item"/>
			<br/>
		</xsl:for-each>
		<p/>
	</xsl:template>
	
	<xsl:template match="chronlist">
		<xsl:apply-templates/>
	</xsl:template>
	
	<xsl:template match="table">
		<xsl:apply-templates/>
	</xsl:template>
			
	<xsl:template match="lb">
		<br/>
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="p">
		<p><xsl:apply-templates/></p>
	</xsl:template>

	<xsl:template match="head">
		<h3><xsl:apply-templates/></h3>
	</xsl:template>

	<xsl:template match="blockquote">
		<xsl:apply-templates/>
	</xsl:template>
	
	<xsl:template match="note">
		<xsl:apply-templates/>
	</xsl:template>
	
	<xsl:template match="container">
		<i>
			<xsl:value-of select="@type"/>
			<xsl:apply-templates/>: 
		</i>
	</xsl:template>
		
</xsl:stylesheet>
