- addional xml elements for DINI requirements

- port browser style oai2_style.xslt to xslt version 3.0
- oai2_style includes extra style.css
This commit is contained in:
Arno Kaimbacher 2022-11-25 12:34:57 +01:00
parent 8ebd8f3251
commit edea5ccbd0
5 changed files with 758 additions and 660 deletions

View File

@ -498,11 +498,11 @@
<gmd:extent>
<gmd:EX_Extent>
<xsl:if test="//*[name() = 'Coverage']">
<xsl:variable name="thebox" select="//*[name() = 'Coverage']"/>
<!-- <xsl:variable name="thebox" select="//*[name() = 'Coverage']"/> -->
<xsl:variable name="sLat">
<xsl:choose>
<xsl:when test="string($thebox/@YMin) != ''">
<xsl:value-of select="number($thebox/@YMin)"/>
<xsl:when test="string(Coverage/@YMin) != ''">
<xsl:value-of select="number(Coverage/@YMin)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="''"/>
@ -511,8 +511,8 @@
</xsl:variable>
<xsl:variable name="wLong">
<xsl:choose>
<xsl:when test="string($thebox/@XMin) != ''">
<xsl:value-of select="number($thebox/@XMin)"/>
<xsl:when test="string(Coverage/@XMin) != ''">
<xsl:value-of select="number(Coverage/@XMin)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="''"/>
@ -521,8 +521,8 @@
</xsl:variable>
<xsl:variable name="nLat">
<xsl:choose>
<xsl:when test="string($thebox/@YMax) != ''">
<xsl:value-of select="number($thebox/@YMax)"/>
<xsl:when test="string(Coverage/@YMax) != ''">
<xsl:value-of select="number(Coverage/@YMax)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="''"/>
@ -531,8 +531,8 @@
</xsl:variable>
<xsl:variable name="eLong">
<xsl:choose>
<xsl:when test="string($thebox/@XMax) != ''">
<xsl:value-of select="number($thebox/@XMax)"/>
<xsl:when test="string(Coverage/@XMax) != ''">
<xsl:value-of select="number(Coverage/@XMax)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="''"/>

View File

@ -45,141 +45,51 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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"
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:oai="http://www.openarchives.org/OAI/2.0/"
>
xmlns:id="http://www.openarchives.org/OAI/2.0/oai-identifier"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:ep="http://www.openarchives.org/OAI/1.1/eprints"
xmlns:fr="http://www.openarchives.org/OAI/2.0/friends/"
xmlns:br="http://www.openarchives.org/OAI/2.0/branding/"
xmlns:gw="http://www.openarchives.org/OAI/2.0/gateway/x"
expand-text="yes"
version="3.0">
<xsl:output method="html"/>
<xsl:template name="style">
html, button, input, select, textarea, .pure-g [class *= "pure-u"] {
font-family: 'Open Sans', sans-serif;
}
td.value {
vertical-align: top;
padding-left: 1em;
padding: 3px;
}
td.key {
background-color: #3abac4;
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: #eee;
border-style: solid;
border-color: #d0d0d0;
}
h2.oaiRecordTitle {
background-color: #51565c;
color: #fff;
font-size: medium;
font-weight: bold;
padding: 10px;
border-width: 0px 0px 0px 0px;
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-style: none;
font-family: sans-serif;
}
p.intro {
font-size: 80%;
}
<xsl:call-template name='xmlstyle' />
</xsl:template>
<xsl:output method="html" encoding="UTF-8" omit-xml-declaration="yes" doctype-system="about:legacy-compat"/>
<!-- define variables -->
<xsl:variable name='identifier' select="substring-before(concat(substring-after(/oai:OAI-PMH/oai:request,'identifier='),'&amp;'),'&amp;')" />
<!-- root template -->
<xsl:template match="/">
<html>
<head>
<title>TETHYS OAI 2.0 Request Results</title>
<style><xsl:call-template name="style"/></style>
<!-- <style><xsl:call-template name="style"/></style> -->
<link rel="stylesheet" type="text/css" href="assets/style.css" />
<!-- Favicon
-->
<link rel="apple-touch-icon" sizes="180x180" href="/images/favicon/apple-touch-icon.png"/>
<!-- <link rel="apple-touch-icon" sizes="180x180" href="/images/favicon/apple-touch-icon.png"/>
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon/favicon-32x32.png"/>
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon/favicon-16x16.png"/>
<link rel="manifest" href="/images/favicon/site.webmanifest"/>
<link rel="mask-icon" href="/images/favicon/safari-pinned-tab.svg" color="#5bbad5"/>
<link rel="mask-icon" href="/images/favicon/safari-pinned-tab.svg" color="#5bbad5"/> -->
<link rel="shortcut icon" href="/images/favicon/favicon.ico"/>
<!-- <style>h2{font-size:22pt;text-decoration:underline}para{color:green}</style> -->
</head>
<body>
<h1>TETHYS OAI 2.0 Request Results</h1>
<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 use your web browsers view source option. 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:call-template name="quicklinks"/>
<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 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>
</body>
</html>
</xsl:template>
@ -257,8 +167,10 @@ p.intro {
</xsl:template>
<xsl:template match="/oai:OAI-PMH/oai:Identify/oai:adminEmail">
<tr><td class="key">Admin Email</td>
<td class="value"><xsl:value-of select="."/></td></tr>
<tr>
<td class="key">Admin Email</td>
<td class="value"><xsl:value-of select="."/></td>
</tr>
</xsl:template>
<!--
@ -556,7 +468,13 @@ p.intro {
</xsl:template>
<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/">
<tr><td class="key">Author or Creator</td><td class="value"><xsl:value-of select="."/></td></tr></xsl:template>
@ -627,10 +545,13 @@ p.intro {
<xsl:template match="text()" mode='xmlMarkup'><span class="xmlText"><xsl:value-of select='.' /></span></xsl:template>
<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 name="xmlstyle">
<!-- <xsl:template name="xmlstyle">
.xmlSource {
font-size: 70%;
border: solid #c0c0a0 1px;
@ -650,6 +571,6 @@ p.intro {
.xmlAttrValue {
color: #0000c0;
}
</xsl:template>
</xsl:template> -->
</xsl:stylesheet>

145
assets/style.css Normal file
View File

@ -0,0 +1,145 @@
html,
button,
input,
select,
textarea,
.pure-g [class*="pure-u"] {
font-family: "Open Sans", sans-serif;
}
td.value {
vertical-align: top;
padding-left: 1em;
padding: 3px;
}
td.key {
background-color: #3abac4;
padding: 3px;
text-align: right;
border: 1px solid #c0c0c0;
white-space: nowrap;
/* font-weight: bold; */
vertical-align: top;
}
.dcdata td.key {
background-color: #f4f8f4;
}
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: #00beff;
padding: 1px 4px 1px 4px;
font-size: 80%;
text-decoration: none;
font-weight: bold;
font-family: sans-serif;
color: #6c6e6b;
}
.link:hover {
color: #d0d0d0;
}
.link:active {
color: #d0d0d0;
background-color: #00beff;
}
.oaiRecord,
.oaiRecordTitle {
background-color: #eee;
border-style: solid;
border-color: #d0d0d0;
}
h2.oaiRecordTitle {
background-color: #51565c;
color: #fff;
font-size: medium;
font-weight: bold;
padding: 10px;
border-width: 0px 0px 0px 0px;
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-style: none;
font-family: sans-serif;
}
p.intro {
font-size: 80%;
}
.xmlSource {
font-size: 70%;
border: solid #c0c0a0 1px;
/* background-color: #ffffe0; */
background-color: #f4f8f4;
padding: 2em 2em 2em 0em;
}
.xmlBlock {
padding-left: 2em;
}
.xmlTagName {
color: #800000;
font-weight: bold;
}
.xmlAttrName {
font-weight: bold;
}
.xmlAttrValue {
color: #0000c0;
}

View File

@ -1,11 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
<xsl:stylesheet version="3.0"
xmlns="http://www.openarchives.org/OAI/2.0/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/">
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
<!--<xsl:param name="urnResolverUrl" />-->
@ -143,6 +144,29 @@
</sampleIdentifier>
</oai-identifier>
</description>
<description>
<eprints xmlns="http://www.openarchives.org/OAI/1.1/eprints" xsi:schemaLocation="http://www.openarchives.org/OAI/1.1/eprints http://www.openarchives.org/OAI/1.1/eprints.xsd">
<content>
<text>
Tethys RDR ist ein Datenverlag der Geologischen Bundesanstalt (GBA), der ausschließlich an der GBA generierte geowissenschaftliche Forschungsdaten publiziert.
Die Datenpublikationen können sowohl in deutscher, als auch in englischer Sprache publiziert werden.
Durch die Bereitstellung der Datenpublikation zusammen mit Metadaten nach standardisierten Schemata werden die Publikationen auffindbar und zitierbar.
</text>
<URL>https://tethys.at/help</URL>
</content>
<metadataPolicy>
<text>
All bibliographic metadata provided via this interface, except abstracts, is hereby made available under CC0 license, free to share and re-use.
</text>
<URL>http://creativecommons.org/publicdomain/zero/1.0/deed.de</URL>
</metadataPolicy>
<comment>
This institutional repository is powered by the Tethys repository software,
which is an enhancement of OPSUS4 (https://www.kobv.de/entwicklung/software/opus-4/).
See https://gitea.geologie.ac.at/geolba/tethys/ for more information.
</comment>
</eprints>
</description>
</Identify>
</xsl:template>
@ -304,6 +328,12 @@
</setSpec>-->
<!--loop-->
<xsl:apply-templates select="SetSpec" />
<setSpec>
<xsl:text>open_access</xsl:text>
</setSpec>
<setSpec>
<xsl:text>doc-type:ResearchData</xsl:text>
</setSpec>
</header>
<xsl:choose>
<!-- nicht bei ListIdentifiers und auch nicht bei gelöschten Datensätzen-->
@ -371,8 +401,10 @@
<!-- dc:date: embargo date -->
<xsl:apply-templates select="EmbargoDate" mode="oai_dc" />
<!-- dc:type -->
<!-- <xsl:apply-templates select="@Type" mode="oai_dc" /> -->
<dc:type>Dataset</dc:type>
<dc:type>
<xsl:text>ResearchData</xsl:text>
</dc:type>
<!-- dc:format -->
<xsl:apply-templates select="File/@MimeType" mode="oai_dc" />
<!-- <dc:format> -->

File diff suppressed because one or more lines are too long