<?xml version="1.0" encoding="UTF-8"?>

<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>

 
<!-- HEADER *********************************************** -->
    <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">

	<!-- OVERALL *********************************************** -->
                    <xsl:apply-templates select="ead/eadheader/filedesc"/>
                    <p/>
                    <xsl:apply-templates select="ead/frontmatter"/>
                    <hr/>
                    <xsl:apply-templates select="ead/archdesc/did"/>
                    <hr/>
                    <xsl:apply-templates select="ead/archdesc/admininfo"/>
                    <p/>
                    <xsl:apply-templates select="ead/archdesc/bioghist"/>
                    <br/><br/>
                    <xsl:apply-templates select="ead/archdesc/add/bibliography"/>
		    <hr/>
                    <xsl:apply-templates select="ead/archdesc/scopecontent"/>               
                    <p/>
                    <xsl:apply-templates select="ead/archdesc/organization"/> 
                    <p/>
                    <xsl:apply-templates select="ead/archdesc/add/relatedmaterial"/>
		    <hr/>
                    <xsl:apply-templates select="ead/archdesc/dsc"/>
                    <p/>
                </font>
            </body>
        </html>
    </xsl:template>


    <!-- FILE DESC *********************************************** -->
    
    <xsl:template match="ead/eadheader/filedesc">
        <center>
            <br/>
            <br/>
            <br/>
            <h2>
                <xsl:value-of select="titlestmt/titleproper"/>
            </h2>
            <br/>
            <br/>
            <br/>
            <img src="http://www.columbia.edu/cu/libraries/inside/gifs/cdl.gif"/>
            <p/>
        </center>
    </xsl:template>
    
    <!-- FRONTMATTER *********************************************** -->
    <xsl:template match="ead/frontmatter/titlepage/titleproper"/>
    <xsl:template match="ead/frontmatter/titlepage/list/defitem">
        <b>
            <xsl:value-of select="label"/>
        </b>
        <xsl:value-of select="item"/>
        <br/>
    </xsl:template>
    <xsl:template match="ead/frontmatter/titlepage/list/item">
        <xsl:apply-templates/>, </xsl:template>
        
    <!-- ARCHDESC/DID *********************************************** -->
    
  
    <xsl:template match="*/did/physdesc/extent">
        <i>Extent: </i>
        <xsl:apply-templates/>
    </xsl:template>
    
    <xsl:template match="*/did/repository">
    	<i>Repository: </i>
   
   	<xsl:apply-templates/>
   
   </xsl:template>

  
   <!-- EAD/ARCHDESC/ADMININFO *********************************************** -->
   
   
    <xsl:template match="ead/archdesc/admininfo/head">
     
      	<h4><i><xsl:apply-templates/></i></h4>
      
      </xsl:template>
   
          
  <!-- BIOGHIST ************************************************************************ -->
  
  
       <xsl:template match="ead/archdesc/bioghist">
	  	   
	   <hr/><h4><xsl:apply-templates select="head"/></h4>
	   
           <xsl:for-each select="chronlist/chronitem">
              <b><xsl:apply-templates select="date"/> : </b>
               <xsl:apply-templates select="event"/> <br/>
           </xsl:for-each>
           
       </xsl:template>


 
 <!-- SCOPECONTENT ************************************************************************ -->
 
  
    
    	<xsl:template match="scopecontent">
           <xsl:apply-templates/>
       </xsl:template>
   
     <xsl:template match="scopecontent/p">
           	<br/><br/>
           <xsl:apply-templates/>
    </xsl:template>
     
<!-- ORGANIZATION ************************************************************************ -->
 
  <xsl:template match="organization/list">
             <br/><xsl:apply-templates/>
       </xsl:template>
    
    	<xsl:template match="organization/list/item">
           <br/><xsl:apply-templates/>
       </xsl:template>
   
     

    <!-- DID ********************************************** -->
    
    <xsl:template match="did/note/p">
    	<xsl:apply-templates/>
    </xsl:template>
    
    <xsl:template match="*[@encodinganalog='008']"/>
    
    <xsl:template match="did/physdesc">
        <br/>
        <br/>
        <xsl:apply-templates/>
        <br/>
    </xsl:template>
    
    <xsl:template match="did/physdesc/physfacet">
        <b> : </b>
        <xsl:apply-templates/>
    </xsl:template>
    
    <xsl:template match="did/physdesc/dimensions">
        <b> ; </b>
        <xsl:apply-templates/>
    </xsl:template>
   
   
   <!-- DSC ************************************************************************ -->
    <xsl:template match="ead/archdesc/dsc">
        <h2 align="center">
            <xsl:value-of select="ead/archdesc/dsc/head"/>
        </h2>
        
        <xsl:apply-templates/>
    </xsl:template>
  
 
    
  <!-- ARCHDESC/DSC/C01 *********************************************** -->
  
    <xsl:template match="c01">
        <div style="margin: 3%">
            <!-- <b>Series:</b> -->
            <xsl:apply-templates/>
        </div>
        <hr/>
        <br/>
        <br/>
    </xsl:template>
   
    <xsl:template match="c01/did/unitid">
           <b>
               <xsl:apply-templates/>
           </b>
    </xsl:template>
   
   
    <xsl:template match="c01/did/unittitle">
           <b>
               <xsl:apply-templates/>
           </b>
    </xsl:template>
   
    <!-- ARCHDESC/DSC/C02 *********************************************** -->
    
    <xsl:template match="c02">
        <div style="margin: 3%">
            <b>Subseries:</b>
            <xsl:apply-templates/>
        </div>
    </xsl:template>
    
    <xsl:template match="c02/did/unittitle">
        <b>
            <xsl:apply-templates/>
        </b>
        
    </xsl:template>
    <xsl:template match="c02/did/unitid">
        <b>
            <xsl:apply-templates/>
        </b>
    </xsl:template>
    
    <!-- *********************************************** -->
    <xsl:template match="c03">
        <br style="margin: 3%"/>
        <xsl:apply-templates/>
    </xsl:template>
    
    <xsl:template match="c03/did/unittitle">
            <b>
                <xsl:apply-templates/>
            </b>
            
    </xsl:template>
    
     <xsl:template match="c03/did/unitdate">
               (<xsl:apply-templates/>)
    </xsl:template>
    
     <xsl:template match="c03/did/origination">
		 / <xsl:apply-templates/>  
       </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>

<!-- IMAGE LINKS *********************************************** -->
<!-- 
	<xsl:template match="did/dao">
		
		<br/>
		
		<xsl:value-of select="@href"/>
		<br/><br/>
		
		<xsl:apply-templates/>
	</xsl:template>
-->
<!-- CONTROL ACCESS *********************************************** --> 
 
 <xsl:template match="*/controlaccess/head">
       <p/><b><i>
            <xsl:apply-templates/>
        </i></b>
    </xsl:template>
    
  <xsl:template match="*/controlaccess/list/head">
        <br/><b>
              <xsl:apply-templates/>
        </b>
    </xsl:template>
    
    
    <xsl:template match="controlaccess/list/item">
                
                      <xsl:apply-templates/>
                
            </xsl:template>
    
<!-- DEFAULTS *********************************************** -->

    
    <xsl:template match="did/container[@type='box']">
    	<br/><br/><br/><br/> <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="odd/p">
        <xsl:apply-templates/>
    </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:template match="row/entry">
        <p/>
        <b>
            <xsl:apply-templates/>
        </b>
    </xsl:template>   

</xsl:stylesheet>

