Adjust XSLT output transformation

This commit is contained in:
Sebastian Meyer 2017-10-12 12:38:45 +02:00
parent 0b63eb69bf
commit 5a23be1135
1 changed files with 410 additions and 353 deletions

View File

@ -1,446 +1,503 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
* Simple OAI-PMH 2.0 Data Provider * Simple OAI-PMH 2.0 Data Provider
* Copyright (C) 2006 Christopher Gutteridge <cjg@ecs.soton.ac.uk> * Copyright (C) 2006 Christopher Gutteridge <cjg@ecs.soton.ac.uk>
* Copyright (C) 2017 Sebastian Meyer <sebastian.meyer@opencultureconsulting.com> * Copyright (C) 2017 Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:oai="http://www.openarchives.org/OAI/2.0/"> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:oai="http://www.openarchives.org/OAI/2.0/">
<xsl:output method="html" /> <xsl:output method="html" />
<xsl:template name="style"> <xsl:template name="style">
td.value { * {
vertical-align: top; font-family: "Lucida Sans Unicode", sans-serif;
padding-left: 1em; }
padding: 3px; body {
} margin: 1em 2em 1em 2em;
td.key { }
background-color: #e0e0ff; h1,
padding: 3px; h2,
text-align: right; h3,
border: 1px solid #c0c0c0; h4 {
white-space: nowrap; clear: left;
font-weight: bold; }
vertical-align: top; h1 {
} padding-bottom: 4px;
.dcdata td.key { margin-bottom: 0px;
background-color: #ffffe0; }
} h2 {
body { margin-bottom: 0.5em;
margin: 1em 2em 1em 2em; }
} h3 {
h1, margin-bottom: 0.3em;
h2, font-size: medium;
h3 { }
font-family: sans-serif; h4 {
clear: left; margin-bottom: 0.2em;
} font-size: small;
h1 { }
padding-bottom: 4px; table {
margin-bottom: 0px; margin-top: 10px;
} }
h2 { td.key {
margin-bottom: 0.5em; background-color: #e0e0ff;
} padding: 3px;
h3 { text-align: right;
margin-bottom: 0.3em; border: 1px solid #c0c0c0;
font-size: medium; white-space: nowrap;
} vertical-align: top;
.link { }
border: 1px outset #88f; td.value {
background-color: #c0c0ff; vertical-align: center;
padding: 1px 4px 1px 4px; padding-left: 1em;
font-size: 80%; padding: 3px;
text-decoration: none; }
font-weight: bold; .link {
font-family: sans-serif; border: 1px outset #88f;
color: black; background-color: #c0c0ff;
} padding: 1px 4px;
.link:hover { font-size: 80%;
color: red; text-decoration: none;
} color: black;
.link:active { }
color: red; .link:hover {
border: 1px inset #88f; color: gray;
background-color: #a0a0df; }
} .link:active {
.oaiRecord, color: red;
.oaiRecordTitle { border: 1px inset #88f;
background-color: #f0f0ff; background-color: #a0a0df;
border-style: solid; }
border-color: #d0d0d0; .results {
} margin-bottom: 1.5em;
h2.oaiRecordTitle { }
background-color: #e0e0ff; div.quicklinks {
font-size: medium; border-bottom: 2px solid #ccc;
font-weight: bold; border-top: 2px solid #ccc;
padding: 10px; }
border-width: 2px 2px 0px 2px; ul {
margin: 0px; margin: 2px 0;
} padding: 4px;
.oaiRecord { text-align: left;
margin-bottom: 3em; clear: left;
border-width: 2px; }
padding: 10px; ul li {
} font-size: 80%;
display: inline;
list-style: none;
}
ol {
padding: 0;
}
ol>li {
list-style: none;
padding: 0 5px 5px;
margin: 0 0 1em;
border: 1px solid #c0c0c0;
}
p {
margin: 0;
padding: 5px;
}
p.info {
font-size: 80%;
}
.xmlSource {
font-size: 70%;
border: solid #c0c0a0 1px;
background-color: #ffffe0;
padding: 2em 2em 2em 0;
}
.xmlBlock {
padding-left: 2em;
}
.xmlTagName {
color: #800000;
font-weight: bold;
}
.xmlAttrName {
font-weight: bold;
}
.xmlAttrValue {
color: #0000c0;
}
</xsl:template>
.results { <xsl:variable name='verb' select="/oai:OAI-PMH/oai:request/@verb"/>
margin-bottom: 1.5em; <xsl:variable name='metadataPrefix' select="/oai:OAI-PMH/oai:request/@metadataPrefix"/>
} <xsl:variable name='identifier' select="/oai:OAI-PMH/oai:request/@identifier"/>
ul.quicklinks { <xsl:variable name='from' select="/oai:OAI-PMH/oai:request/@from"/>
margin-top: 2px; <xsl:variable name='until' select="/oai:OAI-PMH/oai:request/@until"/>
padding: 4px;
text-align: left;
border-bottom: 2px solid #ccc;
border-top: 2px solid #ccc;
clear: left;
}
ul.quicklinks li {
font-size: 80%;
display: inline;
list-style: none;
font-family: sans-serif;
}
p.intro {
font-size: 80%;
}
<xsl:call-template name='xmlstyle' />
</xsl:template>
<xsl:template name="xmlstyle"> <xsl:template match="/">
.xmlSource { <html>
font-size: 70%; <head>
border: solid #c0c0a0 1px; <title>OAI-PMH 2.0 Request Results</title>
background-color: #ffffe0; <style><xsl:call-template name="style"/></style>
padding: 2em 2em 2em 0em; </head>
} <body>
.xmlBlock { <h1>OAI-PMH 2.0 Request Results</h1>
padding-left: 2em; <xsl:call-template name="quicklinks"/>
} <xsl:apply-templates select="/oai:OAI-PMH"/>
.xmlTagName { <xsl:call-template name="quicklinks"/>
color: #800000; <p class="info">You are viewing an HTML version of the XML OAI-PMH response. To see the underlying XML as it appears to any OAI-PMH harvester use your web browser's <em>view source</em> option or disable XSLT processing.</p>
font-weight: bold; <p class="info">This XSL script was originally written by Christopher Gutteridge at <a href="https://www.southampton.ac.uk/">University of Southampton</a> for the <a href="http://www.eprints.org/">EPrints</a> project and was later adapted by Sebastian Meyer at <a href="http://www.opencultureconsulting.com/">Open Culture Consulting</a> to be more generally applicable to other OAI-PMH interfaces. It is available on <a href="https://github.com/opencultureconsulting/oai_pmh">GitHub</a> for free!</p>
} </body>
.xmlAttrName { </html>
font-weight: bold; </xsl:template>
}
.xmlAttrValue {
color: #0000c0;
}
</xsl:template>
<xsl:variable name='identifier' select="/oai:OAI-PMH/oai:request/@identifier" /> <xsl:template name="quicklinks">
<div class="quicklinks">
<ul>
<li>&#187; <a class="link" href="?verb=Identify">Identify</a></li>
<li>&#187; <a class="link" href="?verb=ListMetadataFormats">ListMetadataFormats</a></li>
<xsl:if test="$identifier">
<li>&#187; <a class="link" href="?verb=ListMetadataFormats&amp;identifier={$identifier}">ListMetadataFormats (<em><xsl:value-of select="$identifier"/></em>)</a></li>
</xsl:if>
<xsl:if test="$metadataPrefix">
<li>&#187; <a class="link" href="?verb=ListIdentifiers&amp;metadataPrefix={$metadataPrefix}">ListIdentifiers (<em><xsl:value-of select="$metadataPrefix"/></em>)</a></li>
<li>&#187; <a class="link" href="?verb=ListRecords&amp;metadataPrefix={$metadataPrefix}">ListRecords (<em><xsl:value-of select="$metadataPrefix"/></em>)</a></li>
<xsl:if test="$identifier">
<li>&#187; <a class="link" href="?verb=GetRecord&amp;metadataPrefix={$metadataPrefix}&amp;identifier={$identifier}">GetRecord (<em><xsl:value-of select="$identifier"/></em> in <em><xsl:value-of select="$metadataPrefix"/></em>)</a></li>
</xsl:if>
</xsl:if>
</ul>
</div>
</xsl:template>
<xsl:template match="/"> <xsl:template match="/oai:OAI-PMH">
<html> <table class="values">
<head> <tr><td class="key">Datestamp of Response</td>
<title>OAI-PMH 2.0 Request Results</title> <td class="value"><xsl:value-of select="oai:responseDate"/></td></tr>
<style><xsl:call-template name="style"/></style> <tr><td class="key">Request URL</td>
</head> <td class="value"><xsl:value-of select="oai:request"/></td></tr>
<body> <tr><td class="key">Request Parameters</td>
<h1>OAI-PMH 2.0 Request Results</h1> <td class="value">
<xsl:call-template name="quicklinks"/> <xsl:if test="$verb">verb = <em><xsl:value-of select="$verb"/></em><br/></xsl:if>
<p class="intro">You are viewing an HTML version of the XML OAI response. To see the underlying XML as it appears to any OAI harvester use your web browser's view source option or disable XSLT processing.</p> <xsl:if test="$metadataPrefix">metadataPrefix = <em><xsl:value-of select="$metadataPrefix"/></em><br/></xsl:if>
<xsl:apply-templates select="/oai:OAI-PMH" /> <xsl:if test="$identifier">identifier = <em><xsl:value-of select="$identifier"/></em><br/></xsl:if>
<xsl:call-template name="quicklinks"/> <xsl:if test="$from">from = <em><xsl:value-of select="$from"/></em><br/></xsl:if>
</body> <xsl:if test="$until">until = <em><xsl:value-of select="$until"/></em><br/></xsl:if>
</html> </td></tr>
</xsl:template> </table>
<xsl:choose>
<xsl:when test="oai:error">
<h2>Error</h2>
<p>The request could not be completed due to the following error.</p>
<div class="results">
<xsl:apply-templates select="oai:error"/>
</div>
</xsl:when>
<xsl:otherwise>
<h2><xsl:value-of select="$verb"/></h2>
<p>The request was completed with the following results.</p>
<div class="results">
<xsl:apply-templates select="oai:Identify" />
<xsl:apply-templates select="oai:ListMetadataFormats"/>
<xsl:apply-templates select="oai:ListIdentifiers"/>
<xsl:apply-templates select="oai:ListRecords"/>
<xsl:apply-templates select="oai:GetRecord"/>
</div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="quicklinks"> <!--
<ul class="quicklinks"> Error
<li><a href="?verb=Identify">Identify</a> or </li>
<li><a href="?verb=ListMetadataFormats">ListMetadataFormats</a></li>
</ul>
</xsl:template>
<xsl:template match="/oai:OAI-PMH">
<table class="values">
<tr><td class="key">Datestamp of Response</td>
<td class="value"><xsl:value-of select="oai:responseDate"/></td></tr>
<tr><td class="key">Request URL</td>
<td class="value"><xsl:value-of select="oai:request"/></td></tr>
</table>
<xsl:choose>
<xsl:when test="oai:error">
<h2>OAI Error</h2>
<p>The request could not be completed due to the following error.</p>
<div class="results">
<xsl:apply-templates select="oai:error"/>
</div>
</xsl:when>
<xsl:otherwise>
<p>Request was of type <xsl:value-of select="oai:request/@verb"/>.</p>
<div class="results">
<xsl:apply-templates select="oai:Identify" />
<xsl:apply-templates select="oai:GetRecord"/>
<xsl:apply-templates select="oai:ListRecords"/>
<xsl:apply-templates select="oai:ListMetadataFormats"/>
<xsl:apply-templates select="oai:ListIdentifiers"/>
</div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!--
Error
--> -->
<xsl:template match="/oai:OAI-PMH/oai:error"> <xsl:template match="oai:error">
<table class="values"> <table class="values">
<tr><td class="key">Error Code</td> <tr><td class="key">Error Code</td>
<td class="value"><xsl:value-of select="@code"/></td></tr> <td class="value"><xsl:value-of select="@code"/></td></tr>
</table> </table>
<p class="error"><xsl:value-of select="." /></p> <p class="error"><xsl:value-of select="."/></p>
</xsl:template> </xsl:template>
<!-- <!--
Identify Identify
--> -->
<xsl:template match="/oai:OAI-PMH/oai:Identify"> <xsl:template match="oai:Identify">
<h2>Repository</h2> <ol>
<table class="values"> <li>
<tr><td class="key">Name</td> <h3>Repository Identification</h3>
<td class="value"><xsl:value-of select="oai:repositoryName"/></td></tr> <table class="values">
<tr><td class="key">Base URL</td> <tr><td class="key">Name</td>
<td class="value"><xsl:value-of select="oai:baseURL"/></td></tr> <td class="value"><xsl:value-of select="oai:repositoryName"/></td></tr>
<tr><td class="key">Protocol Version</td> <tr><td class="key">Base URL</td>
<td class="value"><xsl:value-of select="oai:protocolVersion"/></td></tr> <td class="value"><a href="{oai:baseURL}"><xsl:value-of select="oai:baseURL"/></a></td></tr>
<tr><td class="key">Earliest Datestamp</td> <tr><td class="key">Protocol Version</td>
<td class="value"><xsl:value-of select="oai:earliestDatestamp"/></td></tr> <td class="value"><xsl:value-of select="oai:protocolVersion"/></td></tr>
<tr><td class="key">Deleted Record Policy</td> <tr><td class="key">Earliest Datestamp</td>
<td class="value"><xsl:value-of select="oai:deletedRecord"/></td></tr> <td class="value"><xsl:value-of select="oai:earliestDatestamp"/></td></tr>
<tr><td class="key">Granularity</td> <tr><td class="key">Deleted Record Policy</td>
<td class="value"><xsl:value-of select="oai:granularity"/></td></tr> <td class="value"><xsl:value-of select="oai:deletedRecord"/></td></tr>
<xsl:apply-templates select="oai:adminEmail"/> <tr><td class="key">Granularity</td>
</table> <td class="value"><xsl:value-of select="oai:granularity"/></td></tr>
</xsl:template> <tr><td class="key">Administrative Email</td>
<td class="value"><a href="mailto:{oai:adminEmail}"><xsl:value-of select="oai:adminEmail"/></a></td></tr>
<xsl:template match="/oai:OAI-PMH/oai:Identify/oai:adminEmail"> </table>
<tr><td class="key">Admin Email</td> </li>
<td class="value"><a href="mailto:{.}"><xsl:value-of select="."/></a></td></tr> </ol>
</xsl:template> </xsl:template>
<!-- <!--
GetRecord ListMetadataFormats
-->
<xsl:template match="oai:GetRecord">
<xsl:apply-templates select="oai:record" />
</xsl:template>
<!--
ListRecords
-->
<xsl:template match="oai:ListRecords">
<xsl:apply-templates select="oai:record" />
<xsl:apply-templates select="oai:resumptionToken" />
</xsl:template>
<!--
ListIdentifiers
-->
<xsl:template match="oai:ListIdentifiers">
<xsl:apply-templates select="oai:record" />
<xsl:apply-templates select="oai:resumptionToken" />
</xsl:template>
<!--
ListMetadataFormats
--> -->
<xsl:template match="oai:ListMetadataFormats"> <xsl:template match="oai:ListMetadataFormats">
<xsl:choose> <xsl:choose>
<xsl:when test="$identifier"> <xsl:when test="$identifier">
<p>This is a list of metadata formats available for the record "<xsl:value-of select='$identifier' />". Use these links to view the metadata: <xsl:apply-templates select="oai:metadataFormat/oai:metadataPrefix" /></p> <p class="info">This is a list of metadata formats available for the record <em><xsl:value-of select="$identifier"/></em>.</p>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<p>This is a list of metadata formats available from this repository. Click on a format's prefix to get all available records' identifiers.</p> <p class="info">This is a list of metadata formats available from this repository.</p>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
<xsl:apply-templates select="oai:metadataFormat" /> <ol>
<xsl:apply-templates select="oai:metadataFormat"/>
</ol>
</xsl:template> </xsl:template>
<!-- <!--
Metadata Format Details Metadata Format Details
--> -->
<xsl:template match="oai:metadataFormat"> <xsl:template match="oai:metadataFormat">
<h2>Metadata Format</h2> <li>
<table class="values"> <h3>Metadata Format <em><xsl:value-of select="oai:metadataPrefix"/></em></h3>
<tr><td class="key">Prefix</td> <ul>
<td class="value"><a class="link" href="?verb=ListIdentifiers&amp;metadataPrefix={oai:metadataPrefix}"><xsl:value-of select="oai:metadataPrefix"/></a></td></tr> <li>&#187; <a class="link" href="?verb=ListIdentifiers&amp;metadataPrefix={oai:metadataPrefix}">ListIdentifiers</a></li>
<tr><td class="key">Namespace</td> <li>&#187; <a class="link" href="?verb=ListRecords&amp;metadataPrefix={oai:metadataPrefix}">ListRecords</a></li>
<td class="value"><xsl:value-of select="oai:metadataNamespace"/></td></tr> <xsl:if test="$identifier"><li>&#187; <a class="link" href="?verb=GetRecord&amp;metadataPrefix={oai:metadataPrefix}&amp;identifier={$identifier}">GetRecord</a></li></xsl:if>
<tr><td class="key">Schema</td> </ul>
<td class="value"><a href="{oai:schema}"><xsl:value-of select="oai:schema"/></a></td></tr> <table class="values">
</table> <tr><td class="key">Prefix</td>
</xsl:template> <td class="value"><xsl:value-of select="oai:metadataPrefix"/></td></tr>
<tr><td class="key">Namespace</td>
<xsl:template match="oai:metadataPrefix"> <td class="value"><xsl:value-of select="oai:metadataNamespace"/></td></tr>
<xsl:text> </xsl:text><a class="link" href="?verb=GetRecord&amp;metadataPrefix={.}&amp;identifier={$identifier}"><xsl:value-of select='.' /></a> <tr><td class="key">Schema</td>
<td class="value"><a href="{oai:schema}"><xsl:value-of select="oai:schema"/></a></td></tr>
</table>
</li>
</xsl:template> </xsl:template>
<!-- <!--
Record Details ListIdentifiers
--> -->
<xsl:template match="oai:record"> <xsl:template match="oai:ListIdentifiers">
<h2 class="oaiRecordTitle">OAI Record: <xsl:value-of select="oai:header/oai:identifier"/></h2> <p class="info">This is a list of records' identifiers available for the metadata format <em><xsl:value-of select="$metadataPrefix"/></em>.</p>
<div class="oaiRecord"> <ol>
<xsl:apply-templates select="oai:header" /> <xsl:apply-templates select="oai:header" />
<xsl:apply-templates select="oai:metadata" /> </ol>
</div> <xsl:apply-templates select="oai:resumptionToken" />
</xsl:template> </xsl:template>
<xsl:template match="oai:header"> <xsl:template match="oai:ListIdentifiers/oai:header">
<h3>OAI Record Header</h3> <li>
<table class="values"> <h3>Record Header <em><xsl:value-of select="oai:identifier"/></em></h3>
<tr><td class="key">OAI Identifier</td> <ul>
<td class="value"> <li>&#187; <a class="link" href="?verb=ListMetadataFormats&amp;identifier={oai:identifier}">ListMetadataFormats</a></li>
<xsl:value-of select="oai:identifier"/> <li>&#187; <a class="link" href="?verb=GetRecord&amp;metadataPrefix={$metadataPrefix}&amp;identifier={oai:identifier}">GetRecord</a></li>
<xsl:text> </xsl:text><a class="link" href="?verb=ListMetadataFormats&amp;identifier={oai:identifier}">available formats</a> </ul>
</td></tr> <table class="values">
<tr><td class="key">Datestamp</td> <tr><td class="key">Identifier</td>
<td class="value"><xsl:value-of select="oai:datestamp"/></td></tr> <td class="value"><xsl:value-of select="oai:identifier"/></td></tr>
</table> <tr><td class="key">Datestamp</td>
<xsl:if test="@status='deleted'"> <td class="value"><xsl:value-of select="oai:datestamp"/></td></tr>
<p>This record has been deleted.</p> <tr><td class="key">Deleted</td>
</xsl:if> <td class="value">
<xsl:choose>
<xsl:when test="@status = 'deleted'">yes</xsl:when>
<xsl:otherwise>no</xsl:otherwise>
</xsl:choose>
</td></tr>
</table>
</li>
</xsl:template>
<!--
ListRecords
-->
<xsl:template match="oai:ListRecords">
<p class="info">This is a list of records available for the metadata format <em><xsl:value-of select="$metadataPrefix"/></em>.</p>
<ol>
<xsl:apply-templates select="oai:record" />
</ol>
<xsl:apply-templates select="oai:resumptionToken" />
</xsl:template>
<!--
GetRecord
-->
<xsl:template match="oai:GetRecord">
<p class="info">This is the record <em><xsl:value-of select="$identifier"/></em> in the metadata format <em><xsl:value-of select="$metadataPrefix"/></em>.</p>
<ol>
<xsl:apply-templates select="oai:record" />
</ol>
</xsl:template>
<!--
Record Details
-->
<xsl:template match="oai:record">
<li>
<xsl:apply-templates select="oai:header" />
<xsl:apply-templates select="oai:metadata" />
</li>
</xsl:template>
<xsl:template match="oai:record/oai:header">
<h3>Record <em><xsl:value-of select="oai:identifier"/></em></h3>
<ul>
<li>&#187; <a class="link" href="?verb=ListMetadataFormats&amp;identifier={oai:identifier}">ListMetadataFormats</a></li>
<xsl:if test="$verb != 'GetRecord'"><li>&#187; <a class="link" href="?verb=GetRecord&amp;metadataPrefix={$metadataPrefix}&amp;identifier={oai:identifier}">GetRecord</a></li></xsl:if>
</ul>
<table class="values">
<tr><td class="key">Identifier</td>
<td class="value"><xsl:value-of select="oai:identifier"/></td></tr>
<tr><td class="key">Datestamp</td>
<td class="value"><xsl:value-of select="oai:datestamp"/></td></tr>
</table>
<xsl:if test="@status = 'deleted'"><h4>This record has been deleted.</h4></xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="oai:metadata"> <xsl:template match="oai:metadata">
&#160; <xsl:apply-templates select="*" />
<div class="metadata">
<xsl:apply-templates select="*" />
</div>
</xsl:template> </xsl:template>
<!-- <!--
Resumption Token Resumption Token
--> -->
<xsl:template match="oai:resumptionToken"> <xsl:template match="oai:resumptionToken">
<p>There are more results.</p> <p>There are more results.</p>
<table class="values"> <ul>
<tr><td class="key">Submitted Records</td> <li>&#187; <a class="link" href="?verb={$verb}&amp;resumptionToken={.}">Resume</a></li>
<td class="value"><xsl:value-of select="@cursor"/></td></tr> </ul>
<tr><td class="key">Total Records</td> <table class="values">
<td class="value"><xsl:value-of select="@completeListSize"/></td></tr> <tr><td class="key">Submitted Records</td>
<tr><td class="key">Expiration Datestamp</td> <td class="value"><xsl:value-of select="@cursor"/></td></tr>
<td class="value"><xsl:value-of select="@expirationDate"/></td></tr> <tr><td class="key">Total Records</td>
<tr><td class="key">Resumption Token</td> <td class="value"><xsl:value-of select="@completeListSize"/></td></tr>
<td class="value"><xsl:value-of select="."/> <tr><td class="key">Expiration Datestamp</td>
<xsl:text> </xsl:text> <td class="value"><xsl:value-of select="@expirationDate"/></td></tr>
<a class="link" href="?verb={/oai:OAI-PMH/oai:request/@verb}&amp;resumptionToken={.}">Resume</a></td></tr> <tr><td class="key">Resumption Token</td>
</table> <td class="value"><xsl:value-of select="."/></td></tr>
</table>
</xsl:template> </xsl:template>
<!-- <!--
Unknown Metadata Unknown Metadata
--> -->
<xsl:template match="oai:metadata/*" priority='-100'> <xsl:template match="oai:metadata/*" priority='-100'>
<h3>Unknown Metadata Format</h3> <h4>Metadata Format <em><xsl:value-of select="$metadataPrefix"/></em></h4>
<div class="xmlSource"> <div class="xmlSource">
<xsl:apply-templates select="." mode='xmlMarkup' /> <xsl:apply-templates select="." mode='xmlMarkup' />
</div> </div>
</xsl:template> </xsl:template>
<!-- <!--
DublinCore Metadata DublinCore Metadata
--> -->
<xsl:template match="oai_dc:dc" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" > <xsl:template match="oai_dc:dc" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/">
<div class="dcdata"> <h4>Metadata Format <em>DublinCore</em></h4>
<h3>DublinCore Metadata</h3> <table>
<table class="dcdata"> <xsl:apply-templates select="*" />
<xsl:apply-templates select="*" /> </table>
</table>
</div>
</xsl:template> </xsl:template>
<xsl:template match="dc:title" xmlns:dc="http://purl.org/dc/elements/1.1/"> <xsl:template match="dc:title" xmlns:dc="http://purl.org/dc/elements/1.1/">
<tr><td class="key">Title</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> <tr><td class="key">Title</td><td class="value"><xsl:value-of select="."/></td></tr>
</xsl:template>
<xsl:template match="dc:creator" xmlns:dc="http://purl.org/dc/elements/1.1/"> <xsl:template match="dc:creator" xmlns:dc="http://purl.org/dc/elements/1.1/">
<tr><td class="key">Author or Creator</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> <tr><td class="key">Author or Creator</td><td class="value"><xsl:value-of select="."/></td></tr>
</xsl:template>
<xsl:template match="dc:subject" xmlns:dc="http://purl.org/dc/elements/1.1/"> <xsl:template match="dc:subject" xmlns:dc="http://purl.org/dc/elements/1.1/">
<tr><td class="key">Subject and Keywords</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> <tr><td class="key">Subject and Keywords</td><td class="value"><xsl:value-of select="."/></td></tr>
</xsl:template>
<xsl:template match="dc:description" xmlns:dc="http://purl.org/dc/elements/1.1/"> <xsl:template match="dc:description" xmlns:dc="http://purl.org/dc/elements/1.1/">
<tr><td class="key">Description</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> <tr><td class="key">Description</td><td class="value"><xsl:value-of select="."/></td></tr>
</xsl:template>
<xsl:template match="dc:publisher" xmlns:dc="http://purl.org/dc/elements/1.1/"> <xsl:template match="dc:publisher" xmlns:dc="http://purl.org/dc/elements/1.1/">
<tr><td class="key">Publisher</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> <tr><td class="key">Publisher</td><td class="value"><xsl:value-of select="."/></td></tr>
</xsl:template>
<xsl:template match="dc:contributor" xmlns:dc="http://purl.org/dc/elements/1.1/"> <xsl:template match="dc:contributor" xmlns:dc="http://purl.org/dc/elements/1.1/">
<tr><td class="key">Other Contributor</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> <tr><td class="key">Other Contributor</td><td class="value"><xsl:value-of select="."/></td></tr>
</xsl:template>
<xsl:template match="dc:date" xmlns:dc="http://purl.org/dc/elements/1.1/"> <xsl:template match="dc:date" xmlns:dc="http://purl.org/dc/elements/1.1/">
<tr><td class="key">Date</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> <tr><td class="key">Date</td><td class="value"><xsl:value-of select="."/></td></tr>
</xsl:template>
<xsl:template match="dc:type" xmlns:dc="http://purl.org/dc/elements/1.1/"> <xsl:template match="dc:type" xmlns:dc="http://purl.org/dc/elements/1.1/">
<tr><td class="key">Resource Type</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> <tr><td class="key">Resource Type</td><td class="value"><xsl:value-of select="."/></td></tr>
</xsl:template>
<xsl:template match="dc:format" xmlns:dc="http://purl.org/dc/elements/1.1/"> <xsl:template match="dc:format" xmlns:dc="http://purl.org/dc/elements/1.1/">
<tr><td class="key">Format</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> <tr><td class="key">Format</td><td class="value"><xsl:value-of select="."/></td></tr>
</xsl:template>
<xsl:template match="dc:identifier" xmlns:dc="http://purl.org/dc/elements/1.1/"> <xsl:template match="dc:identifier" xmlns:dc="http://purl.org/dc/elements/1.1/">
<tr><td class="key">Resource Identifier</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> <tr><td class="key">Resource Identifier</td><td class="value"><xsl:value-of select="."/></td></tr>
</xsl:template>
<xsl:template match="dc:source" xmlns:dc="http://purl.org/dc/elements/1.1/"> <xsl:template match="dc:source" xmlns:dc="http://purl.org/dc/elements/1.1/">
<tr><td class="key">Source</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> <tr><td class="key">Source</td><td class="value"><xsl:value-of select="."/></td></tr>
</xsl:template>
<xsl:template match="dc:language" xmlns:dc="http://purl.org/dc/elements/1.1/"> <xsl:template match="dc:language" xmlns:dc="http://purl.org/dc/elements/1.1/">
<tr><td class="key">Language</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> <tr><td class="key">Language</td><td class="value"><xsl:value-of select="."/></td></tr>
</xsl:template>
<xsl:template match="dc:relation" xmlns:dc="http://purl.org/dc/elements/1.1/"> <xsl:template match="dc:relation" xmlns:dc="http://purl.org/dc/elements/1.1/">
<tr><td class="key">Relation</td><td class="value"> <tr><td class="key">Relation</td><td class="value">
<xsl:choose> <xsl:choose>
<xsl:when test='starts-with(.,"http")'> <xsl:when test='starts-with(.,"http")'>
<xsl:choose> <a href="{.}"><xsl:value-of select="."/></a>
<xsl:when test='string-length(.) &gt; 50'> </xsl:when>
<a class="link" href="{.}">URL</a> <xsl:otherwise>
<i> URL not shown as it is very long.</i> <xsl:value-of select="."/>
</xsl:when> </xsl:otherwise>
<xsl:otherwise> </xsl:choose>
<a href="{.}"><xsl:value-of select="."/></a> </td></tr>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
</td></tr>
</xsl:template> </xsl:template>
<xsl:template match="dc:coverage" xmlns:dc="http://purl.org/dc/elements/1.1/"> <xsl:template match="dc:coverage" xmlns:dc="http://purl.org/dc/elements/1.1/">
<tr><td class="key">Coverage</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> <tr><td class="key">Coverage</td><td class="value"><xsl:value-of select="."/></td></tr>
</xsl:template>
<xsl:template match="dc:rights" xmlns:dc="http://purl.org/dc/elements/1.1/"> <xsl:template match="dc:rights" xmlns:dc="http://purl.org/dc/elements/1.1/">
<tr><td class="key">Rights Management</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template> <tr><td class="key">Rights Management</td><td class="value"><xsl:value-of select="."/></td></tr>
</xsl:template>
<!-- <!--
XML Pretty Maker XML Pretty Maker
--> -->
<xsl:template match="node()" mode='xmlMarkup'> <xsl:template match="node()" mode='xmlMarkup'>
<div class="xmlBlock"> <div class="xmlBlock">
&lt;<span class="xmlTagName"><xsl:value-of select='name(.)' /></span><xsl:apply-templates select="@*" mode='xmlMarkup'/>&gt;<xsl:apply-templates select="node()" mode='xmlMarkup' />&lt;/<span class="xmlTagName"><xsl:value-of select='name(.)' /></span>&gt; &lt;<span class="xmlTagName"><xsl:value-of select='name(.)' /></span><xsl:apply-templates select="@*" mode='xmlMarkup'/>&gt;<xsl:apply-templates select="node()" mode='xmlMarkup' />&lt;/<span class="xmlTagName"><xsl:value-of select='name(.)' /></span>&gt;
</div> </div>
</xsl:template> </xsl:template>
<xsl:template match="text()" mode='xmlMarkup'><span class="xmlText"><xsl:value-of select='.' /></span></xsl:template> <xsl:template match="text()" mode='xmlMarkup'><span class="xmlText"><xsl:value-of select='.' /></span></xsl:template>
<xsl:template match="@*" mode='xmlMarkup'> <xsl:template match="@*" mode='xmlMarkup'>
<xsl:text> </xsl:text><span class="xmlAttrName"><xsl:value-of select='name()' /></span>="<span class="xmlAttrValue"><xsl:value-of select='.' /></span>" <xsl:text> </xsl:text><span class="xmlAttrName"><xsl:value-of select='name()' /></span>="<span class="xmlAttrValue"><xsl:value-of select='.' /></span>"
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>