- small bug fixes for oai-iso19139 GetRecords request

This commit is contained in:
Arno Kaimbacher 2022-11-17 12:41:51 +01:00
parent 15f3572ef9
commit bb70c087ef
3 changed files with 37 additions and 34 deletions

View File

@ -698,23 +698,23 @@
<!-- <gmd:onLine> -->
<xsl:template name="datacite_identifier">
<xsl:if test="
starts-with($datacite-identifier/@Value, 'doi:') or
$datacite-identifier/@Type = 'Doi' or
starts-with($datacite-identifier/@Value, 'http://')">
starts-with(Identifier/@Value, 'doi:') or
Identifier/@Type = 'Doi' or
starts-with(Identifier/@Value, 'http://')">
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>
<xsl:choose>
<xsl:when test="starts-with($datacite-identifier/@Value, 'doi:')">
<xsl:when test="starts-with(Identifier/@Value, 'doi:')">
<!-- stower http auf https gesetzt -->
<xsl:value-of select="concat('http://dx.doi.org/', substring-after($datacite-identifier/@Value, 'doi:'))"/>
<xsl:value-of select="concat('http://dx.doi.org/', substring-after(Identifier/@Value, 'doi:'))"/>
</xsl:when>
<xsl:when test="$datacite-identifier/@Type = 'Doi'">
<xsl:value-of select="concat('http://dx.doi.org/', normalize-space($datacite-identifier/@Value))"/>
<xsl:when test="Identifier/@Type = 'Doi'">
<xsl:value-of select="concat('http://dx.doi.org/', normalize-space(Identifier/@Value))"/>
</xsl:when>
<xsl:when test="starts-with($datacite-identifier/@Value, 'http://')">
<xsl:value-of select="normalize-space($datacite-identifier/@Value)"/>
<xsl:when test="starts-with(Identifier/@Value, 'http://')">
<xsl:value-of select="normalize-space(Identifier/@Value)"/>
</xsl:when>
</xsl:choose>
</gmd:URL>
@ -754,7 +754,7 @@
</gmd:protocol>
<gmd:name>
<gco:CharacterString>
<xsl:value-of select="normalize-space(string('url'))"/>
<xsl:value-of select="string('url')"/>
</gco:CharacterString>
</gmd:name>
<gmd:description>

View File

@ -36,8 +36,8 @@
<xsl:import href="functions.xslt"/>
<!-- variables -->
<xsl:variable name="datacite-identifier_org" select="//*[name() = 'Identifier']"/>
<xsl:variable name="datacite-identifier" select="//*[name() = 'Identifier'][@Type = 'Doi']"/>
<!-- <xsl:variable name="datacite-identifier_org" select="//*[name() = 'Identifier']"/> -->
<!-- <xsl:variable name="datacite-identifier" select="//*[name() = 'Identifier'][@Type = 'Doi']"/> -->
<xsl:variable name="fileIdentifierPrefix" select="string('at.tethys.dataset')"/>
<xsl:variable name="datacentre">
<xsl:choose>
@ -127,6 +127,8 @@
<gmd:MD_Identifier>
<gmd:code>
<gco:CharacterString>
<xsl:variable name="datacite-identifier" select="Identifier[@Type = 'Doi']"/>
<xsl:if test="string-length($datacite-identifier/@Value) &gt; 0 and count([$datacite-identifier/@Type = 'Doi']) &gt; 0">
<xsl:choose>
<xsl:when test="starts-with($datacite-identifier/@Value, 'doi:') or contains($datacite-identifier/@Value, 'doi.org')">
<xsl:value-of select="$datacite-identifier/@Value"/>
@ -141,6 +143,7 @@
<xsl:value-of select="$datacite-identifier/@Value"/>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</gco:CharacterString>
</gmd:code>
</gmd:MD_Identifier>

File diff suppressed because one or more lines are too long