- adjustments in xslts for oai_dc and oai_datacite

This commit is contained in:
Arno Kaimbacher 2020-04-02 21:19:38 +02:00
parent 82665ab35c
commit 5837b87791
2 changed files with 38 additions and 19 deletions

View File

@ -262,8 +262,8 @@
<xsl:value-of select="@Id" /> <xsl:value-of select="@Id" />
</identifier> </identifier>
<datestamp> <datestamp>
<xsl:choose> <xsl:choose>
<xsl:when test="ServerDateModified"> <xsl:when test="ServerDateModified">
<xsl:variable name="dateModified" select="concat( <xsl:variable name="dateModified" select="concat(
ServerDateModified/@Year, '-', ServerDateModified/@Year, '-',
format-number(ServerDateModified/@Month,'00'), '-', format-number(ServerDateModified/@Month,'00'), '-',
@ -274,8 +274,8 @@
)" /> )" />
<xsl:value-of select="$dateModified" /> <xsl:value-of select="$dateModified" />
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:variable name="datePublished" select="concat( <xsl:variable name="datePublished" select="concat(
ServerDatePublished/@Year, '-', ServerDatePublished/@Year, '-',
format-number(ServerDatePublished/@Month,'00'), '-', format-number(ServerDatePublished/@Month,'00'), '-',
format-number(ServerDatePublished/@Day,'00'), 'T', format-number(ServerDatePublished/@Day,'00'), 'T',
@ -283,7 +283,7 @@
format-number(ServerDatePublished/@Minute,'00'), ':', format-number(ServerDatePublished/@Minute,'00'), ':',
format-number(ServerDatePublished/@Second,'00'), 'Z' format-number(ServerDatePublished/@Second,'00'), 'Z'
)" /> )" />
<xsl:value-of select="$datePublished" /> <xsl:value-of select="$datePublished" />
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</datestamp> </datestamp>
@ -325,12 +325,6 @@
<xsl:apply-templates select="TitleMain" mode="oai_dc" /> <xsl:apply-templates select="TitleMain" mode="oai_dc" />
<!-- dc:title --> <!-- dc:title -->
<xsl:apply-templates select="TitleAdditional" mode="oai_dc" /> <xsl:apply-templates select="TitleAdditional" mode="oai_dc" />
<!-- dc:description -->
<xsl:apply-templates select="TitleAbstract" mode="oai_dc" />
<!-- dc:description -->
<xsl:apply-templates select="TitleAbstractAdditional" mode="oai_dc" />
<!-- dc:subject -->
<xsl:apply-templates select="Subject" mode="oai_dc" />
<!--<dc:creator>--> <!--<dc:creator>-->
<!-- Creator: Autor (falls vorhanden), sonst Herausgeber (falls vorhanden), sonst Urhebende Koerperschaft --> <!-- Creator: Autor (falls vorhanden), sonst Herausgeber (falls vorhanden), sonst Urhebende Koerperschaft -->
<xsl:choose> <xsl:choose>
@ -343,6 +337,18 @@
</dc:creator> </dc:creator>
</xsl:when> </xsl:when>
</xsl:choose> </xsl:choose>
<!-- dc:subject -->
<xsl:apply-templates select="Subject" mode="oai_dc" />
<!-- dc:description -->
<xsl:apply-templates select="TitleAbstract" mode="oai_dc" />
<!-- dc:description -->
<xsl:apply-templates select="TitleAbstractAdditional" mode="oai_dc" />
<!-- dc:publisher -->
<dc:publisher>
<!-- <xsl:value-of select="@PublisherName" /> -->
<xsl:value-of select="@CreatingCorporation" />
</dc:publisher>
<!-- dc:contributor --> <!-- dc:contributor -->
<xsl:apply-templates select="PersonContributor" mode="oai_dc" /> <xsl:apply-templates select="PersonContributor" mode="oai_dc" />
<!-- dc:date (call-template, weil die 'Funktion' nur einmal aufgerufen werden soll, nicht einmal für jedes Date--> <!-- dc:date (call-template, weil die 'Funktion' nur einmal aufgerufen werden soll, nicht einmal für jedes Date-->
@ -351,22 +357,26 @@
<xsl:apply-templates select="EmbargoDate" mode="oai_dc" /> <xsl:apply-templates select="EmbargoDate" mode="oai_dc" />
<!-- dc:type --> <!-- dc:type -->
<!-- <xsl:apply-templates select="@Type" mode="oai_dc" /> --> <!-- <xsl:apply-templates select="@Type" mode="oai_dc" /> -->
<dc:type>Dataset</dc:type> <dc:type>Dataset</dc:type>
<!-- dc:format --> <!-- dc:format -->
<xsl:apply-templates select="File/@MimeType" mode="oai_dc" /> <xsl:apply-templates select="File/@MimeType" mode="oai_dc" />
<!-- <dc:format> -->
<xsl:apply-templates select="File" mode="oai_dc" />
<!-- dc:identifier --> <!-- dc:identifier -->
<dc:identifier> <dc:identifier>
<xsl:value-of select="@landingpage"/> <xsl:value-of select="@landingpage"/>
</dc:identifier> </dc:identifier>
<xsl:apply-templates select="File" mode="oai_dc" />
<!-- dc:language --> <!-- dc:language -->
<xsl:apply-templates select="@Language" mode="oai_dc" /> <xsl:apply-templates select="@Language" mode="oai_dc" />
<!-- dc:rights -->
<xsl:apply-templates select="Licence" mode="oai_dc" />
<!-- dc:relation --> <!-- dc:relation -->
<xsl:apply-templates select="Reference" mode="oai_dc" /> <xsl:apply-templates select="Reference" mode="oai_dc" />
<!-- dc:coverage --> <!-- dc:coverage -->
<xsl:apply-templates select="Coverage" mode="oai_dc" /> <xsl:apply-templates select="Coverage" mode="oai_dc" />
<!-- dc:rights -->
<xsl:apply-templates select="Licence" mode="oai_dc" />
<xsl:if test="EmbargoDate">
<dc:rights>embargo</dc:rights>
</xsl:if>
</oai_dc:dc> </oai_dc:dc>
</xsl:template> </xsl:template>
@ -489,15 +499,15 @@
<dc:date> <dc:date>
<xsl:choose> <xsl:choose>
<xsl:when test="PublishedDate"> <xsl:when test="PublishedDate">
<xsl:variable name="publishedDate" select="concat( <xsl:variable name="publishedDate" select="concat(
PublishedDate/@Year, '-', PublishedDate/@Year, '-',
format-number(PublishedDate/@Month,'00'), '-', format-number(PublishedDate/@Month,'00'), '-',
format-number(PublishedDate/@Day,'00') format-number(PublishedDate/@Day,'00')
)" /> )" />
<xsl:value-of select="$publishedDate" /> <xsl:value-of select="$publishedDate" />
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:variable name="serverDatePublished" select="concat( <xsl:variable name="serverDatePublished" select="concat(
ServerDatePublished/@Year, '-', ServerDatePublished/@Year, '-',
format-number(ServerDatePublished/@Month,'00'), '-', format-number(ServerDatePublished/@Month,'00'), '-',
format-number(ServerDatePublished/@Day,'00') format-number(ServerDatePublished/@Day,'00')

View File

@ -304,6 +304,15 @@
<xsl:value-of select="@LinkLicence" /> <xsl:value-of select="@LinkLicence" />
</xsl:attribute> </xsl:attribute>
</xsl:if> </xsl:if>
<xsl:attribute name="schemeURI">
<xsl:text>https://spdx.org/licenses/</xsl:text>
</xsl:attribute>
<xsl:attribute name="rightsIdentifierScheme">
<xsl:text>SPDX</xsl:text>
</xsl:attribute>
<xsl:attribute name="rightsIdentifier">
<xsl:text>CC-BY-NC-ND-4.0</xsl:text>
</xsl:attribute>
<xsl:value-of select="@NameLong" /> <xsl:value-of select="@NameLong" />
</rights> </rights>
</xsl:template> </xsl:template>