Skip to content

Commit

Permalink
Updates to wiki templates and EAD excerpts.
Browse files Browse the repository at this point in the history
  • Loading branch information
timathom authored and timathom committed Mar 26, 2014
1 parent aea484d commit 57e5b2a
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 41 deletions.
13 changes: 9 additions & 4 deletions xsl/eac2wiki.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@
<xsl:text>| author = </xsl:text>
<xsl:text>&#10;</xsl:text>
<xsl:text>| date = </xsl:text>
<xsl:value-of select="eac:eac-cpf/eac:control/eac:sources/eac:source/eac:objectXMLWrap/ead:eadheader/ead:filedesc/ead:publicationstmt/ead:date/@normal"/>
<xsl:value-of select="eac:eac-cpf/eac:control/eac:sources/eac:source/eac:objectXMLWrap/ead:ead/ead:eadheader/ead:filedesc/ead:publicationstmt/ead:date/@normal"/>
<xsl:text>&#10;</xsl:text>
<xsl:text>| accessdate = </xsl:text>
<xsl:call-template name="tAccessDateParser">
Expand Down Expand Up @@ -717,7 +717,7 @@
<xsl:text>| author = </xsl:text>
<xsl:text>&#10;</xsl:text>
<xsl:text>| date = </xsl:text>
<xsl:value-of select="eac:eac-cpf/eac:control/eac:sources/eac:source/eac:objectXMLWrap/ead:eadheader/ead:filedesc/ead:publicationstmt/ead:date/@normal"/>
<xsl:value-of select="eac:eac-cpf/eac:control/eac:sources/eac:source/eac:objectXMLWrap/ead:ead/ead:eadheader/ead:filedesc/ead:publicationstmt/ead:date/@normal"/>
<xsl:text>&#10;</xsl:text>
<xsl:text>| accessdate = </xsl:text>
<xsl:call-template name="tAccessDateParser">
Expand Down Expand Up @@ -790,8 +790,13 @@
<xsl:text>| url = </xsl:text>
<xsl:value-of select="normalize-space(@xlink:href)" />
<xsl:text>&#10;</xsl:text>
<xsl:text>| date = </xsl:text>
<xsl:value-of select="normalize-space(eac:objectXMLWrap/ead:eadheader/ead:profiledesc/ead:creation/ead:date)"/>
<xsl:text>| date = </xsl:text>
<xsl:for-each select="eac:objectXMLWrap/ead:ead/ead:archdesc/ead:descgrp/ead:processinfo/ead:p">
<xsl:value-of select="normalize-space(translate(.,concat($vAlpha,$vPunct2),''))"/>
<xsl:if test="position()!=last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:text>&#10;</xsl:text>
<xsl:value-of select="$pFindingAidInfo" />
<xsl:text>| accessdate = </xsl:text>
Expand Down
119 changes: 82 additions & 37 deletions xsl/ead2eac.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -456,28 +456,51 @@
<xsl:value-of select="normalize-space(.)" />
</sourceEntry>
<objectXMLWrap>
<eadheader xmlns="urn:isbn:1-931666-22-9">
<xsl:copy-of select="../../../ead:eadid" />
<filedesc>
<xsl:copy-of select="parent::ead:titlestmt" />
<xsl:choose>
<xsl:when test="contains(../../../../ead:archdesc/ead:did/ead:note,'Creative Commons Attribution-Sharealike 3.0')">
<publicationstmt>
<xsl:for-each select="../../../../ead:archdesc/ead:did/ead:note/ead:p">
<p>
<xsl:value-of select="normalize-space(.)" />
</p>
</xsl:for-each>
</publicationstmt>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="parent::ead:titlestmt/following-sibling::ead:publicationstmt"/>
</xsl:otherwise>
</xsl:choose>
</filedesc>
<xsl:copy-of select="../../../ead:profiledesc" />
<xsl:copy-of select="../../../ead:revisiondesc" />
</eadheader>
<ead audience="external" xmlns="urn:isbn:1-931666-22-9" xmlns:xlink="http://www.w3.org/1999/xlink">
<eadheader>
<xsl:copy-of select="../../../ead:eadid" />
<filedesc>
<xsl:copy-of select="parent::ead:titlestmt" />
<xsl:copy-of select="parent::ead:titlestmt/following-sibling::ead:publicationstmt"/>
</filedesc>
<xsl:copy-of select="../../../ead:profiledesc" />
<xsl:copy-of select="../../../ead:revisiondesc" />
</eadheader>
<archdesc>
<xsl:if test="../../../../ead:archdesc/@level">
<xsl:attribute name="level">
<xsl:value-of select="../../../../ead:archdesc/@level"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="../../../../ead:archdesc/@type">
<xsl:attribute name="type">
<xsl:value-of select="../../../../ead:archdesc/@type"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="../../../../ead:archdesc/@audience">
<xsl:attribute name="audience">
<xsl:value-of select="../../../../ead:archdesc/@audience"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="../../../../ead:archdesc/@relatedencoding">
<xsl:attribute name="relatedencoding">
<xsl:value-of select="../../../../ead:archdesc/@relatedencoding"/>
</xsl:attribute>
</xsl:if>
<did>
<xsl:choose>
<xsl:when test="../../../../ead:archdesc/ead:did/ead:note[@encodinganalog='500']">
<xsl:copy-of select="../../../../ead:archdesc/ead:did/ead:note[@encodinganalog='500']"/>
<xsl:copy-of select="../../../../ead:archdesc/ead:did/ead:langmaterial"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="../../../../ead:archdesc/ead:did/ead:langmaterial"/>
</xsl:otherwise>
</xsl:choose>
</did>
<xsl:copy-of select="../../../../ead:archdesc/ead:descgrp"/>
</archdesc>
</ead>
</objectXMLWrap>
</source>
</xsl:for-each>
Expand Down Expand Up @@ -1400,31 +1423,53 @@
</xsl:if>
</relationEntry>
<objectXMLWrap>
<xsl:element name="archdesc" namespace="urn:isbn:1-931666-22-9">
<xsl:copy-of select="parent::ead:did/ead:head" />
<xsl:copy-of select="." />
<xsl:copy-of select="parent::ead:did/ead:unitid" />
<xsl:element name="origination" namespace="urn:isbn:1-931666-22-9">
<xsl:attribute name="label">
<xsl:value-of select="parent::ead:did/ead:origination/@label" />
<archdesc xmlns="urn:isbn:1-931666-22-9">
<xsl:if test="../../../ead:archdesc/@level">
<xsl:attribute name="level">
<xsl:value-of select="../../../ead:archdesc/@level"/>
</xsl:attribute>
<xsl:attribute name="encodinganalog">
<xsl:value-of select="parent::ead:did/ead:origination/@encodinganalog" />
</xsl:if>
<xsl:if test="../../../ead:archdesc/@type">
<xsl:attribute name="type">
<xsl:value-of select="../../../ead:archdesc/@type"/>
</xsl:attribute>
<xsl:for-each select="parent::ead:did/ead:origination/child::node()[not(local-name()='name')]">
</xsl:if>
<xsl:if test="../../../ead:archdesc/@audience">
<xsl:attribute name="audience">
<xsl:value-of select="../../../ead:archdesc/@audience"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="../../../ead:archdesc/@relatedencoding">
<xsl:attribute name="relatedencoding">
<xsl:value-of select="../../../ead:archdesc/@relatedencoding"/>
</xsl:attribute>
</xsl:if>
<did>
<xsl:copy-of select="parent::ead:did/ead:head" />
<xsl:copy-of select="." />
<xsl:copy-of select="parent::ead:did/ead:unitid" />
<xsl:element name="origination" namespace="urn:isbn:1-931666-22-9">
<xsl:attribute name="label">
<xsl:value-of select="parent::ead:did/ead:origination/@label" />
</xsl:attribute>
<xsl:attribute name="encodinganalog">
<xsl:value-of select="parent::ead:did/ead:origination/@encodinganalog" />
</xsl:attribute>
<xsl:for-each select="parent::ead:did/ead:origination/child::node()[not(local-name()='name')]">
<xsl:copy-of select="." />
</xsl:for-each>
</xsl:element>
<xsl:for-each select="parent::ead:did/ead:origination/following-sibling::node()">
<xsl:copy-of select="." />
</xsl:for-each>
</xsl:element>
<xsl:for-each select="parent::ead:did/ead:origination/following-sibling::node()">
<xsl:copy-of select="." />
</xsl:for-each>
</did>
<!-- Include Scope and Contents. -->
<xsl:if test="../../ead:scopecontent">
<xsl:if test=". != ' ' ">
<xsl:copy-of select="../../ead:scopecontent" />
</xsl:if>
</xsl:if>
</xsl:element>
</archdesc>
</objectXMLWrap>
</resourceRelation>
</xsl:for-each>
Expand Down

0 comments on commit 57e5b2a

Please sign in to comment.