From 5df6c3f1464be73773ae6a5b163f175abf2b1de8 Mon Sep 17 00:00:00 2001 From: Sebastian Meyer Date: Mon, 6 Aug 2012 18:35:39 +0200 Subject: [PATCH] Fix Bug #995907 OAI-PMH interface only is only able to output METS --- dlf/plugins/oai/class.tx_dlf_oai.php | 4 +- dlf/plugins/oai/transform.xsl | 428 +++++++++------------------ 2 files changed, 142 insertions(+), 290 deletions(-) diff --git a/dlf/plugins/oai/class.tx_dlf_oai.php b/dlf/plugins/oai/class.tx_dlf_oai.php index b55b1be0..b8eca22d 100644 --- a/dlf/plugins/oai/class.tx_dlf_oai.php +++ b/dlf/plugins/oai/class.tx_dlf_oai.php @@ -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/', '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/', '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/', 'adminEmail', htmlspecialchars(trim(str_replace('mailto:', '', $resArray['contact'])), ENT_NOQUOTES, 'UTF-8'))); + return $Identify; } else { diff --git a/dlf/plugins/oai/transform.xsl b/dlf/plugins/oai/transform.xsl index 00e98bc0..b8f29bc7 100644 --- a/dlf/plugins/oai/transform.xsl +++ b/dlf/plugins/oai/transform.xsl @@ -1,56 +1,43 @@ - + + - - - - - - + td.value { @@ -73,7 +60,9 @@ td.key { body { margin: 1em 2em 1em 2em; } -h1, h2, h3 { +h1, +h2, +h3 { font-family: sans-serif; clear: left; } @@ -106,7 +95,8 @@ h3 { border: 1px inset #88f; background-color: #a0a0df; } -.oaiRecord, .oaiRecordTitle { +.oaiRecord, +.oaiRecordTitle { background-color: #f0f0ff; border-style: solid; border-color: #d0d0d0; @@ -124,6 +114,7 @@ h2.oaiRecordTitle { border-width: 2px; padding: 10px; } + .results { margin-bottom: 1.5em; } @@ -147,25 +138,47 @@ p.intro { + +.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; +} + + - OAI 2.0 Request Results + Goobi.Presentation: OAI 2.0 Request Results - -

OAI 2.0 Request Results

+

Goobi.Presentation: OAI 2.0 Request Results

-

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 bottom of the page.

+

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.
+ More information about this XSLT is at the bottom of the page.

About the XSLT

- -

An XSLT file has converted the OAI-PMH 2.0 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 Christopher Gutteridge at the University of Southampton as part of the GNU EPrints system, and is freely redistributable under the GPL.

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.

For more information or to download the XSL file please see the OAI to XHTML XSLT homepage.

- +

An XSLT file has converted the OAI-PMH 2.0 responses into XHTML in order to make it human-readable in a browser which supports XSLT such as Mozilla Firefox and Microsoft Internet Explorer.
+ The original XSLT file was created by Christopher Gutteridge at the University of Southampton as part of the GNU EPrints system, and is freely redistributable under the GPL.
+ It was adapted to Goobi.Presentation by Sebastian Meyer at the Saxon State and University Library Dresden.

@@ -173,31 +186,30 @@ p.intro { - +
Datestamp of response
Datestamp of Response
Request URL
- - -

OAI Error(s)

-

The request could not be completed due to the following error or errors.

+

OAI Error

+

The request could not be completed due to the following error.

-

Request was of type .

@@ -212,9 +224,9 @@ p.intro { - - - + @@ -223,11 +235,13 @@ p.intro {

- - + +

Repository

Error Code
- + @@ -241,8 +255,6 @@ p.intro {
Repository Name
Name
Base URL
- -
@@ -251,212 +263,82 @@ p.intro { - - -

Unsupported Description Type

-

The XSL currently does not support this type of description.

-
- -
-
- - - - - -

OAI-Identifier

- - - - - - - - - -
Scheme
Repository Identifier
Delimiter
Sample OAI Identifier
-
- - - - - -

EPrints Description

-

Content

- - -

Submission Policy

- -
-

Metadata Policy

- -

Data Policy

- - -

Content

- -
- -
- - - -

-
- -
-
-
- - -

Comment

-
-
- - - - -

Friends

-
    - -
-
- - -
  • - -Identify
  • -
    - - - - - -

    Branding

    - - -
    - - -

    Icon

    - - - {br:title} - - - {br:title} - - -
    - - -

    Metadata Rendering Rule

    - - - - - - - -
    URL
    Namespace
    Mime Type
    -
    - - - - -

    Gateway Information

    - - - - - - - - - - - - - - -
    Source
    Description
    URL
    Notes
    -
    - - - Admin - - - - - - - + - - + - - + - -

    Set

    - - - - -
    setName
    -
    - - - +

    This is a list of metadata formats available for the record "". Use these links to view the metadata:

    -

    This is a list of metadata formats available from this archive.

    +

    This is a list of metadata formats available from this repository.

    + + + +

    Set

    + + + + +
    Name
    +
    + + + setSpec + + Identifiers (OAI_DC) + Identifiers (METS) + Records (OAI_DC) + Records (METS) + + + + +

    Metadata Format

    - - - + + + - +
    metadataPrefix
    metadataNamespace
    Prefix
    Namespace
    schema
    Schema
    @@ -465,14 +347,13 @@ p.intro { - +

    OAI Record:

    -
    @@ -482,7 +363,8 @@ p.intro { OAI Identifier - oai_dc + OAI_DC + METS formats Datestamp @@ -494,10 +376,6 @@ p.intro { - -

    "about" part of record container not supported by the XSL

    -
    -   - - - - setSpec - - Identifiers - Records - - - - +

    There are more results.

    - + + + + + + + + + Resume
    resumptionToken:
    Submitted Records
    Total Records
    Expiration Datestamp
    Resumption Token - -Resume
    - +

    Unknown Metadata Format

    @@ -536,11 +410,11 @@ p.intro {
    - +
    -

    Dublin Core Metadata (oai_dc)

    +

    DublinCore Metadata

    @@ -586,7 +460,7 @@ p.intro { Relation - + URL @@ -623,26 +497,4 @@ p.intro { ="" - -.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; -} - - \ No newline at end of file