Print

Print


Hello,

I tried to send this message yesterday, but for some reason, it did not
make it to the listserv. Apologies for any duplications, if any.

I am somewhat new to stylesheet creation, though I have recently taken the
SAA stylesheet course at Pratt (thanks to Kris and Michael for last week's
class!) Now that I'm back at work, we have run into a probelm between a
newly created finding aid and a stylesheet that does not go beyond the c03
level. My colleague is using the following in her finding aid:

Subgroup 1
   Series I
     container
   Series II
     container
   Series III
     Subseries 1
       container
     Subseries 2
       container
Subgroup 2


We attempted to create a EAD using the above, but our stylesheet (as stated
above), does not go beyond the c03 level, nor do we have a subgroup
declared. I believe I can update a copy of an existing stylesheet with your
help and advice.  Our stylesheet is based on a variation of NYU's. Please
find the coding below.

Thanks,
Tanya Elder
Archivist (NHPRC)
Center for Jewish History
15 W. 16th Street
New York, NY 10011
(212) 294-8301 x1013
[log in to unmask]

<!-- dsc totally rewritten by lmyrick -->

<xsl:template name="dsc">

<xsl:for-each select="ead/archdesc/dsc">
<h3><a name="a23">
<xsl:apply-templates select="head"/>
</a></h3>

<p style="margin-left: 25 pt"><i>
<xsl:apply-templates select="p"/>
</i></p>
</xsl:for-each>

<!--INNA's edit: added <xsl:text> to make links to series work - 12/14/2001-
->
<xsl:for-each select="ead/archdesc/dsc/c01">
<table cellpadding="5" border="0">
<a><xsl:attribute name="name">series<xsl:number/>
</xsl:attribute><xsl:text>&#160;</xsl:text>
</a>
<tr><td colspan="4"><p class="h2"><b><xsl:apply-templates
select="did/unittitle"/></b>
<!-- added 2001/11/06 -->
<xsl:for-each select="did/physdesc">&#x00A0;&#x00A0;<xsl:apply-templates />
</xsl:for-each>
</p></td></tr>

<tr><td colspan="4"><p class="seriesabstract"><xsl:apply-templates
select="did/abstract"/></p></td></tr>


<!-- added 2001/11/06 -->
<xsl:if test="./child::arrangement">
<tr><td colspan="4"><p class="h2scopecontent"><b>Arrangement: </b></p>
<xsl:for-each select="arrangement/p">
<p class="seriesscope"><xsl:apply-templates/></p>
</xsl:for-each>
</td></tr>
</xsl:if>
<!--switched around scopecontent and arrangement -Inna, 5/13/2002-->
<xsl:if test="./child::scopecontent">
<tr><td colspan="4"><p class="h2scopecontent"><b>Scope and Content: </b></p>
<xsl:for-each select="scopecontent/p">
<p class="seriesscope"><xsl:apply-templates/></p>
</xsl:for-each>
</td></tr>
</xsl:if>
<hr/>

<xsl:variable name="subseriestitle">
<xsl:value-of select="c02/did/unittitle"/>
</xsl:variable>

<xsl:for-each select="c02">
<xsl:choose>
<xsl:when test="contains($subseriestitle, 'Subseries')">
   <tr><td colspan="4"><p class="h3subseries"><b><xsl:apply-templates
select="did/unittitle"/></b></p></td></tr>
</xsl:when>
<xsl:otherwise>

<xsl:if test="@level='recordgrp'">
   <tr><td colspan="4"><p class="h3subseries"><b><xsl:apply-templates
select="did/unittitle"/></b></p></td></tr>
</xsl:if>

<!-- added for Inna 0809 -->
<!--<xsl:if test="@level='file'">
   <tr><td colspan="4"><p class="file"><b><xsl:apply-templates
select="did/unittitle"/></b></p></td></tr>
</xsl:if>-->

</xsl:otherwise>
</xsl:choose>

<xsl:for-each select="scopecontent">
<tr><td colspan="4"><p class="h2scopecontent"><b>Scope and Content: </b></p>
<xsl:for-each select="p">
<p class="seriesscope"><xsl:apply-templates/></p>
</xsl:for-each>
</td></tr>
</xsl:for-each>

<xsl:for-each select="did/container">
<xsl:variable name="box-number" select="self::container[@type='box']"/>
  <xsl:choose>
    <xsl:when test="@type='box'">
<xsl:choose>
<xsl:when test="not(../../preceding-sibling::c02/did[container[@type='box']
=$box-number]
  or ../../preceding-sibling::c02//did[container[@type='box']=$box-number])
  or ../preceding-sibling::c02//did[container[@type='volume']]">
       <xsl:if test="./following-sibling::container[@type='folder']">
    <xsl:copy-of select="$box-and-folder-heading"/>
       </xsl:if>
       <xsl:if test="./following-sibling::container[@type='volume']">
    <xsl:copy-of select="$box-and-volume-heading"/>
       </xsl:if>
       <xsl:if test= "not(./following-sibling::container[@type='folder']
or ./following-sibling::container[@type='volume'])">
    <xsl:copy-of select="$box-heading"/>
       </xsl:if>

<tr><td width="10%" valign="top"><xsl:apply-templates
select="self::container[@type='box']/text()"/></td><td width="10%"
valign="top"><xsl:apply-templates select="following-sibling::container/text
()"/></td>
<td width="50%"><xsl:apply-templates select="following-
sibling::unittitle"/></td>
<td width="30%" valign="top"><xsl:apply-templates select="following-
sibling::unitdate/text()"/></td></tr>

</xsl:when>
<xsl:otherwise>

<tr><td width="10%" valign="top"><xsl:apply-templates
select="self::container[@type='box']/text()"/></td><td width="10%"
valign="top"><xsl:apply-templates select="following-sibling::container/text
()"/></td><td width="50%"><xsl:apply-templates select="following-
sibling::unittitle"/></td><td width="30%" valign="top"><xsl:apply-templates
select="following-sibling::unitdate/text()"/></td></tr>

</xsl:otherwise>
</xsl:choose>

    </xsl:when>
    <xsl:when test="@type='folder'">
      <!--<td><xsl:apply-templates/></td>-->
    </xsl:when>

    <!--<xsl:when test="@type='volume'">
      <td><xsl:apply-templates/></td>
    </xsl:when>-->

    <xsl:when test="@type='volume'">
<xsl:variable name="volume-number" select="self::container
[@type='volume']"/>
<xsl:choose>
<xsl:when test="not(../../preceding-sibling::c02/did[container
[@type='volume']=$volume-number]
  or ../../preceding-sibling::c02//did[container[@type='volume']=$volume-
number])">
    <xsl:copy-of select="$volume-heading"/>
      <tr><td width="10%" valign="top"><xsl:apply-templates
select="self::container[@type='volume']/text()"/></td><td width="10%"
valign="top"></td><td width="50%"><xsl:apply-templates select="following-
sibling::unittitle"/></td><td width="30%" valign="top"><xsl:apply-templates
select="following-sibling::unitdate/text()"/></td></tr>
</xsl:when>
<xsl:otherwise>
<!-- do nothing -->
</xsl:otherwise>
</xsl:choose>
    </xsl:when>

    <xsl:when test="@type='reel'">
    <xsl:copy-of select="$reel-heading"/>
      <tr><td valign="top"><xsl:apply-templates select="self::container
[@type='reel']/text()"/></td><td><xsl:apply-templates select="following-
sibling::unittitle"/></td></tr>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates/>
    </xsl:otherwise>
  </xsl:choose>

</xsl:for-each>

<xsl:for-each select="c03/did/container">


<xsl:variable name="box-number" select="self::container[@type='box']"/>
  <xsl:choose>
    <xsl:when test="@type='box'">
<xsl:choose>
<xsl:when test="not(../../preceding-sibling::c03/did[container[@type='box']
=$box-number]
  or ../../preceding-sibling::c03//did[container[@type='box']=$box-number])
  or ../../preceding-sibling::c03/did[container[@type='volume']]">
       <xsl:if test="./following-sibling::container[@type='folder']">
    <xsl:copy-of select="$box-and-folder-heading"/>
       </xsl:if>
       <xsl:if test= "not(./following-sibling::container[@type='folder'])">
    <xsl:copy-of select="$box-heading"/>
       </xsl:if>
      <tr><td width="10%" valign="top"><xsl:apply-templates
select="self::container[@type='box']/text()"/></td><td width="10%"
valign="top"><xsl:apply-templates select="following-sibling::container
[@type='folder']/text()"/></td>
<td width="50%"><xsl:apply-templates select="following-
sibling::unittitle"/></td><td width="30%" valign="top"><xsl:apply-templates
select="following-sibling::unitdate/text()"/></td></tr>
</xsl:when>
<xsl:otherwise>
<!-- replicate this above -->
      <tr><td width="10%" valign="top"><xsl:apply-templates
select="self::container[@type='box']/text()"/></td><td width="10%"
valign="top"><xsl:apply-templates select="following-sibling::container
[@type='folder']/text()"/></td>
<td width="50%"><xsl:apply-templates select="following-
sibling::unittitle"/></td>
<td width="30%" valign="top"><xsl:apply-templates select="following-
sibling::unitdate/text()"/></td></tr>
</xsl:otherwise>
</xsl:choose>

    </xsl:when>
    <xsl:when test="@type='folder'">
      <!--<td><xsl:apply-templates select="."/></td>-->
    </xsl:when>

    <xsl:when test="@type='volume'">
<xsl:variable name="volume-number" select="self::container
[@type='volume']"/>
<xsl:choose>
<xsl:when test="not(../../preceding-sibling::c03/did[container
[@type='volume']=$volume-number]
  or ../../preceding-sibling::c03//did[container[@type='volume']=$volume-
number])">
    <xsl:copy-of select="$volume-heading"/>
      <tr><td width="10%" valign="top"><xsl:apply-templates
select="self::container[@type='volume']/text()"/></td><td width="10%"
valign="top"></td><td width="50%"><xsl:apply-templates select="following-
sibling::unittitle"/></td><td width="30%" valign="top"><xsl:apply-templates
select="following-sibling::unitdate/text()"/></td></tr>
</xsl:when>
<xsl:otherwise>

      <tr><td width="10%" valign="top"><xsl:apply-templates
select="self::container[@type='volume']/text()"/></td><td width="10%"
valign="top"></td><td width="50%"><xsl:apply-templates select="following-
sibling::unittitle"/></td><td width="30%" valign="top"><xsl:apply-templates
select="following-sibling::unitdate/text()"/></td></tr>
</xsl:otherwise>
</xsl:choose>
    </xsl:when>

<!--Inna's edit 01/14/2002-->


    <xsl:when test="@type='reel'">
    <xsl:copy-of select="$reel-heading"/>
      <tr><td valign="top"><xsl:apply-templates select="self::container
[@type='reel']/text()"/></td><td><xsl:apply-templates select="following-
sibling::unittitle"/></td><td valign="top"><xsl:apply-templates
select="following-sibling::unitdate/text()"/></td></tr>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-templates/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:for-each>

<xsl:for-each select="unittitle">
<!--<xsl:apply-templates/>-->
</xsl:for-each>

<xsl:for-each select="unitdate">
<!--<xsl:apply-templates/>-->
</xsl:for-each>