<xsl:stylesheet  xmlns:xsl="http://www.w3.org/TR/WD-xsl">

<!--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>University of Karlskrona/Ronneby, Sweden </title>
               <style type="text/css">
                    body {
                         margin: 5%;
                         font-family: arial;
                         }
               </style>
          </head>
          <body>
          <xsl:apply-templates select="ead/eadheader/filedesc/titlestmt"/>
          <p/>
          <hr/>
          <xsl:apply-templates select="ead/archdesc/did"/>
          <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/organization"/>
          <p/>
          <xsl:apply-templates select="ead/archdesc/dsc"/>
          <p/>
          </body>
          </html>
     </xsl:template>

	<!-- ########################################################################### -->
	<xsl:template match="ixiahit">
		<FONT FACE="Arial" SIZE="3" COLOR="#FF0000">
			<B>
				<xsl:apply-templates/>
			</B>
		</FONT>
	</xsl:template>
	<!-- ########################################################################### -->

     <xsl:template match="titlestmt">
          <center>
               <h3>
                    <xsl:apply-templates select="titleproper"/>
               </h3>
               <h3>
                    <xsl:apply-templates select="author"/>
               </h3>
               <!--img src="http://libstaff.lib.odu.edu:5000/sgml/images/oduseal.jpg"/-->
               <p/>
               <xsl:apply-templates select="list"/>
          </center>
     </xsl:template>

     <xsl:template match="ead/archdesc/did">
          <h3><xsl:value-of select="head"/></h3>
          <xsl:apply-templates select="unittitle"/><br/>
		  <b><xsl:value-of select="abstract/@label"/>:</b> <xsl:value-of select="abstract"/><br/>
          <b><xsl:value-of select="origination/@label"/>:</b> <xsl:value-of select="origination"/><br/>
          <b><xsl:value-of select="physdesc/@label"/>:</b> <xsl:value-of select="physdesc"/><br/>
          <b><xsl:value-of select="repository/@label"/>:</b> <xsl:value-of select="repository"/><br/>
          <b><xsl:value-of select="physloc/@label"/>:</b> <xsl:value-of select="physloc"/><br/>
          <xsl:apply-templates select="unitid"/><br/>
     </xsl:template>
     
     <xsl:template match="ead/archdesc/controlaccess">
          <xsl:apply-templates/>    
     </xsl:template>
     
     <xsl:template match="ead/archdesc/admininfo">
          <h3><xsl:value-of select="head"/></h3>
          <xsl:if test=".[acqinfo]">
               <b><xsl:value-of select="acqinfo/head"/>:</b> 
               <xsl:value-of select="acqinfo/p"/>
               <br/>
          </xsl:if>
          <xsl:if test=".[accessrestrict]">
               <b><xsl:value-of select="accessrestrict/head"/>:</b> 
               <xsl:value-of select="accessrestrict/p"/>
               <br/>
          </xsl:if>
          <xsl:if test=".[userestrict]">
               <b><xsl:value-of select="userestrict/head"/>:</b> 
               <xsl:value-of select="userestrict/p"/>
               <br/>
          </xsl:if>
          <xsl:if test=".[accruals]">
               <b><xsl:value-of select="accruals/head"/>:</b> 
               <xsl:value-of select="accruals/p"/>
               <br/>
          </xsl:if>

          <xsl:if test=".[address]">
               <b><xsl:value-of select="address/head"/>:</b> 
               <xsl:value-of select="address/p"/>
               <br/>
          </xsl:if>
          <xsl:if test=".[altformavail]">
               <b><xsl:value-of select="altformavail/head"/>:</b> 
               <xsl:value-of select="altformavail/p"/>
               <br/>
          </xsl:if>
          <xsl:if test=".[appraisal]">
               <b><xsl:value-of select="appraisal/head"/>:</b> 
               <xsl:value-of select="appraisal/p"/>
               <br/>
          </xsl:if>
          <xsl:if test=".[custodhist]">
               <b><xsl:value-of select="custodhist/head"/>:</b> 
               <xsl:value-of select="custodhist/p"/>
               <br/>
          </xsl:if>
          <xsl:if test=".[prefercite]">
               <b><xsl:value-of select="prefercite/head"/>:</b>
               <xsl:value-of select="prefercite/p"/>
               <br/>
          </xsl:if>
          <xsl:if test=".[processinfo]">
               <b><xsl:value-of select="processinfo/head"/>:</b> 
               <xsl:value-of select="processinfo/p"/>
               <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:apply-templates/>
     </xsl:template>
     
     <xsl:template match="c01">
          <div style="margin-left: 3%">
               <xsl:apply-templates/><br/>
          </div>
     </xsl:template>
     
     <xsl:template match="c02">
          <div style="margin-left: 3%; font-size: smaller">
               <xsl:apply-templates/>
          </div>
     </xsl:template>
     
     <xsl:template match="c03">
          <div style="margin-left: 3%">
               <xsl:apply-templates/>
          </div>
     </xsl:template>
     
     <xsl:template match="c04">
          <div style="margin-left: 3%">
               <xsl:apply-templates/>
          </div>
     </xsl:template>
     
     <xsl:template match="c05">
          <div style="margin-left: 3%">
               <xsl:apply-templates/>
          </div>
     </xsl:template>

     <xsl:template match="c06">
          <div style="margin-left: 3%">
               <xsl:apply-templates/>
          </div>
     </xsl:template>

     <xsl:template match="c07">
          <div style="margin-left: 3%">
               <xsl:apply-templates/>
          </div>
     </xsl:template>

     <xsl:template match="c08">
          <div style="left-margin-left: 3%">
               <xsl:apply-templates/>
          </div>
     </xsl:template>
     
     <xsl:template match="c09">
          <div style="margin-left= 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-left: 3%">
               <xsl:apply-templates/>
          </div>
     </xsl:template>
     
     <xsl:template match="c12">
          <div style="margin-left: 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">
          <font size="-1">
          <div style="margin-left: 3%">
               <xsl:apply-templates/>
          </div>
          </font>
     </xsl:template>
     
     <xsl:template match="note">
          <xsl:apply-templates/>
     </xsl:template>
     
     <xsl:template match="container">

               <xsl:if test=".[@type='box']">
                    [ Box <xsl:apply-templates/>]
               </xsl:if>
               <xsl:if test=".[@type='folder']">
                    Folder <xsl:apply-templates/> 
               </xsl:if>

     </xsl:template>
     
     <xsl:template match="list/item/subject">
          <b>Subject:</b> <xsl:value-of select="."/>
     </xsl:template>

     <xsl:template match="list/item/persname">
          <b>Personal name:</b> <xsl:value-of select="."/>
     </xsl:template>
     
     <xsl:template match="list/item/corpname">
          <b>Corporate name:</b> <xsl:value-of select="."/>
     </xsl:template>
     
     <xsl:template match="list/item/famname">
          <b>Family name:</b> <xsl:value-of select="."/>
     </xsl:template>
     
     <xsl:template match="list/item/function">
          <b>Function:</b> <xsl:value-of select="."/>
     </xsl:template>
     
     <xsl:template match="list/item/genreform">
          <b>Genre/form:</b> <xsl:value-of select="."/>
     </xsl:template>
     
     <xsl:template match="list/item/geogname">
          <b>Geographic name:</b> <xsl:value-of select="."/>
     </xsl:template>
     
     <xsl:template match="list/item/occupation">
          <b>Occupation:</b> <xsl:value-of select="."/>
     </xsl:template>
     
     <xsl:template match="list/item/name">
          <b>Name:</b> <xsl:value-of select="."/>
     </xsl:template>

     <xsl:template match="list/item/title">
          <b>Title:</b> <xsl:value-of select="."/>
     </xsl:template>

     <xsl:template match="ead/archdesc/did/unittitle">
          <b>Title:</b><xsl:apply-templates/>
     </xsl:template>

     <xsl:template match="ead/archdesc/did/unittitle/unitdate">
          <xsl:choose>
               <xsl:when test=".[@type='inclusive']">
                    <br/><b>Inclusive Dates:</b> <xsl:value-of select="."/>
               </xsl:when>
               <xsl:when test=".[@type='bulk']">
                    <br/><b>Bulk Dates:</b> <xsl:value-of select="."/>
               </xsl:when>
          </xsl:choose>
     </xsl:template>
                    
     <xsl:template match="ead/archdesc/did/unitid">
          <xsl:if test=".[@label='groupnum']">
               <b>Group number:</b> <xsl:value-of select="."/>
          </xsl:if>
     </xsl:template>

</xsl:stylesheet>



