<!-- YMCA Archives Stylesheet for Generation of HTML for Display of Finding Aids on the WWW, January 2012
  UPDATES:
February 2005 - Added ability to render custodhist element 
March 2005 - Updated the copyright date in the footer; 
  Fixed the rule for the index term elements in the controlaccess element (syntax was
  incorrect, resulting in a conflict with another rule for displaying the title 
  element)
June 2006 - In dsc section moved container label to display right before each   
  container number instead of as a header on a separate line.
August 2008 - Added template to allow tables in the archdesc/bioghist
June 2010 - Added altformavail element to Administrative Info descgrp
December 2011 - Made Kautz Family YMCA Archives graphic at top a link to the web site
January 2012 - Added drawer as a container type and added code to generate a folder number in parentheses if there is one
February 2012 - Added dao element 
-->

<xsl:stylesheet 
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:html="http://www.w3.org/TR/REC-html40"
	exclude-result-prefixes="html"
	version="1.1">

<xsl:output method="html" indent="yes" encoding="iso-8859-1"/>

<xsl:strip-space elements="*"/>

<!-- ===BEGIN: Creates the Skeleton HTML for the Finding Aid=== -->

<xsl:template match="/">
<html>
<head>
<title>
<xsl:value-of select="ead/eadheader/filedesc/titlestmt/titleproper"/>
<xsl:text>  </xsl:text>

<xsl:value-of select="ead/eadheader/filedesc/titlestmt/subtitle"/>
</title>

<!-- =========== DUBLIN CORE METADATA =============== -->

<xsl:element name="meta">
<xsl:attribute name="name">dc.title</xsl:attribute>
<xsl:attribute name="content">
<xsl:value-of select="ead/eadheader/filedesc/titlestmt/titleproper"/>
<xsl:text>  </xsl:text>
<xsl:value-of select="ead/eadheader/filedesc/titlestmt/subtitle"/>
</xsl:attribute>
</xsl:element>

<xsl:element name="meta">
<xsl:attribute name="name">dc.author</xsl:attribute>
<xsl:attribute name="content">
<xsl:value-of select="ead/archdesc/did/origination"/>
</xsl:attribute>
</xsl:element>

<xsl:for-each select="ead//controlaccess/persname | ead//controlaccess/corpname"> 
<xsl:choose>
<xsl:when test="@encodinganalog='600'"> 
<xsl:element name="meta">
<xsl:attribute name="name">dc.subject</xsl:attribute>
<xsl:attribute name="content">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:element>
</xsl:when>

<xsl:when test="@encodinganalog='610'"> 
<xsl:element name="meta">
<xsl:attribute name="name">dc.subject</xsl:attribute>
<xsl:attribute name="content">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:element>
</xsl:when>

<xsl:when test="@encodinganalog='611'"> 
<xsl:element name="meta">
<xsl:attribute name="name">dc.subject</xsl:attribute>
<xsl:attribute name="content">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:element>
</xsl:when>

<xsl:when test="@encodinganalog='700'"> 
<xsl:element name="meta">
<xsl:attribute name="name">dc.contributor</xsl:attribute>
<xsl:attribute name="content">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:element>
</xsl:when>

<xsl:when test="@encodinganalog='710'"> 
<xsl:element name="meta">
<xsl:attribute name="name">dc.contributor</xsl:attribute>
<xsl:attribute name="content">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:element>
</xsl:when>

<xsl:otherwise>
<xsl:element name="meta">
<xsl:attribute name="name">dc.contributor</xsl:attribute>
<xsl:attribute name="content">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>

<xsl:for-each select="ead//controlaccess/subject">
<xsl:element name="meta">
<xsl:attribute name="name">dc.subject</xsl:attribute>
<xsl:attribute name="content">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:element>
</xsl:for-each>

<xsl:element name="meta">
<xsl:attribute name="name">dc.title</xsl:attribute>
<xsl:attribute name="content">
<xsl:value-of select="ead/archdesc/did/unittitle"/>
</xsl:attribute>
</xsl:element>

<xsl:element name="meta">
<xsl:attribute name="name">dc.type</xsl:attribute>
<xsl:attribute name="content">text</xsl:attribute>
</xsl:element>

<xsl:element name="meta">
<xsl:attribute name="name">dc.format</xsl:attribute>
<xsl:attribute name="content">manuscripts</xsl:attribute>
</xsl:element>

<xsl:element name="meta">
<xsl:attribute name="name">dc.format</xsl:attribute>
<xsl:attribute name="content">finding aids</xsl:attribute>
</xsl:element>

<xsl:for-each select="ead//controlaccess/geogname">
<xsl:element name="meta">
<xsl:attribute name="name">dc.coverage</xsl:attribute>
<xsl:attribute name="content">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:element>
</xsl:for-each>

<!-- ==================================== -->

<!-- Link to CSS Stylesheet -->
<link rel="stylesheet" type="text/css" href="styles/findaids.css"/>

</head>

<body>


<!-- Header with logo -->
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td style="padding-top: 2px; padding-bottom: 2px;" align="center" valign="center" bgcolor="#E0E0E0"><a href="http://www.lib.umn.edu/ymca"><img src="kautz-archives.gif" width="150" height="49"  border="0" alt="YMCA Archives Logo"/></a></td>
</tr>
<tr>
<td bgcolor="#000000" align="center"><font size="2" face="Palatino, serif" color="#FFFFFF">318 Elmer L. 
      Andersen Library, University of Minnesota, 222 21st Avenue South, Minneapolis, 
      MN 55455</font></td>
      </tr>
      
</table>




<xsl:apply-templates/>




<!-- ========== HORIZONTAL RULE AND COPYRIGHT TEXT ======== -->

<table width="98%" border="0">
<tr>
<td valign="top" width="60%">
<p class="footer">
E-mail questions or comments to: <a href="mailto:ymcaarch@umn.edu">ymcaarch@umn.edu</a>
<br></br>

Please credit the Kautz Family YMCA Archives, University of Minnesota Libraries
if you copy or reproduce material from this page.  <br/>
</p>
</td>

<td valign="top" width="40%">
<p class="footer">
&#169; 2005 by the Regents of the <b><a href="http://www1.umn.edu/twincities/">University of Minnesota - Twin 
Cities</a></b> and  <b><a href="http://www.lib.umn.edu/">University Libraries.</a> </b> All rights reserved. <br/>
The University  of Minnesota is an equal opportunity educator and employer.<br/>
<b><a href="http://www.lib.umn.edu/appuse.phtml">Appropriate Use of Electronic  Resources</a></b>.<br/> </p>
</td>

</tr>
</table>

<!-- ===================================================== -->


</body>
</html>
</xsl:template>

<!-- ===END: Creates the Skeleton HTML for the Finding Aid=== -->


<!-- Creates Name for Finding Aid in Header -->
<xsl:template match="ead">
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="eadheader">
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="eadid"/>

<xsl:template match="filedesc">
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="notestmt"/>

<xsl:template match="profiledesc"/>

<xsl:template match="publicationstmt"/>

<xsl:template match="titlestmt">
<p align="center"><span class="title">
<xsl:value-of select="titleproper"/>
</span><br/>
<span class="subtitle">
<xsl:value-of select="subtitle"/>
</span></p>



</xsl:template>



<xsl:template match="archdesc">


<!-- ==========  TABLE OF CONTENTS ========== -->
<br/>

<table width="100%">

<tr> <td id="toc" valign="top" class="toc" colspan="3" align="center" bgcolor="#E0E0E0"><b>TABLE OF CONTENTS</b></td></tr>

<tr><td valign="top" class="toc">
<xsl:if test="bioghist/head[@altrender='biography']">
<a href="#a2b">Biography</a> | 
</xsl:if>

<xsl:if test="bioghist/head[@altrender='history']">
<a href="#a2h">Historical Sketch</a> |
</xsl:if>

<xsl:if test="scopecontent">
<a href="#a3">Contents Summary/Organization</a> | 
</xsl:if>

<a href="#a8">Administrative/Access Info</a> |

<xsl:if test="dsc">
<a href="#a9">Contents Details</a> | 
</xsl:if>


<xsl:if test="relatedmaterial">
<a href="#a5">Related Materials</a> |
</xsl:if>

<xsl:if test="otherfindaid">
<a href="#a6">Other Finding Aids</a> |
</xsl:if>

<xsl:if test="controlaccess">
<a href="#a7">Indexed Terms/Access Points</a> 
</xsl:if>


</td></tr>
</table>
<br></br>
<!-- ==================================================== -->


<!-- Tests for presence of access restrictions and generates an alert in header -->

<xsl:if test="descgrp/accessrestrict">
<p class="alert">Access to or use of this collection is
currently restricted.  <br></br> For details, see the 
<a href="#a8">Administrative/Access Info section</a> below.</p>
</xsl:if>
<br></br>
<xsl:apply-templates/>
</xsl:template>

<!-- Translates various render attributes into HMTL formatting -->
<xsl:template match="emph[@render='bold']">
<b>
<xsl:value-of select="."/>
</b>
</xsl:template>


<xsl:template match="emph[@render='italic']">
<i>
<xsl:value-of select="."/>
</i>
</xsl:template>


<xsl:template match="emph[@render='underline']">
<u>
<xsl:value-of select="."/>
</u>
</xsl:template>


<!-- Creates HTML hyperlinks -->
<xsl:template match="extref">
   <a target="newwindow" href="{@href}">
     <xsl:apply-templates/>
   </a>
</xsl:template>

<xsl:template match="dao">
   <a target="newwindow" href="{@href}">
     <xsl:apply-templates/>
   </a>
</xsl:template>


<!-- Formats title elements in italics -->
<xsl:template match="title">
<i>
<xsl:value-of select="."/>
</i>
</xsl:template>

<!-- Translates XML tables into HTML tables -->
<xsl:template name="table">
<xsl:for-each select="//table/tgroup">
<table width="100%">
<tr>
<xsl:for-each select="colspec">
<td width="{@colwidth}"></td>
</xsl:for-each>
</tr>
<xsl:for-each select="thead">
<xsl:for-each select="row">
<tr>
<xsl:for-each select="entry">
<td valign="top"><b><xsl:value-of select="."/></b>
</td>
</xsl:for-each>
</tr>
</xsl:for-each>
</xsl:for-each>

<xsl:for-each select="tbody">
<xsl:for-each select="row">
<tr>
<xsl:for-each select="entry">
<td valign="top"><xsl:value-of select="."/></td>
</xsl:for-each>
</tr>
</xsl:for-each>
</xsl:for-each>
</table>
</xsl:for-each>
</xsl:template>



<!-- ===BEGIN: Creates Overview of the Collection section=== -->
<xsl:template match="archdesc/did">
<table width="100%">
<tr><td width="5%"> </td><td width="15%"> </td>
<td width="80%"> </td></tr>
<tr><td colspan="3"><h3 class="sectionhead"><a name="a1">
<xsl:value-of select="head"/></a></h3> </td></tr>
<tr><td> </td><td valign="TOP"><b>Creator:</b></td><td>
<xsl:value-of select="origination"/>
</td></tr>
<tr><td> </td><td valign="TOP"><b>Title:</b></td><td>
<xsl:value-of select="unittitle"/>
</td></tr>
<tr><td> </td><td valign="TOP"><b>Date:</b></td><td>
<xsl:for-each select='unitdate'>
	<xsl:apply-templates/>
</xsl:for-each>
</td></tr>
<tr><td> </td><td valign="TOP"><b>Collection Number:</b></td><td>
<xsl:value-of select="unitid"/>
</td></tr>
<tr><td> </td><td valign="TOP"><b>Abstract:</b></td><td>
<xsl:apply-templates select="abstract"/>
</td></tr>
<tr><td> </td><td valign="TOP"><b>Quantity:</b></td><td>
<xsl:value-of select="physdesc"/>
</td></tr>
<tr><td> </td><td valign="TOP"><b>Location:</b></td><td>
<xsl:value-of select="physloc"/>
</td></tr>
</table>
<p class="toplink"><a href="#toc">Return to the Table of Contents</a></p>
<br></br><hr noshade="noshade"></hr>
</xsl:template>

<!-- ===END: Creates Overview of the Collection section=== -->


<!-- Creates Biography or Historical Sketch -->
<xsl:template match="archdesc/bioghist">
<xsl:apply-templates/>
<p class="toplink"><a href="#toc">Return to the Table of Contents</a></p>
<br></br><hr noshade="noshade"></hr>
</xsl:template>

<xsl:template match="archdesc/bioghist/head">
<h3 class="sectionhead"><a name="a2">
<xsl:apply-templates/>
</a></h3>
</xsl:template>

<xsl:template match="archdesc/bioghist/p">
<p style="margin-left: 25pt; text-indent:25pt">
<xsl:apply-templates/>
</p>
</xsl:template>

<xsl:template match="archdesc/bioghist/table">
<xsl:call-template name="table"/>
</xsl:template>

<xsl:template match="archdesc/bioghist/bioghist/head">
<h3>
<xsl:apply-templates/>
</h3>
</xsl:template>

<!--Creates Subsidiary Biography or Historical Sketch sections -->
<xsl:template match="archdesc/bioghist/bioghist/p">
<p style="margin-left: 25pt; text-indent:25pt">
<xsl:apply-templates/>
</p>
</xsl:template>

<xsl:template match="chronlist">
<table width="100%">
<tr><td width="5%"> </td><td width="20%"> </td>
<td width="75%"> </td></tr>
<xsl:apply-templates/>
</table>
</xsl:template>

<xsl:template match="listhead">
<tr><td></td><td><b>
<xsl:value-of select="head01"/>
</b></td>
<td><b>
<xsl:value-of select="head02"/>
</b></td></tr>
</xsl:template>

<xsl:template match="head01"/>
<xsl:template match="head02"/>

<xsl:template match="chronitem">
<xsl:choose>

<xsl:when test="eventgrp">
<tr><td></td>
<td align="top"><xsl:apply-templates select="date"/></td>
<td align="top">
<xsl:apply-templates select="eventgrp/event[position()=1]"/>
</td></tr>
<xsl:for-each select="eventgrp/event[position()!=1]">
<tr><td></td><td></td><td align="top"><xsl:apply-templates/></td></tr>
</xsl:for-each>
</xsl:when>

<xsl:otherwise>
<tr><td></td>
<td align="top"><xsl:apply-templates select="date"/></td>
<td align="top"><xsl:apply-templates select="event"/></td></tr>
</xsl:otherwise>

</xsl:choose>
</xsl:template>


<!--Creates Scope and Content Note -->
<xsl:template match="archdesc/scopecontent">
<xsl:apply-templates/>
<p class="toplink"><a href="#toc">Return to the Table of Contents</a></p>
<br></br><hr noshade="noshade"></hr>
</xsl:template>

<xsl:template match="archdesc/scopecontent/head">
<h3 class="sectionhead"><a name="a3">
<xsl:apply-templates/>
</a></h3>
</xsl:template>

<xsl:template match="archdesc/scopecontent/p">
<p style="margin-left: 25pt; text-indent:25pt">
<xsl:apply-templates/>
</p>
</xsl:template>

<xsl:template match="archdesc/scopecontent/scopecontent/head">
<h3><font face="arial">
<xsl:apply-templates/>
</font></h3>
</xsl:template>

<xsl:template match="archdesc/scopecontent/scopecontent/p">
<p style="margin-left: 25pt; text-indent:25pt">
<xsl:apply-templates/>
</p>
</xsl:template>

<xsl:template match="archdesc/scopecontent/table">
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="archdesc/scopecontent/table/tgroup">
<table width="100%">
<tr><td width="10%"></td>
<td width="10%"></td>
<td width="40%"></td>
<td width="40%"></td>
<xsl:apply-templates/></tr></table>
</xsl:template>

<xsl:template match="archdesc/scopecontent/table/tgroup/tbody">
<xsl:for-each select="row">
<tr><td></td>
<td><xsl:value-of select="entry[@colname='1']"/></td>
<td><xsl:value-of select="entry[@colname='2']"/></td>
<td><xsl:value-of select="entry[@colname='3']"/></td>
</tr></xsl:for-each>
</xsl:template>

<!-- Creates Organization/Arrangement of the Collection Section -->
<xsl:template match="archdesc/arrangement">
<table width="100%">
<tr><td width="5%"> </td><td width="5%"> </td>
<td width="90%"> </td></tr>

<xsl:for-each select="head">
<tr><td colspan="3"> <h3 class="sectionhead"><a name="a4">
<xsl:apply-templates select="."/></a></h3>
</td></tr>
</xsl:for-each>

<xsl:for-each select="p">
<tr><td> </td><td colspan="2">
<xsl:apply-templates select="."/>
</td></tr>
</xsl:for-each>

<xsl:for-each select="list">
<tr><td> </td><td colspan="2">
<xsl:apply-templates select="head"/>
</td></tr>




<!--Creates hotlinks from Organization Section to Detailed Description -->
<xsl:for-each select="item">
<tr><td> </td><td> </td><td colspan="1">
<a><xsl:attribute name="href">#series<xsl:number/>
</xsl:attribute>
<xsl:apply-templates select="."/>
</a>
</td></tr>
</xsl:for-each>
</xsl:for-each>

</table>
<p class="toplink"><a href="#toc">Return to the Table of Contents</a></p>
<br> </br><hr noshade="noshade"> </hr>
</xsl:template>


<!-- Formats Related Materials Section -->   
<xsl:template match="archdesc/relatedmaterial">
<table width="100%">
<tr><td width="5%"> </td><td width="5%"> </td>
<td width="90%"> </td></tr>

<xsl:for-each select="head">
<tr><td colspan="3"> <h3 class="sectionhead"><a name="a5">
<xsl:apply-templates select="."/></a></h3>
</td></tr>
</xsl:for-each>

<xsl:for-each select="p">
<tr><td> </td><td colspan="2">
<xsl:apply-templates select="."/>
</td></tr>
</xsl:for-each>

<xsl:for-each select="list">
<tr><td> </td><td colspan="2">
<xsl:apply-templates select="head"/>
</td></tr>
<xsl:for-each select="item">
<tr><td> </td><td> </td><td>
<xsl:apply-templates select="."/>
</td></tr>
</xsl:for-each>
</xsl:for-each>

</table>
<p class="toplink"><a href="#toc">Return to the Table of Contents</a></p>
<br> </br><hr noshade="noshade"> </hr>
</xsl:template>




<xsl:template match="archdesc/otherfindaid">
<table width="100%">
<tr> <td width="5%"> </td><td width="5%"> </td>
<td width="90%"> </td></tr>
<xsl:apply-templates/>
</table>
<p class="toplink"><a href="#toc">Return to the Table of Contents</a></p>
<br> </br><hr noshade="noshade"> </hr>
</xsl:template>

<xsl:template match="archdesc/otherfindaid/head">
<tr><td colspan="3"><h3 class="sectionhead"><a name="a6">
<xsl:apply-templates/>
</a></h3> </td></tr>
</xsl:template>

<xsl:template match="archdesc/otherfindaid/p">
<tr><td> </td><td colspan="2">
<xsl:apply-templates/>
</td></tr>
</xsl:template>


<xsl:template match="archdesc/odd">
<table width="100%">
<tr> <td width="5%"> </td><td width="5%"> </td>
<td width="90%"> </td></tr>
<xsl:apply-templates/>
</table>
<br> </br>
</xsl:template>

<xsl:template match="archdesc/odd/head">
<tr><td colspan="3"><h3 class="sectionhead"><a name="a10">
<xsl:apply-templates/>
</a></h3> </td></tr>
</xsl:template>

<xsl:template match="archdesc/odd/p">
<tr><td> </td><td colspan="2">
<xsl:apply-templates/>
</td></tr>
</xsl:template>


<!-- Formats list of indexed terms -->
<xsl:template match="archdesc/controlaccess">
<table width="100%">
<tr><td width="5%"> </td><td width="5%"> </td>
<td width="90%"> </td></tr>
<xsl:apply-templates/>
</table>
<p class="toplink"><a href="#toc">Return to the Table of Contents</a></p>
<br> </br><hr noshade="noshade"> </hr>
</xsl:template>

<xsl:template match="archdesc/controlaccess/head">
<tr><td colspan="3"><h3 class="sectionhead"><a name="a7">
<xsl:apply-templates/>
</a></h3> </td></tr>
</xsl:template>

<xsl:template match="archdesc/controlaccess/p">
<tr><td> </td><td colspan="2">
<xsl:apply-templates/>
</td></tr>
</xsl:template>
    
<xsl:template match="archdesc/controlaccess/controlaccess">
<xsl:apply-templates/>
</xsl:template>


<xsl:template match="archdesc/controlaccess/controlaccess/head"> 
<tr><td> </td><td colspan="2"><b>
<xsl:apply-templates/>
</b></td></tr>
</xsl:template>

<xsl:template match="controlaccess/subject |controlaccess/corpname | controlaccess/persname | controlaccess/genreform | controlaccess/title | controlaccess/geogname | controlaccess/occupation | controlaccess/function">
<tr><td></td><td></td><td>
<xsl:apply-templates/>
</td></tr>
</xsl:template>


<!-- ===BEGIN: Formats Administrative Information section=== -->
<xsl:template match="archdesc/descgrp">
<table width="100%">
<tr><td width="5%"> </td><td width="5%"> </td>
<td width="90%"> </td></tr>
<tr><td colspan="3"> <h3 class="sectionhead"><a name="a8">
<xsl:value-of select="head"/>
</a></h3> </td></tr>
<xsl:apply-templates/>
</table>
<p class="toplink"><a href="#toc">Return to the Table of Contents</a></p>
<br> </br><hr noshade="noshade"> </hr>
</xsl:template>

<xsl:template match="archdesc/descgrp/head"/>

<xsl:template match="descgrp/accessrestrict">
<tr><td> </td><td colspan="2"><b>
<xsl:value-of select="head"/>
</b> </td></tr>
<xsl:for-each select="p">
<tr><td> </td><td> </td><td colspan="1">
<xsl:apply-templates/>
</td></tr>
</xsl:for-each>
</xsl:template>

<xsl:template match="descgrp/userestrict">
<tr><td> </td><td colspan="2"><b>
<xsl:value-of select="head"/>
</b></td></tr>
<xsl:for-each select="p">
<tr><td> </td><td> </td><td colspan="1">
<xsl:apply-templates/>
</td></tr>
</xsl:for-each>
</xsl:template>

<xsl:template match="descgrp/prefercite">
<tr><td> </td><td colspan="2"><b>
<xsl:value-of select="head"/>
</b> </td></tr>
<xsl:for-each select="p">
<tr><td> </td><td> </td><td colspan="1">
<xsl:apply-templates/>
</td></tr>
</xsl:for-each>
</xsl:template>


<xsl:template match="descgrp/acqinfo">
<tr><td> </td><td colspan="2"><b>
<xsl:value-of select="head"/>
</b> </td></tr>
<xsl:for-each select="p">
<tr><td> </td><td> </td><td colspan="1">
<xsl:apply-templates/>
</td></tr>
</xsl:for-each>
</xsl:template>

<xsl:template match="descgrp/custodhist">
<tr><td> </td><td colspan="2"><b>
<xsl:value-of select="head"/>
</b> </td></tr>
<xsl:for-each select="p">
<tr><td> </td><td> </td><td colspan="1">
<xsl:apply-templates/>
</td></tr>
</xsl:for-each>
</xsl:template>

<xsl:template match="descgrp/processinfo">
<tr><td> </td><td colspan="2"> <b>
<xsl:value-of select="head"/>
</b> </td></tr>
<xsl:for-each select="p">
<tr><td> </td><td> </td><td colspan="1">
<xsl:apply-templates/>
</td></tr>
</xsl:for-each>
</xsl:template>

<xsl:template match="descgrp/altformavail">
<tr><td> </td><td colspan="2"> <b>
<xsl:value-of select="head"/>
</b> </td></tr>
<xsl:for-each select="p">
<tr><td> </td><td> </td><td colspan="1">
<xsl:apply-templates/>
</td></tr>
</xsl:for-each>
</xsl:template>

<!-- ===END: Formats Administrative Information section=== -->


<!-- ===DETAILED DESCRIPTION GENERAL FORMATTING=== -->


<xsl:template match="archdesc/dsc">

<h3 class="sectionhead"><a name="a9">
<xsl:apply-templates select="head"/>
</a></h3>

<p class="sectionp">
<xsl:apply-templates select="p"/>
</p>





<xsl:call-template name="seriesvsfolders"/>

<!-- Creates a hyperlink to the table of contents at the end of the detailed description if it is a simple folder list -->
<xsl:choose>
<xsl:when test="c01[@level='file']">
<xsl:call-template name="folderlist"/>
<p class="toplink"><a href="#toc">Return to the Table of Contents</a><br/>
<a href="#a4" class="topolink">Return to the Organization of the Collection Section</a></p>
<br> </br>
<br></br>
</xsl:when>
</xsl:choose>

<hr noshade="noshade"> </hr>
</xsl:template>


<!-- Tests to see if C01 is a series name or a folder name and calls the appropriate template -->

<xsl:template name="seriesvsfolders">

<xsl:for-each select="c01">
<xsl:choose>

<xsl:when test="@level='series'">
<xsl:call-template name="serieslist"/>

<!-- Creates a hyperlink to the table of contents at the end of every series -->
<p class="toplink"><a href="#toc" >Return to the Table of Contents</a><br/>
<a href="#a4">Return to the Organization of the Collection Section</a></p>
<br> </br>
<br></br>
</xsl:when>

<xsl:otherwise>
<xsl:call-template name="folderlist"/>

</xsl:otherwise>


</xsl:choose>


</xsl:for-each>


</xsl:template>


<!-- Formats the heading for the container column based on the value of the container's type attribute -->
	
<xsl:template name="container-one">
		<xsl:if test="container[1]/@type='box' or
		container[1]/@type='Box'">
					<xsl:text>Box </xsl:text>
		</xsl:if>
		
		<xsl:if test="container[1]/@type='folder' or
		container[1]/@type='Folder'">
						<xsl:text>Folder </xsl:text>
		</xsl:if>
		
		<xsl:if test="container[1]/@type='box-folder' or
		container[1]/@type='Box-Folder'">
						<xsl:text>Box-Folder </xsl:text>
		</xsl:if>
		
		<xsl:if test="container[1]/@type='reel' or
		container[1]/@type='Reel'">
					<xsl:text>Reel </xsl:text>
		</xsl:if>
		
		<xsl:if test="container[1]/@type='carton' or
		container[1]/@type='Carton'">
					<xsl:text>Carton </xsl:text>
		</xsl:if>

		<xsl:if test="container[1]/@type='volume' or
		container[1]/@type='Volume'">
				<xsl:text>Volume </xsl:text>
		</xsl:if>

		<xsl:if test="container[1]/@type='page' or
		container[1]/@type='Page'">
				<xsl:text>Page </xsl:text>
		</xsl:if>

		<xsl:if test="container[1]/@type='reel-frame' or
		container[1]/@type='Reel-Frame'">
					<xsl:text>Reel-Frame </xsl:text>
		</xsl:if>
	
<xsl:if test="container[1]/@type='drawer' or
		container[1]/@type='Drawer'">
					<xsl:text>Drawer </xsl:text>
		</xsl:if>

	<xsl:if test="container[1]/@type='othertype'">
					<xsl:value-of select="container[1]/@othertype"/>
		</xsl:if>
	</xsl:template>


<!-- Generates text label for the second container (e.g. folder) if it exists -->
	
<xsl:template name="container-two">
		<xsl:if test="container[2]/@type='box' or
		container[1]/@type='Box'">
					<xsl:text>Box </xsl:text>
		</xsl:if>
		
		<xsl:if test="container[2]/@type='folder' or
		container[1]/@type='Folder'">
						<xsl:text>Folder </xsl:text>
		</xsl:if>
		
		<xsl:if test="container[2]/@type='box-folder' or
		container[1]/@type='Box-Folder'">
						<xsl:text>Box-Folder </xsl:text>
		</xsl:if>
		
		<xsl:if test="container[2]/@type='reel' or
		container[1]/@type='Reel'">
					<xsl:text>Reel </xsl:text>
		</xsl:if>
		
		<xsl:if test="container[2]/@type='carton' or
		container[1]/@type='Carton'">
					<xsl:text>Carton </xsl:text>
		</xsl:if>

		<xsl:if test="container[2]/@type='volume' or
		container[1]/@type='Volume'">
				<xsl:text>Volume </xsl:text>
		</xsl:if>

		<xsl:if test="container[2]/@type='page' or
		container[1]/@type='Page'">
				<xsl:text>Page </xsl:text>
		</xsl:if>

		<xsl:if test="container[2]/@type='reel-frame' or
		container[1]/@type='Reel-Frame'">
					<xsl:text>Reel-Frame </xsl:text>
		</xsl:if>
	
<xsl:if test="container[2]/@type='drawer' or
		container[1]/@type='Drawer'">
					<xsl:text>Drawer </xsl:text>
		</xsl:if>

	<xsl:if test="container[2]/@type='othertype'">
					<xsl:value-of select="container[1]/@othertype"/>
		</xsl:if>
	</xsl:template>


<!-- Generates the unititle, unitdate, etc. for each component level, 
formatting in boldface if the component level is a subseries -->
<xsl:template name="component-did">

<xsl:choose>
<xsl:when test="parent::*[@level='subseries']">

<b>
<xsl:apply-templates select="unitid"/>
<xsl:apply-templates select="unittitle"/>
<xsl:apply-templates select="unitdate"/>
<xsl:apply-templates select="physdesc"/>
<xsl:apply-templates select="dao"/>
</b>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="unitid"/>
<xsl:apply-templates select="unittitle"/>
<xsl:apply-templates select="unitdate"/>
<xsl:apply-templates select="physdesc"/>
<xsl:apply-templates select="dao"/>
<xsl:if test="container[2]">
<xsl:text> [</xsl:text><xsl:call-template name="container-two"/>
<xsl:apply-templates select="container[2]"/><xsl:text>]</xsl:text>
</xsl:if>
</xsl:otherwise>
</xsl:choose>

</xsl:template>

<!-- Generates biographical notes in the dsc section, adding a label to the beginning of the first paragraph -->
<xsl:template name='bioghistp'>


<xsl:choose>
<xsl:when test='position()=1'>
<span style="color: #212121;">Biographical Note: </span>
<xsl:apply-templates select="."/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="."/>
</xsl:otherwise>
</xsl:choose>


</xsl:template>


<!-- Generates scope note in the dsc section, adding a label to the beginning of the first paragraph if there are also biographical notes in the dsc -->
<xsl:template name='scopecontentp'>

<xsl:choose>
<xsl:when test='position()=1 and /ead/archdesc/dsc//bioghist'>
<span style="color: #212121;">Content Note: </span>
<xsl:apply-templates select="."/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="."/>
</xsl:otherwise>
</xsl:choose>

</xsl:template>

<!-- ===-BEGIN: FOLDER LIST FORMATTING TEMPLATE=== -->

<xsl:template name="folderlist">

<!-- C01 SIMPLE FOLDER LIST -->
<table width="100%">
<tr><td width="10%"> </td><td width="7%"> </td>
<td width="7%"> </td><td width="7%"> </td><td width="7%"> </td>
<td width="7%"> </td><td width="7%"> </td><td width="7%"> </td>
<td width="7%"> </td><td width="7%"> </td><td width="7%"> </td>
<td width="7%"> </td><td width="7%"> </td><td width="7%"> </td>
<td width="7%"> </td><td width="7%"> </td><td width="7%"> </td>
</tr>


<xsl:for-each select="did">

<xsl:choose>

<xsl:when test="container=preceding::did[1]/container">
<tr>
<td></td>
<td colspan="11">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:when>

<xsl:otherwise>
<tr>
<td class="container">
<xsl:call-template name="container-one"/>
<xsl:apply-templates select="container[1]"/>
 </td>
<td colspan="11">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:otherwise>

</xsl:choose>
</xsl:for-each>

<xsl:for-each select="bioghist/p">
<tr><td></td> <td></td> <td colspan="9" valign="top" class="scope">
<xsl:call-template name='bioghistp'/>
</td></tr>		
</xsl:for-each>
                                  
<xsl:for-each select="scopecontent/p">
<tr><td></td> <td></td> <td colspan="9" valign="top" class="scope">
<xsl:call-template name='scopecontentp'/>
</td></tr>
</xsl:for-each>

<xsl:for-each select="scopecontent/table">
<tr><td></td><td></td><td colspan="11"><xsl:call-template name="table"/>
</td></tr>
</xsl:for-each>


<xsl:for-each select="odd/p | note/p">
<tr><td></td><td></td> <td colspan="9" valign="top">
<xsl:apply-templates select="."/>
</td></tr>
</xsl:for-each>





<!-- C02 SIMPLE FOLDER LIST -->


<xsl:for-each select="c02">
<xsl:for-each select="did">
<xsl:choose>
<xsl:when test="container=preceding::did[1]/container">
<tr>
<td></td><td></td>
<td colspan="10">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:when>

<xsl:otherwise>
<tr>
<td valign="top" class="container"> 
<xsl:call-template name="container-one"/>
<xsl:apply-templates select="container[1]"/>
</td>
<td></td>
<td colspan="10">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:otherwise>
</xsl:choose>

</xsl:for-each>

<xsl:for-each select="scopecontent/p">
<tr><td> </td><td> </td><td> </td><td colspan="8" class="scope">
<xsl:call-template name='scopecontentp'/>
</td></tr>
</xsl:for-each>

<xsl:for-each select="odd/p | note/p">
<tr><td> </td><td> </td><td> </td><td colspan="8">
<xsl:apply-templates select="."/>
</td></tr>
</xsl:for-each>





<!-- C03 SIMPLE FOLDER LIST -->


<xsl:for-each select="c03">
<xsl:for-each select="did">

<xsl:choose>

<xsl:when test="container=preceding::did[1]/container">
<tr>
<td></td><td></td><td></td>
<td colspan="9">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:when>

<xsl:otherwise>
<tr>
<td valign="top" class="container"> 
<xsl:call-template name="container-one"/>
<xsl:apply-templates select="container[1]"/>
 </td>
<td></td><td></td>
<td colspan="9">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:otherwise>

</xsl:choose>
</xsl:for-each>

<xsl:for-each select="scopecontent/p">
<tr><td> </td><td> </td><td> </td><td> </td><td colspan="7" class="scope">
<xsl:call-template name='scopecontentp'/>
</td></tr>
</xsl:for-each>

<xsl:for-each select="odd/p | note/p">
<tr><td> </td><td> </td><td> </td><td> </td><td colspan="7">
<xsl:apply-templates select="."/>
</td></tr>
</xsl:for-each>





<!-- C04 SIMPLE FOLDER LIST -->


<xsl:for-each select="c04">
<xsl:for-each select="did">

<xsl:choose>

<xsl:when test="container=preceding::did[1]/container">
<tr>
<td></td><td></td><td></td><td></td>
<td colspan="8">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:when>

<xsl:otherwise>

<tr>
<td valign="top" class="container"> 
<xsl:call-template name="container-one"/>
<xsl:apply-templates select="container[1]"/>
 </td>
<td></td><td></td><td></td>
<td colspan="8">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:otherwise>

</xsl:choose>
</xsl:for-each>

<xsl:for-each select="scopecontent/p">
<tr><td> </td><td> </td><td> </td><td> </td><td> </td> <td colspan="6" class="scope">
<xsl:call-template name='scopecontentp'/>
</td></tr>
</xsl:for-each>

<xsl:for-each select="odd/p | note/p">
<tr><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td> <td colspan="6">
<xsl:apply-templates select="."/>
</td></tr>
</xsl:for-each>






<!-- C05 SIMPLE FOLDER LIST -->


<xsl:for-each select="c05">
<xsl:for-each select="did">

<xsl:choose>

<xsl:when test="container=preceding::did[1]/container">
<tr>
<td></td><td></td><td></td><td></td><td></td>
<td colspan="7">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:when>

<xsl:otherwise>

<tr>
<td valign="top" class="container"> 
<xsl:call-template name="container-one"/>
<xsl:apply-templates select="container[1]"/>
 </td>
<td></td><td></td><td></td><td></td>
<td colspan="7">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:otherwise>

</xsl:choose>
</xsl:for-each>

<xsl:for-each select="scopecontent/p">
<tr><td> </td><td> </td><td> </td>
<td> </td><td> </td><td> </td><td colspan="5" class="scope">
<xsl:call-template name='scopecontentp'/>
</td></tr>
</xsl:for-each>

<xsl:for-each select="odd/p | note/p">
<tr><td> </td><td> </td><td> </td>
<td> </td><td> </td><td> </td><td> </td><td colspan="5">
<xsl:apply-templates select="."/>
</td></tr>
</xsl:for-each>






<!-- C06 SIMPLE FOLDER LIST-->


<xsl:for-each select="c06">
<xsl:for-each select="did">

<xsl:choose>

<xsl:when test="container=preceding::did[1]/container">
<tr>
<td></td><td></td><td></td><td></td><td></td><td></td>
<td colspan="6">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:when>

<xsl:otherwise>
<tr>
<td valign="top" class="container"> 
<xsl:call-template name="container-one"/>
<xsl:apply-templates select="container[1]"/>
 </td>
 <td></td><td></td><td></td><td></td><td></td>
<td colspan="11">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:otherwise>

</xsl:choose>
</xsl:for-each>

<xsl:for-each select="scopecontent/p">
<tr><td> </td><td> </td><td> </td>
<td> </td><td> </td><td> </td><td> </td><td colspan="4" class="scope">
<xsl:call-template name='scopecontentp'/>
</td></tr>
</xsl:for-each>

<xsl:for-each select="odd/p | note/p">
<tr><td> </td><td> </td><td> </td>
<td> </td><td> </td><td> </td><td> </td><td> </td><td colspan="4">
<xsl:apply-templates select="."/>
</td></tr>
</xsl:for-each>


</xsl:for-each>






<!-- C07 SIMPLE FOLDER LIST -->



<xsl:for-each select="c07">
<xsl:for-each select="did">

<xsl:choose>

<xsl:when test="container=preceding::did[1]/container">
<tr>
<td></td><td></td><td></td><td></td><td></td><td></td><td></td>
<td colspan="5">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:when>

<xsl:otherwise>
<tr>
<td valign="top" class="container"> 
<xsl:call-template name="container-one"/>
<xsl:apply-templates select="container"/>
 </td>
 <td></td><td></td><td></td><td></td><td></td><td></td>
<td colspan="5">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:otherwise>

</xsl:choose>
</xsl:for-each>

<xsl:for-each select="scopecontent/p">
<tr><td> </td><td> </td><td> </td>
<td> </td><td> </td><td> </td><td> </td><td colspan="4" class="scope">
<xsl:call-template name='scopecontentp'/>
</td></tr>
</xsl:for-each>

<xsl:for-each select="odd/p | note/p">
<tr><td> </td><td> </td><td> </td>
<td> </td><td> </td><td> </td><td> </td><td> </td><td colspan="4">
<xsl:apply-templates select="."/>
</td></tr>
</xsl:for-each>






<!-- C08 SIMPLE FOLDER LIST -->


<xsl:for-each select="c08">
<xsl:for-each select="did">

<xsl:choose>

<xsl:when test="container=preceding::did[1]/container">
<tr>
<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
<td colspan="4">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:when>

<xsl:otherwise>

<tr>
<td valign="top" class="container"> 
<xsl:call-template name="container-one"/>
<xsl:apply-templates select="container"/>
 </td>
 <td></td><td></td><td></td><td></td><td></td><td></td><td></td>
<td colspan="4">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:otherwise>

</xsl:choose>
</xsl:for-each>

<xsl:for-each select="scopecontent/p">
<tr><td> </td><td> </td><td> </td>
<td> </td><td> </td><td> </td><td> </td><td colspan="4" class="scope">
<xsl:call-template name='scopecontentp'/>
</td></tr>
</xsl:for-each>

<xsl:for-each select="odd/p | note/p">
<tr><td> </td><td> </td><td> </td>
<td> </td><td> </td><td> </td><td> </td><td> </td><td colspan="4">
<xsl:apply-templates select="."/>
</td></tr>
</xsl:for-each>





<!-- C09 SIMPLE FOLDER LIST -->

<xsl:for-each select="c09">
<xsl:for-each select="did">

<xsl:choose>

<xsl:when test="container=preceding::did[1]/container">
<tr>
<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
<td colspan="4">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:when>

<xsl:otherwise>

<tr>
<td valign="top" class="container"> 
<xsl:call-template name="container-one"/>
<xsl:apply-templates select="container"/>
 </td>
 <td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
<td colspan="4">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:otherwise>

</xsl:choose>
</xsl:for-each>

<xsl:for-each select="scopecontent/p">
<tr><td> </td><td> </td><td> </td>
<td> </td><td> </td><td> </td><td> </td><td colspan="3" class="scope">
<xsl:call-template name='scopecontentp'/>
</td></tr>
</xsl:for-each>

<xsl:for-each select="odd/p | note/p">
<tr><td> </td><td> </td><td> </td>
<td> </td><td> </td><td> </td><td> </td><td> </td><td colspan="3">
<xsl:apply-templates select="."/>
</td></tr>
</xsl:for-each>



</xsl:for-each> <!-- ends c09 -->
</xsl:for-each> <!-- ends c08 -->

</xsl:for-each> <!-- ends c07 -->
</xsl:for-each> <!-- ends c06 -->

</xsl:for-each> <!-- ends c05 -->
</xsl:for-each> <!-- ends c04 -->
</xsl:for-each> <!-- ends c03 not sure where c02 ends -->

</table>


</xsl:template>

<!-- ===END: FOLDER LIST FORMATTING TEMPLATE=== -->




<!-- ===BEGIN: SERIES LIST FORMATTING TEMPLATE=== -->

<xsl:template name="serieslist">


<!-- C01: SERIES LIST -->



<table width="100%">
<tr><td width="16%"> </td><td width="7%"> </td>
<td width="7%"> </td><td width="7%"> </td><td width="7%"> </td>
<td width="7%"> </td><td width="7%"> </td><td width="7%"> </td>
<td width="7%"> </td><td width="7%"> </td><td width="7%"> </td>
<td width="7%"> </td><td width="7%"> </td><td width="7%"> </td>
</tr>




<xsl:for-each select="did">
<tr>
<td colspan="14"><h3><a><xsl:attribute name="name">series<xsl:number count="c01" level="single"/>
</xsl:attribute>
<xsl:call-template name="component-did"/>
</a></h3>
</td></tr>

</xsl:for-each>
 
<xsl:for-each select="bioghist/p">
<tr><td colspan="13" valign="top">
<xsl:apply-templates select="."/>
</td></tr>
</xsl:for-each>
                                 
<xsl:for-each select="scopecontent/p">
<tr><td colspan="13" valign="top">
<xsl:apply-templates select="."/>
</td></tr>
</xsl:for-each>

<xsl:for-each select="scopecontent/table">
<tr><td><xsl:call-template name="table"/>
</td></tr>
</xsl:for-each>

<xsl:for-each select="odd/p | note/p">
<tr><td></td><td colspan="13" valign="top">
<xsl:apply-templates select="."/>
</td></tr>

</xsl:for-each>




<!-- C02: SERIES LIST -->


<xsl:for-each select="c02">
<xsl:for-each select="did">


<xsl:choose>

<xsl:when test="container=preceding::did[1]/container">
<tr>
<td></td>
<td colspan="11">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:when>

<xsl:otherwise>
<tr>
<td valign="top" class="container"> 
<xsl:call-template name="container-one"/>
<xsl:apply-templates select="container"/>
 </td>
<td colspan="11">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:otherwise>

</xsl:choose>


</xsl:for-each>

<xsl:for-each select="scopecontent/p">
<tr><td> </td><td> </td><td colspan="10" class="scope">
<xsl:call-template name='scopecontentp'/>
</td></tr>
</xsl:for-each>

<xsl:for-each select="scopecontent/table">
<tr><td></td><td></td><td colspan="11"><xsl:call-template name="table"/>
</td></tr>
</xsl:for-each>


<xsl:for-each select="odd/p | note/p">
<tr> <td> </td><td> </td><td colspan="10">
<xsl:apply-templates select="."/>
</td></tr>
</xsl:for-each>




<!-- C03: SERIES LIST -->


<xsl:for-each select="c03">
<xsl:for-each select="did">

<xsl:choose>
<xsl:when test="container=preceding::did[1]/container">
<tr>
<td></td><td></td>
<td colspan="10">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:when>

<xsl:otherwise>
<tr>
<td valign="top" class="container"> 
<xsl:call-template name="container-one"/>
<xsl:apply-templates select="container"/>
</td>
<td></td>
<td colspan="10">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>

<xsl:for-each select="scopecontent/p">
<tr>
<td> </td><td> </td><td> </td><td colspan="7" class="scope">
<xsl:call-template name='scopecontentp'/>
</td></tr>
</xsl:for-each>

<xsl:for-each select="odd/p | note/p">
<tr><td> </td><td> </td><td> </td><td colspan="7">
<xsl:apply-templates select="."/>
</td></tr>
</xsl:for-each>





<!-- C04: SERIES LIST -->


<xsl:for-each select="c04">
<xsl:for-each select="did">

<xsl:choose>

<xsl:when test="container=preceding::did[1]/container">
<tr>
<td></td><td></td><td></td>
<td colspan="9">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:when>

<xsl:otherwise>
<tr>
<td valign="top" class="container"> 
<xsl:call-template name="container-one"/>
<xsl:apply-templates select="container"/>
 </td>
<td></td><td></td>
<td colspan="9">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:otherwise>

</xsl:choose>

</xsl:for-each>

<xsl:for-each select="scopecontent/p">
<tr><td> </td><td> </td><td> </td><td> </td><td colspan="7" class="scope">
<xsl:call-template name='scopecontentp'/>
</td></tr>
</xsl:for-each>

<xsl:for-each select="odd/p | note/p">
<tr><td> </td><td> </td><td> </td><td> </td><td colspan="7">
<xsl:apply-templates select="."/>
</td></tr>
</xsl:for-each>




<!-- C05: SERIES LIST -->


<xsl:for-each select="c05">
<xsl:for-each select="did">

<xsl:choose>

<xsl:when test="container=preceding::did[1]/container">
<tr>
<td></td><td></td><td></td><td></td>
<td colspan="8">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:when>

<xsl:otherwise>
<tr>
<td valign="top" class="container"> 
<xsl:call-template name="container-one"/>
<xsl:apply-templates select="container"/>
 </td>
<td></td><td></td><td></td>
<td colspan="8">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:otherwise>

</xsl:choose>
</xsl:for-each>

<xsl:for-each select="scopecontent/p">
<tr><td> </td><td> </td><td> </td><td> </td><td> </td><td colspan="5" class="scope">
<xsl:call-template name='scopecontentp'/>
</td></tr>
</xsl:for-each>

<xsl:for-each select="odd/p | note/p">
<tr><td> </td><td> </td><td> </td><td> </td><td> </td><td colspan="5">
<xsl:apply-templates select="."/>
</td></tr>
</xsl:for-each>






<!-- C06: SERIES LIST -->


<xsl:for-each select="c06">
<xsl:for-each select="did">

<xsl:choose>

<xsl:when test="container=preceding::did[1]/container">
<tr>
<td></td><td></td><td></td><td></td><td></td>
<td colspan="7">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:when>

<xsl:otherwise>
<tr>
<td valign="top" class="container"> 
<xsl:call-template name="container-one"/>
<xsl:apply-templates select="container"/>
 </td>
<td></td><td></td><td></td><td></td>
<td colspan="7">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:otherwise>

</xsl:choose>
</xsl:for-each>

<xsl:for-each select="scopecontent/p">
<tr><td> </td><td> </td>
<td> </td><td> </td><td> </td><td> </td><td colspan="4" class="scope">
<xsl:call-template name='scopecontentp'/>
</td></tr>
</xsl:for-each>

<xsl:for-each select="odd/p | note/p">
<tr><td> </td><td> </td><td> </td>
<td> </td><td> </td><td> </td><td> </td><td colspan="4">
<xsl:apply-templates select="."/>
</td></tr>
</xsl:for-each>



<!-- C07: SERIES LIST -->


<xsl:for-each select="c07">
<xsl:for-each select="did">

<xsl:choose>

<xsl:when test="container=preceding::did[1]/container">
<tr>
<td></td><td></td><td></td><td></td><td></td><td></td>
<td colspan="6">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:when>

<xsl:otherwise>
<tr>
<td valign="top" class="container"> 
<xsl:call-template name="container-one"/>
<xsl:apply-templates select="container"/>
 </td>
 <td></td><td></td><td></td><td></td><td></td>
<td colspan="11">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:otherwise>

</xsl:choose>
</xsl:for-each>





<!-- C08: SERIES LIST -->

<xsl:for-each select="c08">
<xsl:for-each select="did">

<xsl:choose>

<xsl:when test="container=preceding::did[1]/container">
<tr>
<td></td><td></td><td></td><td></td><td></td><td></td><td></td>
<td colspan="5">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:when>

<xsl:otherwise>
<tr>
<td valign="top" class="container"> 
<xsl:call-template name="container-one"/>
<xsl:apply-templates select="container"/>
 </td>
 <td></td><td></td><td></td><td></td><td></td><td></td>
<td colspan="5">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:otherwise>

</xsl:choose>
</xsl:for-each>





<!-- C09: SERIES LIST -->


<xsl:for-each select="c09">
<xsl:for-each select="did">

<xsl:choose>

<xsl:when test="container=preceding::did[1]/container">
<tr>
<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
<td colspan="4">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:when>

<xsl:otherwise>
<tr>
<td valign="top" class="container"> 
<xsl:call-template name="container-one"/>
<xsl:apply-templates select="container"/>
 </td>
 <td></td><td></td><td></td><td></td><td></td><td></td><td></td>
<td colspan="4">
<xsl:call-template name="component-did"/>
</td>
</tr>
</xsl:otherwise>

</xsl:choose>

</xsl:for-each>


</xsl:for-each> <!-- ends c09 -->
</xsl:for-each> <!-- ends c08 -->
</xsl:for-each> <!-- ends c07 -->
</xsl:for-each> <!-- ends c06 -->
</xsl:for-each> <!-- ends c05 -->
</xsl:for-each> <!-- ends c04 -->
</xsl:for-each> <!-- ends c03 -->

</xsl:for-each> <!-- ends c02 -->







</table>


</xsl:template>



</xsl:stylesheet>

