- OAI RequestController.php: earliest publication date in format: 'Y-m-d\TH:i:s\Z'
- datasetxml2oai-pmh.xslt: Rdr_Dataset_Data -> dates in correct format - oai2_style.xslt: haeding with TETHYS OAI 2.0
This commit is contained in:
parent
6a8b27efa6
commit
fd4b0eb87d
|
@ -144,10 +144,10 @@ class RequestController extends Controller
|
|||
{
|
||||
$email = "repository@geologie.ac.at";
|
||||
$repositoryName = "Tethys RDR";
|
||||
$repIdentifier = "tethys.geologie.ac.at";
|
||||
$repIdentifier = "tethys.at";
|
||||
$sampleIdentifier = "oai:" . $repIdentifier . ":27"; //$this->_configuration->getSampleIdentifier();
|
||||
$earliestDateFromDb = Dataset::earliestPublicationDate() != null ?
|
||||
Dataset::earliestPublicationDate()->server_date_published : null;
|
||||
Dataset::earliestPublicationDate()->server_date_published->format('Y-m-d\TH:i:s\Z') : null;
|
||||
|
||||
// set parameters for oai-pmh.xslt
|
||||
$this->proc->setParameter('', 'email', $email);
|
||||
|
|
|
@ -162,12 +162,8 @@
|
|||
<metadataPrefix>
|
||||
<xsl:text>oai_datacite</xsl:text>
|
||||
</metadataPrefix>
|
||||
<schema>
|
||||
http://schema.datacite.org/meta/kernel-4.1/metadata.xsd
|
||||
</schema>
|
||||
<metadataNamespace>
|
||||
http://datacite.org/schema/kernel-4
|
||||
</metadataNamespace>
|
||||
<schema>http://schema.datacite.org/meta/kernel-4.1/metadata.xsd</schema>
|
||||
<metadataNamespace>http://datacite.org/schema/kernel-4</metadataNamespace>
|
||||
</metadataFormat>
|
||||
</ListMetadataFormats>
|
||||
</xsl:template>
|
||||
|
@ -266,16 +262,28 @@
|
|||
<xsl:value-of select="@Id" />
|
||||
</identifier>
|
||||
<datestamp>
|
||||
<xsl:choose>
|
||||
<xsl:choose>
|
||||
<xsl:when test="ServerDateModified">
|
||||
<xsl:value-of select="ServerDateModified/@Year"/>-
|
||||
<xsl:value-of select="format-number(ServerDateModified/@Month,'00')"/>-
|
||||
<xsl:value-of select="format-number(ServerDateModified/@Day,'00')"/>
|
||||
<xsl:variable name="dateModified" select="concat(
|
||||
ServerDateModified/@Year, '-',
|
||||
format-number(ServerDateModified/@Month,'00'), '-',
|
||||
format-number(ServerDateModified/@Day,'00'), 'T',
|
||||
format-number(ServerDateModified/@Hour,'00'), ':',
|
||||
format-number(ServerDateModified/@Minute,'00'), ':',
|
||||
format-number(ServerDateModified/@Second,'00'), 'Z'
|
||||
)" />
|
||||
<xsl:value-of select="$dateModified" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="ServerDatePublished/@Year"/>-
|
||||
<xsl:value-of select="format-number(ServerDatePublished/@Month,'00')"/>-
|
||||
<xsl:value-of select="format-number(ServerDatePublished/@Day,'00')"/>
|
||||
<xsl:variable name="datePublished" select="concat(
|
||||
ServerDatePublished/@Year, '-',
|
||||
format-number(ServerDatePublished/@Month,'00'), '-',
|
||||
format-number(ServerDatePublished/@Day,'00'), 'T',
|
||||
format-number(ServerDatePublished/@Hour,'00'), ':',
|
||||
format-number(ServerDatePublished/@Minute,'00'), ':',
|
||||
format-number(ServerDatePublished/@Second,'00'), 'Z'
|
||||
)" />
|
||||
<xsl:value-of select="$datePublished" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</datestamp>
|
||||
|
@ -290,7 +298,7 @@
|
|||
<xsl:when test="$oai_verb!='ListIdentifiers' and @ServerState!='deleted'">
|
||||
|
||||
<metadata>
|
||||
<!-- <xsl:value-of select="$oai_metadataPrefix" /> -->
|
||||
<!-- <xsl:value-of select="$oai_metadataPrefix" /> -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="$oai_metadataPrefix='oai_dc'">
|
||||
<xsl:apply-templates select="." mode="oai_dc" />
|
||||
|
@ -319,7 +327,7 @@
|
|||
<xsl:apply-templates select="TitleAdditional" mode="oai_dc" />
|
||||
<!-- dc:description -->
|
||||
<xsl:apply-templates select="TitleAbstract" mode="oai_dc" />
|
||||
<!-- dc:description -->
|
||||
<!-- dc:description -->
|
||||
<xsl:apply-templates select="TitleAbstractAdditional" mode="oai_dc" />
|
||||
<!-- dc:subject -->
|
||||
<xsl:apply-templates select="Subject" mode="oai_dc" />
|
||||
|
@ -373,26 +381,26 @@
|
|||
|
||||
<xsl:text>
</xsl:text>
|
||||
<xsl:if test="@ElevationMin != '' and @ElevationMax != ''">
|
||||
<xsl:value-of select="concat(' * ELEVATION MIN: ', @ElevationMin, ' * ELEVATION MAX: ', @ElevationMax)" />
|
||||
<xsl:value-of select="concat(' * ELEVATION MIN: ', @ElevationMin, ' * ELEVATION MAX: ', @ElevationMax)" />
|
||||
</xsl:if>
|
||||
<xsl:if test="@ElevationAbsolut != ''">
|
||||
<xsl:value-of select="concat(' * ELEVATION ABSOLUT: ', @ElevationAbsolut)" />
|
||||
<xsl:if test="@ElevationAbsolut != ''">
|
||||
<xsl:value-of select="concat(' * ELEVATION ABSOLUT: ', @ElevationAbsolut)" />
|
||||
</xsl:if>
|
||||
|
||||
<xsl:text>
</xsl:text>
|
||||
<xsl:if test="@DepthMin != '' and @DepthMax != ''">
|
||||
<xsl:value-of select="concat(' * DEPTH MIN: ', @DepthMin, ' * DEPTH MAX: ', @DepthMax)" />
|
||||
<xsl:value-of select="concat(' * DEPTH MIN: ', @DepthMin, ' * DEPTH MAX: ', @DepthMax)" />
|
||||
</xsl:if>
|
||||
<xsl:if test="@DepthAbsolut != ''">
|
||||
<xsl:value-of select="concat(' * DEPTH ABSOLUT: ', @DepthAbsolut)" />
|
||||
<xsl:if test="@DepthAbsolut != ''">
|
||||
<xsl:value-of select="concat(' * DEPTH ABSOLUT: ', @DepthAbsolut)" />
|
||||
</xsl:if>
|
||||
|
||||
<xsl:text>
</xsl:text>
|
||||
<xsl:text>
</xsl:text>
|
||||
<xsl:if test="@TimeMin != '' and @TimeMax != ''">
|
||||
<xsl:value-of select="concat(' * TIME MIN: ', @TimeMin, ' * TIME MAX: ', @TimeMax)" />
|
||||
<xsl:value-of select="concat(' * TIME MIN: ', @TimeMin, ' * TIME MAX: ', @TimeMax)" />
|
||||
</xsl:if>
|
||||
<xsl:if test="@TimeAbsolut != ''">
|
||||
<xsl:value-of select="concat(' * TIME ABSOLUT: ', @TimeAbsolut)" />
|
||||
<xsl:if test="@TimeAbsolut != ''">
|
||||
<xsl:value-of select="concat(' * TIME ABSOLUT: ', @TimeAbsolut)" />
|
||||
</xsl:if>
|
||||
|
||||
</dc:coverage>
|
||||
|
@ -438,7 +446,7 @@
|
|||
</dc:subject>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="Reference" mode="oai_dc">
|
||||
<xsl:template match="Reference" mode="oai_dc">
|
||||
<dc:relation>
|
||||
<xsl:value-of select="@Value" />
|
||||
</dc:relation>
|
||||
|
@ -480,7 +488,7 @@
|
|||
<dc:date>
|
||||
<xsl:choose>
|
||||
<xsl:when test="PublishedDate">
|
||||
<xsl:value-of select="PublishedDate/@Year"/>
|
||||
<xsl:value-of select="PublishedDate/@Year"/>
|
||||
- <xsl:value-of select="format-number(PublishedDate/@Month,'00')"/>
|
||||
- <xsl:value-of select="format-number(PublishedDate/@Day,'00')"/>
|
||||
</xsl:when>
|
||||
|
@ -531,7 +539,7 @@
|
|||
</dc:identifier>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="@CreatingCorporation" mode="oai_dc">
|
||||
<xsl:template match="@CreatingCorporation" mode="oai_dc">
|
||||
<dc:language>
|
||||
<xsl:value-of select="." />
|
||||
</dc:language>
|
||||
|
|
|
@ -160,11 +160,11 @@ p.intro {
|
|||
<xsl:template match="/">
|
||||
<html>
|
||||
<head>
|
||||
<title>OAI 2.0 Request Results</title>
|
||||
<title>TETHYS OAI 2.0 Request Results</title>
|
||||
<style><xsl:call-template name="style"/></style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>OAI 2.0 Request Results</h1>
|
||||
<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>
|
||||
<xsl:apply-templates select="/oai:OAI-PMH" />
|
||||
|
|
Loading…
Reference in New Issue
Block a user