Fix Bug #995907 OAI-PMH interface only is only able to output METS

This commit is contained in:
Sebastian Meyer 2012-08-06 18:35:39 +02:00
parent bf886c089f
commit 5df6c3f146
2 changed files with 142 additions and 290 deletions

View File

@ -925,14 +925,14 @@ class tx_dlf_oai extends tx_dlf_plugin {
$Identify->appendChild($this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'protocolVersion', '2.0')); $Identify->appendChild($this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'protocolVersion', '2.0'));
$Identify->appendChild($this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'adminEmail', htmlspecialchars(trim(str_replace('mailto:', '', $resArray['contact'])), ENT_NOQUOTES, 'UTF-8')));
$Identify->appendChild($this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'earliestDatestamp', $datestamp)); $Identify->appendChild($this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'earliestDatestamp', $datestamp));
$Identify->appendChild($this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'deletedRecord', 'transient')); $Identify->appendChild($this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'deletedRecord', 'transient'));
$Identify->appendChild($this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'granularity', 'YYYY-MM-DDThh:mm:ssZ')); $Identify->appendChild($this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'granularity', 'YYYY-MM-DDThh:mm:ssZ'));
$Identify->appendChild($this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'adminEmail', htmlspecialchars(trim(str_replace('mailto:', '', $resArray['contact'])), ENT_NOQUOTES, 'UTF-8')));
return $Identify; return $Identify;
} else { } else {

View File

@ -1,56 +1,43 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!--
/***************************************************************
* Copyright notice
*
* (c) 2006 University of Southampton, UK. SO17 1BJ.
* (c) 2012 Sebastian Meyer <sebastian.meyer@slub-dresden.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
-->
<!-- <!--
XSL Transform to convert OAI 2.0 responses into XHTML XSL Transform to convert OAI 2.0 responses into XHTML
By Christopher Gutteridge, University of Southampton By Christopher Gutteridge, University of Southampton
Edited by Sebastian Meyer, Saxon State Library
v1.1
Edited by Sebastian Meyer, Saxon State and University Library Dresden
--> -->
<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" />
Copyright (c) 2000-2004 University of Southampton, UK. SO17 1BJ.
EPrints 2 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
EPrints 2 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with EPrints 2; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-->
<!--
All the elements really needed for EPrints are done but if
you want to use this XSL for other OAI archive you may want
to make some minor changes or additions.
Not Done
The 'about' section of 'record'
The 'compression' part of 'identify'
The optional attributes of 'resumptionToken'
The optional 'setDescription' container of 'set'
All the links just link to oai_dc versions of records.
-->
<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:template name="style"> <xsl:template name="style">
td.value { td.value {
@ -73,7 +60,9 @@ td.key {
body { body {
margin: 1em 2em 1em 2em; margin: 1em 2em 1em 2em;
} }
h1, h2, h3 { h1,
h2,
h3 {
font-family: sans-serif; font-family: sans-serif;
clear: left; clear: left;
} }
@ -106,7 +95,8 @@ h3 {
border: 1px inset #88f; border: 1px inset #88f;
background-color: #a0a0df; background-color: #a0a0df;
} }
.oaiRecord, .oaiRecordTitle { .oaiRecord,
.oaiRecordTitle {
background-color: #f0f0ff; background-color: #f0f0ff;
border-style: solid; border-style: solid;
border-color: #d0d0d0; border-color: #d0d0d0;
@ -124,6 +114,7 @@ h2.oaiRecordTitle {
border-width: 2px; border-width: 2px;
padding: 10px; padding: 10px;
} }
.results { .results {
margin-bottom: 1.5em; margin-bottom: 1.5em;
} }
@ -147,25 +138,47 @@ p.intro {
<xsl:call-template name='xmlstyle' /> <xsl:call-template name='xmlstyle' />
</xsl:template> </xsl:template>
<xsl:template name="xmlstyle">
.xmlSource {
font-size: 70%;
border: solid #c0c0a0 1px;
background-color: #ffffe0;
padding: 2em 2em 2em 0em;
}
.xmlBlock {
padding-left: 2em;
}
.xmlTagName {
color: #800000;
font-weight: bold;
}
.xmlAttrName {
font-weight: bold;
}
.xmlAttrValue {
color: #0000c0;
}
</xsl:template>
<xsl:variable name='identifier' select="substring-before(concat(substring-after(/oai:OAI-PMH/oai:request,'identifier='),'&amp;'),'&amp;')" /> <xsl:variable name='identifier' select="substring-before(concat(substring-after(/oai:OAI-PMH/oai:request,'identifier='),'&amp;'),'&amp;')" />
<xsl:template match="/"> <xsl:template match="/">
<html> <html>
<head> <head>
<title>OAI 2.0 Request Results</title> <title>Goobi.Presentation: OAI 2.0 Request Results</title>
<style><xsl:call-template name="style"/></style> <style><xsl:call-template name="style"/></style>
</head> </head>
<body> <body>
<h1>Goobi.Presentation: OAI 2.0 Request Results</h1>
<h1>OAI 2.0 Request Results</h1>
<xsl:call-template name="quicklinks"/> <xsl:call-template name="quicklinks"/>
<p class="intro">You are viewing an HTML version of the XML OAI response. To see the underlying XML use your web browsers view source option. More information about this XSLT is at the <a href="#moreinfo">bottom of the page</a>.</p> <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.<br />
More information about this XSLT is at the <a href="#moreinfo">bottom of the page</a>.</p>
<xsl:apply-templates select="/oai:OAI-PMH" /> <xsl:apply-templates select="/oai:OAI-PMH" />
<xsl:call-template name="quicklinks"/> <xsl:call-template name="quicklinks"/>
<h2><a name="moreinfo">About the XSLT</a></h2> <h2><a name="moreinfo">About the XSLT</a></h2>
<p>An XSLT file has converted the <a href="http://www.openarchives.org">OAI-PMH 2.0</a> responses into XHTML in order to make it human-readable in a browser which supports XSLT such as Mozilla Firefox and Microsoft Internet Explorer.<br />
<p>An XSLT file has converted the <a href="http://www.openarchives.org">OAI-PMH 2.0</a> responses into XHTML which looks nice in a browser which supports XSLT such as Mozilla, Firebird and Internet Explorer. The XSLT file was created by <a href="http://www.ecs.soton.ac.uk/people/cjg">Christopher Gutteridge</a> at the University of Southampton as part of the <a href="http://software.eprints.org">GNU EPrints system</a>, and is freely redistributable under the <a href="http://www.gnu.org">GPL</a>.</p><p>If you want to use the XSL file on your own OAI interface you may but due to the way XSLT works you must install the XSL file on the same server as the OAI script, you can't just link to this copy.</p><p>For more information or to download the XSL file please see the <a href="http://software.eprints.org/xslt.php">OAI to XHTML XSLT homepage</a>.</p> The original XSLT file was created by <a href="http://www.ecs.soton.ac.uk/people/cjg">Christopher Gutteridge</a> at the University of Southampton as part of the <a href="http://software.eprints.org">GNU EPrints system</a>, and is freely redistributable under the <a href="http://www.gnu.org">GPL</a>.<br />
It was adapted to <a href="http://goobi.org">Goobi.Presentation</a> by <a href="mailto:sebastian.meyer@slub-dresden.de">Sebastian Meyer</a> at the Saxon State and University Library Dresden.</p>
</body> </body>
</html> </html>
</xsl:template> </xsl:template>
@ -173,31 +186,30 @@ p.intro {
<xsl:template name="quicklinks"> <xsl:template name="quicklinks">
<ul class="quicklinks"> <ul class="quicklinks">
<li><a href="?verb=Identify">Identify</a> | </li> <li><a href="?verb=Identify">Identify</a> | </li>
<li><a href="?verb=ListRecords&amp;metadataPrefix=oai_dc">ListRecords</a> | </li> <li><a href="?verb=ListIdentifiers&amp;metadataPrefix=oai_dc">ListIdentifiers (OAI_DC)</a></li>
<li><a href="?verb=ListSets">ListSets</a> | </li> <li><a href="?verb=ListIdentifiers&amp;metadataPrefix=mets">ListIdentifiers (METS)</a></li>
<li><a href="?verb=ListMetadataFormats">ListMetadataFormats</a> | </li> <li><a href="?verb=ListMetadataFormats">ListMetadataFormats</a> | </li>
<li><a href="?verb=ListIdentifiers&amp;metadataPrefix=oai_dc">ListIdentifiers</a></li> <li><a href="?verb=ListRecords&amp;metadataPrefix=oai_dc">ListRecords (OAI_DC)</a> | </li>
<li><a href="?verb=ListRecords&amp;metadataPrefix=mets">ListRecords (METS)</a> | </li>
<li><a href="?verb=ListSets">ListSets</a> | </li>
</ul> </ul>
</xsl:template> </xsl:template>
<xsl:template match="/oai:OAI-PMH"> <xsl:template match="/oai:OAI-PMH">
<table class="values"> <table class="values">
<tr><td class="key">Datestamp of response</td> <tr><td class="key">Datestamp of Response</td>
<td class="value"><xsl:value-of select="oai:responseDate"/></td></tr> <td class="value"><xsl:value-of select="oai:responseDate"/></td></tr>
<tr><td class="key">Request URL</td> <tr><td class="key">Request URL</td>
<td class="value"><xsl:value-of select="oai:request"/></td></tr> <td class="value"><xsl:value-of select="oai:request"/></td></tr>
</table> </table>
<!-- verb: [<xsl:value-of select="oai:request/@verb" />]<br /> -->
<xsl:choose> <xsl:choose>
<xsl:when test="oai:error"> <xsl:when test="oai:error">
<h2>OAI Error(s)</h2> <h2>OAI Error</h2>
<p>The request could not be completed due to the following error or errors.</p> <p>The request could not be completed due to the following error.</p>
<div class="results"> <div class="results">
<xsl:apply-templates select="oai:error"/> <xsl:apply-templates select="oai:error"/>
</div> </div>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<p>Request was of type <xsl:value-of select="oai:request/@verb"/>.</p> <p>Request was of type <xsl:value-of select="oai:request/@verb"/>.</p>
<div class="results"> <div class="results">
@ -212,9 +224,9 @@ p.intro {
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>
<!--
<!-- ERROR --> Error
-->
<xsl:template match="/oai:OAI-PMH/oai:error"> <xsl:template match="/oai:OAI-PMH/oai:error">
<table class="values"> <table class="values">
<tr><td class="key">Error Code</td> <tr><td class="key">Error Code</td>
@ -223,11 +235,13 @@ p.intro {
<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:OAI-PMH/oai:Identify">
<h2>Repository</h2>
<table class="values"> <table class="values">
<tr><td class="key">Repository Name</td> <tr><td class="key">Name</td>
<td class="value"><xsl:value-of select="oai:repositoryName"/></td></tr> <td class="value"><xsl:value-of select="oai:repositoryName"/></td></tr>
<tr><td class="key">Base URL</td> <tr><td class="key">Base URL</td>
<td class="value"><xsl:value-of select="oai:baseURL"/></td></tr> <td class="value"><xsl:value-of select="oai:baseURL"/></td></tr>
@ -241,8 +255,6 @@ p.intro {
<td class="value"><xsl:value-of select="oai:granularity"/></td></tr> <td class="value"><xsl:value-of select="oai:granularity"/></td></tr>
<xsl:apply-templates select="oai:adminEmail"/> <xsl:apply-templates select="oai:adminEmail"/>
</table> </table>
<xsl:apply-templates select="oai:description"/>
<!--no warning about unsupported descriptions -->
</xsl:template> </xsl:template>
<xsl:template match="/oai:OAI-PMH/oai:Identify/oai:adminEmail"> <xsl:template match="/oai:OAI-PMH/oai:Identify/oai:adminEmail">
@ -251,212 +263,82 @@ p.intro {
</xsl:template> </xsl:template>
<!-- <!--
Identify / Unsupported Description GetRecord
--> -->
<xsl:template match="oai:description/*" priority="-100">
<h2>Unsupported Description Type</h2>
<p>The XSL currently does not support this type of description.</p>
<div class="xmlSource">
<xsl:apply-templates select="." mode='xmlMarkup' />
</div>
</xsl:template>
<!--
Identify / OAI-Identifier
-->
<xsl:template match="id:oai-identifier" xmlns:id="http://www.openarchives.org/OAI/2.0/oai-identifier">
<h2>OAI-Identifier</h2>
<table class="values">
<tr><td class="key">Scheme</td>
<td class="value"><xsl:value-of select="id:scheme"/></td></tr>
<tr><td class="key">Repository Identifier</td>
<td class="value"><xsl:value-of select="id:repositoryIdentifier"/></td></tr>
<tr><td class="key">Delimiter</td>
<td class="value"><xsl:value-of select="id:delimiter"/></td></tr>
<tr><td class="key">Sample OAI Identifier</td>
<td class="value"><xsl:value-of select="id:sampleIdentifier"/></td></tr>
</table>
</xsl:template>
<!--
Identify / EPrints
-->
<xsl:template match="ep:eprints" xmlns:ep="http://www.openarchives.org/OAI/1.1/eprints">
<h2>EPrints Description</h2>
<h3>Content</h3>
<xsl:apply-templates select="ep:content"/>
<xsl:if test="ep:submissionPolicy">
<h3>Submission Policy</h3>
<xsl:apply-templates select="ep:submissionPolicy"/>
</xsl:if>
<h3>Metadata Policy</h3>
<xsl:apply-templates select="ep:metadataPolicy"/>
<h3>Data Policy</h3>
<xsl:apply-templates select="ep:dataPolicy"/>
<xsl:if test="ep:content">
<h3>Content</h3>
<xsl:apply-templates select="ep:content"/>
</xsl:if>
<xsl:apply-templates select="ep:comment"/>
</xsl:template>
<xsl:template match="ep:content|ep:dataPolicy|ep:metadataPolicy|ep:submissionPolicy" xmlns:ep="http://www.openarchives.org/OAI/1.1/eprints">
<xsl:if test="ep:text">
<p><xsl:value-of select="ep:text" /></p>
</xsl:if>
<xsl:if test="ep:URL">
<div><a href="{ep:URL}"><xsl:value-of select="ep:URL" /></a></div>
</xsl:if>
</xsl:template>
<xsl:template match="ep:comment" xmlns:ep="http://www.openarchives.org/OAI/1.1/eprints">
<h3>Comment</h3>
<div><xsl:value-of select="."/></div>
</xsl:template>
<!--
Identify / Friends
-->
<xsl:template match="fr:friends" xmlns:fr="http://www.openarchives.org/OAI/2.0/friends/">
<h2>Friends</h2>
<ul>
<xsl:apply-templates select="fr:baseURL"/>
</ul>
</xsl:template>
<xsl:template match="fr:baseURL" xmlns:fr="http://www.openarchives.org/OAI/2.0/friends/">
<li><xsl:value-of select="."/>
<xsl:text> </xsl:text>
<a class="link" href="{.}?verb=Identify">Identify</a></li>
</xsl:template>
<!--
Identify / Branding
-->
<xsl:template match="br:branding" xmlns:br="http://www.openarchives.org/OAI/2.0/branding/">
<h2>Branding</h2>
<xsl:apply-templates select="br:collectionIcon"/>
<xsl:apply-templates select="br:metadataRendering"/>
</xsl:template>
<xsl:template match="br:collectionIcon" xmlns:br="http://www.openarchives.org/OAI/2.0/branding/">
<h3>Icon</h3>
<xsl:choose>
<xsl:when test="link!=''">
<a href="{br:link}"><img src="{br:url}" alt="{br:title}" width="{br:width}" height="{br:height}" border="0" /></a>
</xsl:when>
<xsl:otherwise>
<img src="{br:url}" alt="{br:title}" width="{br:width}" height="{br:height}" border="0" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="br:metadataRendering" xmlns:br="http://www.openarchives.org/OAI/2.0/branding/">
<h3>Metadata Rendering Rule</h3>
<table class="values">
<tr><td class="key">URL</td>
<td class="value"><xsl:value-of select="."/></td></tr>
<tr><td class="key">Namespace</td>
<td class="value"><xsl:value-of select="@metadataNamespace"/></td></tr>
<tr><td class="key">Mime Type</td>
<td class="value"><xsl:value-of select="@mimetype"/></td></tr>
</table>
</xsl:template>
<!--
Identify / Gateway
-->
<xsl:template match="gw:gateway" xmlns:gw="http://www.openarchives.org/OAI/2.0/gateway/x">
<h2>Gateway Information</h2>
<table class="values">
<tr><td class="key">Source</td>
<td class="value"><xsl:value-of select="gw:source"/></td></tr>
<tr><td class="key">Description</td>
<td class="value"><xsl:value-of select="gw:gatewayDescription"/></td></tr>
<xsl:apply-templates select="gw:gatewayAdmin"/>
<xsl:if test="gw:gatewayURL">
<tr><td class="key">URL</td>
<td class="value"><xsl:value-of select="gw:gatewayURL"/></td></tr>
</xsl:if>
<xsl:if test="gw:gatewayNotes">
<tr><td class="key">Notes</td>
<td class="value"><xsl:value-of select="gw:gatewayNotes"/></td></tr>
</xsl:if>
</table>
</xsl:template>
<xsl:template match="gw:gatewayAdmin" xmlns:gw="http://www.openarchives.org/OAI/2.0/gateway/">
<tr><td class="key">Admin</td>
<td class="value"><xsl:value-of select="."/></td></tr>
</xsl:template>
<!-- GetRecord -->
<xsl:template match="oai:GetRecord"> <xsl:template match="oai:GetRecord">
<xsl:apply-templates select="oai:record" /> <xsl:apply-templates select="oai:record" />
</xsl:template> </xsl:template>
<!-- ListRecords --> <!--
ListRecords
-->
<xsl:template match="oai:ListRecords"> <xsl:template match="oai:ListRecords">
<xsl:apply-templates select="oai:record" /> <xsl:apply-templates select="oai:record" />
<xsl:apply-templates select="oai:resumptionToken" /> <xsl:apply-templates select="oai:resumptionToken" />
</xsl:template> </xsl:template>
<!-- ListIdentifiers --> <!--
ListIdentifiers
-->
<xsl:template match="oai:ListIdentifiers"> <xsl:template match="oai:ListIdentifiers">
<xsl:apply-templates select="oai:header" /> <xsl:apply-templates select="oai:header" />
<xsl:apply-templates select="oai:resumptionToken" /> <xsl:apply-templates select="oai:resumptionToken" />
</xsl:template> </xsl:template>
<!-- ListSets --> <!--
ListSets
-->
<xsl:template match="oai:ListSets"> <xsl:template match="oai:ListSets">
<xsl:apply-templates select="oai:set" /> <xsl:apply-templates select="oai:set" />
<xsl:apply-templates select="oai:resumptionToken" /> <xsl:apply-templates select="oai:resumptionToken" />
</xsl:template> </xsl:template>
<xsl:template match="oai:set"> <!--
<h2>Set</h2> ListMetadataFormats
<table class="values"> -->
<tr><td class="key">setName</td>
<td class="value"><xsl:value-of select="oai:setName"/></td></tr>
<xsl:apply-templates select="oai:setSpec" />
</table>
</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>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>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<p>This is a list of metadata formats available from this archive.</p> <p>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" /> <xsl:apply-templates select="oai:metadataFormat" />
</xsl:template> </xsl:template>
<!-- Set Details -->
<xsl:template match="oai:set">
<h2>Set</h2>
<table class="values">
<tr><td class="key">Name</td>
<td class="value"><xsl:value-of select="oai:setName"/></td></tr>
<xsl:apply-templates select="oai:setSpec" />
</table>
</xsl:template>
<xsl:template match="oai:setSpec">
<tr><td class="key">setSpec</td>
<td class="value"><xsl:value-of select="."/>
<xsl:text> </xsl:text><a class="link" href="?verb=ListIdentifiers&amp;metadataPrefix=oai_dc&amp;set={.}">Identifiers (OAI_DC)</a>
<xsl:text> </xsl:text><a class="link" href="?verb=ListIdentifiers&amp;metadataPrefix=mets&amp;set={.}">Identifiers (METS)</a>
<xsl:text> </xsl:text><a class="link" href="?verb=ListRecords&amp;metadataPrefix=oai_dc&amp;set={.}">Records (OAI_DC)</a>
<xsl:text> </xsl:text><a class="link" href="?verb=ListRecords&amp;metadataPrefix=mets&amp;set={.}">Records (METS)</a>
</td></tr>
</xsl:template>
<!-- Metadata Format Details -->
<xsl:template match="oai:metadataFormat"> <xsl:template match="oai:metadataFormat">
<h2>Metadata Format</h2> <h2>Metadata Format</h2>
<table class="values"> <table class="values">
<tr><td class="key">metadataPrefix</td> <tr><td class="key">Prefix</td>
<td class="value"><xsl:value-of select="oai:metadataPrefix"/></td></tr> <td class="value"><a class="link" href="?verb=ListRecords&amp;metadataPrefix={oai:metadataPrefix}"><xsl:value-of select="oai:metadataPrefix"/></a></td></tr>
<tr><td class="key">metadataNamespace</td> <tr><td class="key">Namespace</td>
<td class="value"><xsl:value-of select="oai:metadataNamespace"/></td></tr> <td class="value"><xsl:value-of select="oai:metadataNamespace"/></td></tr>
<tr><td class="key">schema</td> <tr><td class="key">Schema</td>
<td class="value"><a href="{oai:schema}"><xsl:value-of select="oai:schema"/></a></td></tr> <td class="value"><a href="{oai:schema}"><xsl:value-of select="oai:schema"/></a></td></tr>
</table> </table>
</xsl:template> </xsl:template>
@ -465,14 +347,13 @@ p.intro {
<xsl:text> </xsl:text><a class="link" href="?verb=GetRecord&amp;metadataPrefix={.}&amp;identifier={$identifier}"><xsl:value-of select='.' /></a> <xsl:text> </xsl:text><a class="link" href="?verb=GetRecord&amp;metadataPrefix={.}&amp;identifier={$identifier}"><xsl:value-of select='.' /></a>
</xsl:template> </xsl:template>
<!-- record object --> <!-- Record Details -->
<xsl:template match="oai:record"> <xsl:template match="oai:record">
<h2 class="oaiRecordTitle">OAI Record: <xsl:value-of select="oai:header/oai:identifier"/></h2> <h2 class="oaiRecordTitle">OAI Record: <xsl:value-of select="oai:header/oai:identifier"/></h2>
<div class="oaiRecord"> <div class="oaiRecord">
<xsl:apply-templates select="oai:header" /> <xsl:apply-templates select="oai:header" />
<xsl:apply-templates select="oai:metadata" /> <xsl:apply-templates select="oai:metadata" />
<xsl:apply-templates select="oai:about" />
</div> </div>
</xsl:template> </xsl:template>
@ -482,7 +363,8 @@ p.intro {
<tr><td class="key">OAI Identifier</td> <tr><td class="key">OAI Identifier</td>
<td class="value"> <td class="value">
<xsl:value-of select="oai:identifier"/> <xsl:value-of select="oai:identifier"/>
<xsl:text> </xsl:text><a class="link" href="?verb=GetRecord&amp;metadataPrefix=oai_dc&amp;identifier={oai:identifier}">oai_dc</a> <xsl:text> </xsl:text><a class="link" href="?verb=GetRecord&amp;metadataPrefix=oai_dc&amp;identifier={oai:identifier}">OAI_DC</a>
<xsl:text> </xsl:text><a class="link" href="?verb=GetRecord&amp;metadataPrefix=mets&amp;identifier={oai:identifier}">METS</a>
<xsl:text> </xsl:text><a class="link" href="?verb=ListMetadataFormats&amp;identifier={oai:identifier}">formats</a> <xsl:text> </xsl:text><a class="link" href="?verb=ListMetadataFormats&amp;identifier={oai:identifier}">formats</a>
</td></tr> </td></tr>
<tr><td class="key">Datestamp</td> <tr><td class="key">Datestamp</td>
@ -494,10 +376,6 @@ p.intro {
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="oai:about">
<p>"about" part of record container not supported by the XSL</p>
</xsl:template>
<xsl:template match="oai:metadata"> <xsl:template match="oai:metadata">
&#160; &#160;
<div class="metadata"> <div class="metadata">
@ -505,29 +383,25 @@ p.intro {
</div> </div>
</xsl:template> </xsl:template>
<!-- oai setSpec object --> <!-- Resumption Token -->
<xsl:template match="oai:setSpec">
<tr><td class="key">setSpec</td>
<td class="value"><xsl:value-of select="."/>
<xsl:text> </xsl:text><a class="link" href="?verb=ListIdentifiers&amp;metadataPrefix=oai_dc&amp;set={.}">Identifiers</a>
<xsl:text> </xsl:text><a class="link" href="?verb=ListRecords&amp;metadataPrefix=oai_dc&amp;set={.}">Records</a>
</td></tr>
</xsl:template>
<!-- oai resumptionToken -->
<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"> <table class="values">
<tr><td class="key">resumptionToken:</td> <tr><td class="key">Submitted Records</td>
<td class="value"><xsl:value-of select="@cursor"/></td></tr>
<tr><td class="key">Total Records</td>
<td class="value"><xsl:value-of select="@completeListSize"/></td></tr>
<tr><td class="key">Expiration Datestamp</td>
<td class="value"><xsl:value-of select="@expirationDate"/></td></tr>
<tr><td class="key">Resumption Token</td>
<td class="value"><xsl:value-of select="."/> <td class="value"><xsl:value-of select="."/>
<xsl:text> </xsl:text> <xsl:text> </xsl:text>
<a class="link" href="?verb={/oai:OAI-PMH/oai:request/@verb}&amp;resumptionToken={.}">Resume</a></td></tr> <a class="link" href="?verb={/oai:OAI-PMH/oai:request/@verb}&amp;resumptionToken={.}">Resume</a></td></tr>
</table> </table>
</xsl:template> </xsl:template>
<!-- unknown metadata format --> <!-- Unknown Metadata -->
<xsl:template match="oai:metadata/*" priority='-100'> <xsl:template match="oai:metadata/*" priority='-100'>
<h3>Unknown Metadata Format</h3> <h3>Unknown Metadata Format</h3>
@ -536,11 +410,11 @@ p.intro {
</div> </div>
</xsl:template> </xsl:template>
<!-- oai_dc record --> <!-- 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"> <div class="dcdata">
<h3>Dublin Core Metadata (oai_dc)</h3> <h3>DublinCore Metadata</h3>
<table class="dcdata"> <table class="dcdata">
<xsl:apply-templates select="*" /> <xsl:apply-templates select="*" />
</table> </table>
@ -586,7 +460,7 @@ p.intro {
<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> <xsl:choose>
<xsl:when test='string-length(.) &gt; 50'> <xsl:when test='string-length(.) &gt; 50'>
<a class="link" href="{.}">URL</a> <a class="link" href="{.}">URL</a>
@ -623,26 +497,4 @@ p.intro {
<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:template name="xmlstyle">
.xmlSource {
font-size: 70%;
border: solid #c0c0a0 1px;
background-color: #ffffe0;
padding: 2em 2em 2em 0em;
}
.xmlBlock {
padding-left: 2em;
}
.xmlTagName {
color: #800000;
font-weight: bold;
}
.xmlAttrName {
font-weight: bold;
}
.xmlAttrValue {
color: #0000c0;
}
</xsl:template>
</xsl:stylesheet> </xsl:stylesheet>