feature bugs oai
This commit is contained in:
parent
526b48b06e
commit
46a68e5418
|
@ -34,12 +34,12 @@ trait DatasetExtension
|
|||
),
|
||||
'TitleAbstract' => array(
|
||||
'model' => Description::class,
|
||||
'options' => array('type' => ['Abstract']),
|
||||
'options' => array('type' => ['Abstract', 'Translated']),
|
||||
'fetch' => 'eager'
|
||||
),
|
||||
'TitleAbstractAdditional' => array(
|
||||
'model' => Description::class,
|
||||
'options' => array('type' => ['Translated', 'Methods', 'Technical_info', 'Series_information', 'Other']),
|
||||
'options' => array('type' => ['Methods', 'Technical_info', 'Series_information', 'Other']),
|
||||
'fetch' => 'eager'
|
||||
),
|
||||
'Licence' => array(
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<xsl:stylesheet version="1.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/"
|
||||
<xsl:stylesheet version="1.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:php="http://php.net/xsl">
|
||||
|
||||
<!--<xsl:param name="urnResolverUrl" />-->
|
||||
|
@ -17,7 +17,7 @@
|
|||
<xsl:output method="xml" indent="yes" encoding="utf-8" />
|
||||
|
||||
<xsl:param name="responseDate" />
|
||||
<xsl:param name="unixTimestamp" />
|
||||
<xsl:param name="unixTimestamp" />
|
||||
<xsl:param name="email" />
|
||||
<xsl:param name="earliestDatestamp" />
|
||||
<xsl:param name="setPubType" />
|
||||
|
@ -53,7 +53,7 @@
|
|||
<xsl:text>type="text/xsl" href="xsl/oai2_style.xslt"</xsl:text>
|
||||
</xsl:processing-instruction>
|
||||
|
||||
<OAI-PMH xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<OAI-PMH xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://www.openarchives.org/OAI/2.0/" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
|
||||
<responseDate>
|
||||
<xsl:value-of select="$responseDate" />
|
||||
|
@ -381,9 +381,9 @@
|
|||
<!-- dc:language -->
|
||||
<xsl:apply-templates select="@Language" mode="oai_dc" />
|
||||
<!-- dc:relation -->
|
||||
<xsl:if test="Identifier">
|
||||
<xsl:apply-templates select="Identifier" mode="oai_dc" />
|
||||
</xsl:if>
|
||||
<xsl:if test="Identifier">
|
||||
<xsl:apply-templates select="Identifier" mode="oai_dc" />
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="Reference" mode="oai_dc" />
|
||||
<!-- dc:coverage -->
|
||||
<xsl:apply-templates select="Coverage" mode="oai_dc" />
|
||||
|
@ -434,7 +434,7 @@
|
|||
|
||||
<xsl:template match="TitleMain" mode="oai_dc">
|
||||
<dc:title>
|
||||
<xsl:attribute name="xml:lang">
|
||||
<xsl:attribute name="xml:lang">
|
||||
<xsl:value-of select="@Language" />
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="@Value"/>
|
||||
|
@ -443,7 +443,7 @@
|
|||
|
||||
<xsl:template match="TitleAdditional" mode="oai_dc">
|
||||
<dc:title>
|
||||
<xsl:attribute name="xml:lang">
|
||||
<xsl:attribute name="xml:lang">
|
||||
<xsl:value-of select="@Language" />
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="@Value"/>
|
||||
|
@ -540,14 +540,14 @@
|
|||
</xsl:template>
|
||||
|
||||
<xsl:template match="EmbargoDate" mode="oai_dc">
|
||||
<xsl:if test="$unixTimestamp < ./@UnixTimestamp" >
|
||||
<dc:date>
|
||||
<xsl:text>info:eu-repo/date/embargoEnd/</xsl:text>
|
||||
<xsl:value-of select="./@Year"/>
|
||||
- <xsl:value-of select="format-number(./@Month,'00')"/>
|
||||
- <xsl:value-of select="format-number(./@Day,'00')"/>
|
||||
</dc:date>
|
||||
</xsl:if>
|
||||
<xsl:if test="$unixTimestamp < ./@UnixTimestamp">
|
||||
<dc:date>
|
||||
<xsl:text>info:eu-repo/date/embargoEnd/</xsl:text>
|
||||
<xsl:value-of select="./@Year"/>
|
||||
- <xsl:value-of select="format-number(./@Month,'00')"/>
|
||||
- <xsl:value-of select="format-number(./@Day,'00')"/>
|
||||
</dc:date>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
@ -564,23 +564,30 @@
|
|||
|
||||
<xsl:template match="File/@MimeType" mode="oai_dc">
|
||||
<dc:format>
|
||||
<xsl:value-of select="." />
|
||||
<xsl:choose>
|
||||
<xsl:when test=". = 'application/x-sqlite3'">
|
||||
<xsl:text>application/geopackage+sqlite3</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="." />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</dc:format>
|
||||
</xsl:template>
|
||||
|
||||
<!-- <xsl:template match="File" mode="oai_dc">
|
||||
<!-- <xsl:template match="File" mode="oai_dc">
|
||||
<dc:identifier>
|
||||
<xsl:value-of select="@PathName" />
|
||||
<xsl:value-of select="concat($downloadLink, @Id)" />
|
||||
</dc:identifier>
|
||||
</xsl:template> -->
|
||||
|
||||
<xsl:template match="Identifier" mode="oai_dc">
|
||||
<dc:relation>
|
||||
<!-- <xsl:value-of select="concat($doiLink, @Value)" /> -->
|
||||
<xsl:value-of select="concat($doiPrefix, @Value)" />
|
||||
</dc:relation>
|
||||
</xsl:template>
|
||||
<xsl:template match="Identifier" mode="oai_dc">
|
||||
<dc:relation>
|
||||
<!-- <xsl:value-of select="concat($doiLink, @Value)" /> -->
|
||||
<xsl:value-of select="concat($doiPrefix, @Value)" />
|
||||
</dc:relation>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="@CreatingCorporation" mode="oai_dc">
|
||||
<dc:language>
|
||||
|
|
|
@ -183,7 +183,8 @@
|
|||
</xsl:attribute>
|
||||
<xsl:if test="@Type != ''">
|
||||
<xsl:attribute name="descriptionType">
|
||||
<xsl:value-of select="@Type" />
|
||||
<!-- <xsl:value-of select="@Type" /> -->
|
||||
<xsl:text>Abstract</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="@Value" />
|
||||
|
|
|
@ -185,7 +185,8 @@
|
|||
</xsl:attribute>
|
||||
<xsl:if test="@Type != ''">
|
||||
<xsl:attribute name="descriptionType">
|
||||
<xsl:value-of select="@Type" />
|
||||
<!-- <xsl:value-of select="@Type" /> -->
|
||||
<xsl:text>Abstract</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="@Value" />
|
||||
|
@ -261,11 +262,20 @@
|
|||
<xsl:value-of select="@Language" />
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:if test="@Type != '' and @Type != 'Main'">
|
||||
<xsl:attribute name="titleType">
|
||||
<xsl:value-of select="@Type" />
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@Type != '' and @Type != 'Sub' and @Type != 'Main'">
|
||||
<xsl:attribute name="titleType">
|
||||
<xsl:value-of select="@Type" />
|
||||
<xsl:text>Title</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:when>
|
||||
<xsl:when test="@Type = 'Sub'">
|
||||
<xsl:attribute name="titleType">
|
||||
<xsl:value-of select="@Type" />
|
||||
<xsl:text>title</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
<xsl:value-of select="@Value"/>
|
||||
</title>
|
||||
</xsl:template>
|
||||
|
@ -353,7 +363,7 @@
|
|||
<familyName>
|
||||
<xsl:value-of select="@LastName" />
|
||||
</familyName>
|
||||
<affiliation>GBA</affiliation>
|
||||
<affiliation>GBA</affiliation>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="@IdentifierOrcid != ''">
|
||||
|
@ -364,14 +374,21 @@
|
|||
<!--
|
||||
<nameType><xsl:value-of select="@NameType" /></nameType>
|
||||
</xsl:if> -->
|
||||
|
||||
|
||||
</creator>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="File/@MimeType" mode="oai_datacite"
|
||||
xmlns="http://datacite.org/schema/kernel-4">
|
||||
<format>
|
||||
<xsl:value-of select="." />
|
||||
<xsl:choose>
|
||||
<xsl:when test=". = 'application/x-sqlite3'">
|
||||
<xsl:text>application/geopackage+sqlite3</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="." />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</format>
|
||||
</xsl:template>
|
||||
|
||||
|
@ -393,7 +410,7 @@
|
|||
<xsl:text>SPDX</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="rightsIdentifier">
|
||||
<xsl:value-of select="@Name" />
|
||||
<xsl:value-of select="@Name" />
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="@NameLong" />
|
||||
</rights>
|
||||
|
|
Loading…
Reference in New Issue
Block a user