<xsl:stylesheet
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   version="1.0">

<xsl:output method="html" />

<xsl:template match="*">
	<xsl:apply-templates/>
</xsl:template>

<xsl:template match="text()">
	<xsl:value-of select="."/>
</xsl:template>

<xsl:template match="/">
	<xsl:apply-templates/>
</xsl:template>

<xsl:template match="ead">
   <html>
      <head>
         <title>Archives: 
            <xsl:value-of select="archdesc/did/unitid"/>
         </title>
      </head>
      <body>
         <div>
            <xsl:apply-templates/>
         </div>

      </body>
   </html>
</xsl:template>

<xsl:template match="eadheader"/>
<xsl:template match="frontmatter"/>
<xsl:template match="archdesc/did/unitid"/>

<xsl:template match="archdesc/did/unittitle">
	<h2><xsl:apply-templates/></h2>
</xsl:template>

<xsl:template match="archdesc/did/unitdate">
	<p><b><xsl:apply-templates/></b></p>
</xsl:template>

<xsl:template match="archdesc/did/origination/*">
	<i>Origination</i> : <xsl:apply-templates/><br/>
</xsl:template>	

<xsl:template match="archdesc/did/physdesc/extent">
	<i>Extent</i> : <xsl:apply-templates/><br/>
</xsl:template>	

<xsl:template match="archdesc/did/repository/corpname">
	<i>Repository</i> :
		<xsl:apply-templates/>
	<br/>
</xsl:template>	

<xsl:template match="archdesc/did/repository/address">
	<i>Address</i> : <xsl:apply-templates/><br/>
</xsl:template>	

<xsl:template match="acqinfo">
	<h3>Source</h3>
	<xsl:apply-templates/>
</xsl:template>	

<xsl:template match="controlaccess">
	<h3>Index</h3>
	<xsl:apply-templates/>
</xsl:template>

<xsl:template match="controlaccess/*">
	<xsl:apply-templates/><br/>
</xsl:template>

<xsl:template match="head">
	<h3><xsl:apply-templates/></h3>
</xsl:template>

<xsl:template match="admininfo/head"/>

<xsl:template match="dsc">
	<br/><hr/>
	<h3>Outline</h3>
	<xsl:for-each select="c01">
	<xsl:if test="@level">
	<h4><xsl:value-of select="did/unittitle"/> - 
	<xsl:value-of select="did/unitdate"/></h4>
	<xsl:for-each select="c02">
	<xsl:if test="@level"><ul><li>
	<b><xsl:value-of select="did/unittitle"/> - 
	<xsl:value-of select="did/unitdate"/></b>
	<xsl:for-each select="c03">
	<xsl:if test="@level"><ul><li>
	<xsl:value-of select="did/unittitle"/> - 
	<xsl:value-of select="did/unitdate"/>
	<xsl:for-each select="c04">
	<xsl:if test="@level"><ul><li>
	<xsl:value-of select="did/unittitle"/> - 
	<xsl:value-of select="did/unitdate"/>
	<xsl:for-each select="c05">
	<xsl:if test="@level"><ul><li>
	<xsl:value-of select="did/unittitle"/> - 
	<xsl:value-of select="did/unitdate"/>
	<xsl:for-each select="c06">
	<xsl:if test="@level"><ul><li>
	<xsl:value-of select="did/unittitle"/> - 
	<xsl:value-of select="did/unitdate"/>
	<xsl:for-each select="c07">
	<xsl:if test="@level"><ul><li>
	<xsl:value-of select="did/unittitle"/> - 
	<xsl:value-of select="did/unitdate"/>
	<xsl:for-each select="c08">
	<xsl:if test="@level"><ul><li>
	<xsl:value-of select="did/unittitle"/> - 
	<xsl:value-of select="did/unitdate"/>
	<xsl:for-each select="c09">
	<xsl:if test="@level"><ul><li>
	<xsl:value-of select="did/unittitle"/> - 
	<xsl:value-of select="did/unitdate"/>
	</li></ul></xsl:if></xsl:for-each>
	</li></ul></xsl:if></xsl:for-each>
	</li></ul></xsl:if></xsl:for-each>
	</li></ul></xsl:if></xsl:for-each>
	</li></ul></xsl:if></xsl:for-each>
	</li></ul></xsl:if></xsl:for-each>
	</li></ul></xsl:if></xsl:for-each>
	</li></ul></xsl:if></xsl:for-each>
	</xsl:if></xsl:for-each>
	<br/><hr/>
	<h3>Container List</h3>
	<xsl:apply-templates/>
</xsl:template>

<xsl:template match="p">
	<p><xsl:apply-templates/></p>
</xsl:template>

<xsl:template match="lb">
	<br/>
</xsl:template>

<xsl:template match="c01">
	<br/><xsl:apply-templates/>
</xsl:template>

<xsl:template match="c01|c02|c03|c04|c05|c06|c07|c08|c09|c11|c12">
	<ul><li><xsl:apply-templates/></li></ul>
</xsl:template>

<xsl:template match="dsc//unitid">
	<b><xsl:apply-templates/></b>
</xsl:template>

<xsl:template match="dsc//unitdate">
	 - (<xsl:apply-templates/>)
</xsl:template>

<xsl:template match="dsc//container">
	<b><xsl:apply-templates/></b><br/>
</xsl:template>

<xsl:template match="dsc//unittitle">
	<i>-&#32;<xsl:value-of select="@type"/></i> -
	<xsl:apply-templates/>
</xsl:template>

<xsl:template match="title">
	<i><xsl:apply-templates/></i>	
</xsl:template>

<xsl:template match="controlaccess/title">
	<i><xsl:apply-templates/></i><br/>	
</xsl:template>

<xsl:template match="list">
	<ul><xsl:apply-templates/></ul>
</xsl:template>

<xsl:template match="list/item">
	<li><xsl:apply-templates/></li>
</xsl:template>

<xsl:template match="chronlist">
	<table><xsl:apply-templates/></table>
</xsl:template>

<xsl:template match="chronlist/chronitem">
	<tr><xsl:apply-templates/></tr>
</xsl:template>

<xsl:template match="chronlist/chronitem/date">
	<td><xsl:apply-templates/></td>
</xsl:template>

<xsl:template match="chronlist/chronitem/event">
	<td><xsl:apply-templates/></td>
</xsl:template>

<xsl:template match="table">
	<table cellpadding="8" border="1">
		<xsl:apply-templates/>
	</table>
</xsl:template>

<xsl:template match="row">
	<tr><xsl:apply-templates/></tr>
</xsl:template>

<xsl:template match="entry">
	<td><xsl:apply-templates/></td>
</xsl:template>

<xsl:template match="abstract">
	<br/><xsl:apply-templates/>
</xsl:template>

<xsl:template match="extref">
	<a>
	<xsl:attribute name="href">
		<xsl:value-of select="@href"/>
	</xsl:attribute>
	<xsl:attribute name="target">
		new
	</xsl:attribute>
	<xsl:apply-templates/>
	</a>
</xsl:template>

</xsl:stylesheet>