diff --git a/src/main/java/eu/dnetlib/apps/oai/OaiServerController.java b/src/main/java/eu/dnetlib/apps/oai/OaiServerController.java index cf0c635..94b5316 100644 --- a/src/main/java/eu/dnetlib/apps/oai/OaiServerController.java +++ b/src/main/java/eu/dnetlib/apps/oai/OaiServerController.java @@ -288,6 +288,11 @@ public class OaiServerController { final Document doc = DocumentHelper.createDocument(); + final Map xsltAttrs = new HashMap<>(); + xsltAttrs.put("type", "text/xsl"); + xsltAttrs.put("href", "oai/oaitohtml.xsl"); + doc.addProcessingInstruction("xml-stylesheet", xsltAttrs); + final Element root = doc.addElement("OAI-PMH", "http://www.openarchives.org/OAI/2.0/"); root.addAttribute(new QName("schemaLocation", new Namespace("xsi", diff --git a/src/main/resources/static/oai/oaitohtml.xsl b/src/main/resources/static/oai/oaitohtml.xsl new file mode 100644 index 0000000..763c0ab --- /dev/null +++ b/src/main/resources/static/oai/oaitohtml.xsl @@ -0,0 +1,743 @@ + + + + + + + + + + + + + + +td.value { + vertical-align: top; + padding-left: 1em; + padding: 3px; +} +td.key { + background-color: #e0e0ff; + padding: 3px; + text-align: right; + border: 1px solid #c0c0c0; + white-space: nowrap; + font-weight: bold; + vertical-align: top; +} +.dcdata td.key { + background-color: #ffffe0; +} +body { + margin: 1em 2em 1em 2em; +} +h1, h2, h3 { + font-family: sans-serif; + clear: left; +} +h1 { + padding-bottom: 4px; + margin-bottom: 0px; +} +h2 { + margin-bottom: 0.5em; +} +h3 { + margin-bottom: 0.3em; + font-size: medium; +} +.link { + border: 1px outset #88f; + background-color: #c0c0ff; + padding: 1px 4px 1px 4px; + font-size: 80%; + text-decoration: none; + font-weight: bold; + font-family: sans-serif; + color: black; +} +.link:hover { + color: red; +} +.link:active { + color: red; + border: 1px inset #88f; + background-color: #a0a0df; +} +.oaiRecord, .oaiRecordTitle { + background-color: #f0f0ff; + border-style: solid; + border-color: #d0d0d0; +} +h2.oaiRecordTitle { + background-color: #e0e0ff; + font-size: medium; + font-weight: bold; + padding: 10px; + border-width: 2px 2px 0px 2px; + margin: 0px; +} +.oaiRecord { + margin-bottom: 3em; + border-width: 2px; + padding: 10px; +} + +.results { + margin-bottom: 1.5em; +} +ul.quicklinks { + margin-top: 2px; + 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-stlye: none; + font-family: sans-serif; +} +p.intro { + font-size: 80%; +} + + + + + + + + + + OAI 2.0 Request Results + + + + +

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.

+ + +

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.

+ + + +
+ + + + + + + + + + + +
Datestamp of response
Request URL
+ + + + +

OAI Error(s)

+

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

+
+ +
+
+ + +

Request was of type .

+
+ + + + + + + +
+
+
+
+ + + + + + + + + +
Error Code
+

+
+ + + + + + + + + + + + + + + + + + + + +
Repository Name
Base URL
Protocol Version
Earliest Datestamp
Deleted Record Policy
Granularity
+ + +
+ + + + Admin Email + + + + + + +

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.

    + +
    +
    + +
    + + +

    Metadata Format

    + + + + + + + + +
    metadataPrefix
    metadataNamespace
    schema
    +
    + + + + + + + + + +

    OAI Record:

    +
    + + + + +
    +
    + + +

    OAI Record Header

    + + + + + + + +
    OAI Identifier + + + oai_dc + oaf + + formats +
    Datestamp
    + +

    This record has been deleted.

    +
    +
    + + + +

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

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

    There are more results.

    +
    + +

    There are no more results.

    +
    +
    + + + + + + + + + + + + + + + + + + +
    resumptionToken: + + Resume +
    completeListSize: + +
    cursor: + +
    +
    + + + + + +

    OAF Metadata Format

    +
    + +

    OAI DataCite Metadata (oai_datacite)

    +
    + +

    DataCite Metadata (datacite)

    +
    + +

    Unknown Metadata Format

    +
    +
    +
    + +
    +
    + + + + + +
    +

    Dublin Core Metadata (oai_dc)

    + + +
    + +
    +
    + + +Title + + +Author or Creator + + +Subject and Keywords + + + +Description + + +Publisher + + +Other Contributor + + +Date + + +Resource Type + + +Format + + +Resource Identifier + + +Source + + +Language + + +Relation + + + + + URL + URL not shown as it is very long. + + + + + + + + + + + + + + + +Coverage + + +Rights Management + + + + +
    + + <></> +
    +
    + + + + + ="" + + + + +.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; +} + + +
    +