|
<!-- |
|
The following XSL lives in a top-level theme xsl file. |
|
This block of code controls all of loose integrations that we have embedded in our custom themes. |
|
|
|
Since our work with IIIF is still evolving, we offer a number of mechanisms for linking a IIIF manifest into DSpace |
|
- Add the manifest file as a specially named item bitstream ("IIIF Manifest") |
|
- Link a manifest to an item in dc.relation.uri |
|
- Link a manifest file to a collection page with special markup in dc.description.tableofcontents |
|
|
|
We expect to eventually standardize the integration on a smaller set of options. |
|
--> |
|
<xsl:template name="summaryHeaderDetail"> |
|
<xsl:choose> |
|
<xsl:when test="dim:field[@element='relation' and @qualifier='uri'][contains(.,'findingaids.library.georgetown.edu')]"> |
|
<xsl:call-template name="summaryHeaderFindingAid"/> |
|
</xsl:when> |
|
<xsl:when test="dim:field[@element='relation' and @qualifier='uri'][contains(.,'//archive.org/')]"> |
|
<xsl:call-template name="summaryHeaderInternetArchive"/> |
|
</xsl:when> |
|
<xsl:when test="dim:field[@element='relation' and @qualifier='uri'] and dim:field[@element='type'][contains(.,'external resource')]"> |
|
<xsl:call-template name="summaryExternalFindingAid"/> |
|
</xsl:when> |
|
<xsl:when test="dim:field[@element='relation' and @qualifier='uri'][contains(.,'mediapilot')]"> |
|
<xsl:call-template name="summaryHeaderSharestream"/> |
|
</xsl:when> |
|
<xsl:when test="dim:field[@element='relation' and @qualifier='uri'][starts-with(.,'IIIF:')]"> |
|
<xsl:call-template name="createIIIFManifest"> |
|
<xsl:with-param name="manifest" select="dim:field[@element='relation' and @qualifier='uri']"/> |
|
</xsl:call-template> |
|
</xsl:when> |
|
<xsl:when test="dim:field[@element='relation' and @qualifier='uri'][starts-with(.,'IIIF-ND:')]"> |
|
<xsl:call-template name="createIIIFManifest"> |
|
<xsl:with-param name="manifest" select="dim:field[@element='relation' and @qualifier='uri']"/> |
|
<xsl:with-param name="config">config.no-download.json</xsl:with-param> |
|
</xsl:call-template> |
|
</xsl:when> |
|
<xsl:when test="//mets:fileSec/mets:fileGrp[@USE='METADATA']/mets:file/mets:FLocat[@xlink:label='IIIF Manifest']"> |
|
<xsl:call-template name="createIIIFManifest"> |
|
<xsl:with-param name="manifest" select="$EXTMETS//mets:fileSec/mets:fileGrp[@USE='METADATA']/mets:file/mets:FLocat[@xlink:label='IIIF Manifest']/@xlink:href"/> |
|
</xsl:call-template> |
|
</xsl:when> |
|
</xsl:choose> |
|
</xsl:template> |
|
|
|
<xsl:template name="createIIIFManifest"> |
|
<xsl:param name="manifest"/> |
|
<xsl:param name="config">config.json</xsl:param> |
|
|
|
<xsl:variable name="manifesturl"> |
|
<xsl:choose> |
|
<xsl:when test="starts-with($manifest,'IIIF:http')"> |
|
<xsl:value-of select="substring($manifest, 6, string-length($manifest) - 5)"/> |
|
</xsl:when> |
|
<xsl:when test="starts-with($manifest,'IIIF-ND:http')"> |
|
<xsl:value-of select="substring($manifest, 9, string-length($manifest) - 8)"/> |
|
</xsl:when> |
|
<xsl:otherwise> |
|
<xsl:value-of select="$manifest"/> |
|
</xsl:otherwise> |
|
</xsl:choose> |
|
</xsl:variable> |
|
|
|
<xsl:if test="$manifesturl!=''"> |
|
<div class="row"> |
|
<div class="col-sm-12"> |
|
<div class="uvgu"> |
|
<div |
|
class="uv" |
|
data-locale="en-GB:English (GB),cy-GB:Cymraeg" |
|
data-collectionindex="0" |
|
data-manifestindex="0" |
|
data-sequenceindex="0" |
|
data-canvasindex="0" |
|
data-rotation="0" |
|
style="height:520px;background-color: #000"> |
|
<xsl:attribute name="data-uri"> |
|
<xsl:value-of select="$manifesturl"/> |
|
</xsl:attribute> |
|
<xsl:attribute name="data-config"> |
|
<xsl:value-of select="concat('/uv/config/',$config)"/> |
|
</xsl:attribute> |
|
</div> |
|
<script type="text/javascript" id="embedUV" src="/uv/lib/embed.js"> |
|
</script> |
|
<script type="text/javascript">/* wordpress fix */</script> |
|
</div> |
|
<div class="iiiflogo"> |
|
<xsl:variable name="manifestfile" select="substring-after($manifesturl,'/manifests/')"/> |
|
<a title="You may drag this icon into any IIIF compliant viewer"> |
|
<xsl:attribute name="href"> |
|
<xsl:value-of select="concat('?manifest=', $manifesturl)"/> |
|
</xsl:attribute> |
|
<img class="iiiflogo" src="/static/images/iiif.png" alt="IIIF Drag-n-drop"/> |
|
</a> |
|
</div> |
|
</div> |
|
</div> |
|
</xsl:if> |
|
</xsl:template> |
|
|
Thanks for sharing this. The link in, "This image gallery makes use of the IIIF (Internation Image Interoperability Framework) API's" doesn't work.