transformations

This commit is contained in:
Andreas Czerniak 2021-03-03 11:56:03 +01:00
commit f376977c76
3 changed files with 3 additions and 6 deletions

View File

@ -1,4 +1,3 @@
package eu.dnetlib.dhp.common.vocabulary;
import java.io.Serializable;

View File

@ -83,6 +83,7 @@
</xsl:for-each>
<xsl:if test="//*[local-name()='date']/@dateType='Available' and //*[local-name()='datasourceprefix']!='r33ffb097cef'">
<xsl:variable name="varEmbargoEndDate" select="dateCleaner:dateISO( normalize-space(//*[local-name()='date'][@dateType='Available']))" />
<xsl:choose>
<xsl:when test="string-length($varEmbargoEndDate) &gt; 0">
<oaf:embargoenddate>
@ -98,6 +99,7 @@
<xsl:variable name="varTypLst" select="distinct-values((//*[local-name()='resourceType']/(., @resourceTypeGeneral)))" />
<xsl:variable name="varCobjCatLst" select="distinct-values((for $i in $varTypLst return vocabulary:clean( normalize-space($i), 'dnet:publication_resource')))" />
<xsl:variable name="varCobjSupLst" select="for $i in $varCobjCatLst return concat($i, '###', vocabulary:clean( normalize-space($i), 'dnet:result_typologies'))" />
<dr:CobjCategory>
<xsl:choose>
<xsl:when test="count($varCobjSupLst[not(substring-after(., '###') = 'other') and not(substring-before(., '###') = ('0038', '0039', '0040'))]) &gt; 0">

View File

@ -2,6 +2,7 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:oaf="http://namespace.openaire.eu/oaf"
xmlns:dr="http://www.driver-repository.eu/namespace/dr"
xmlns:datacite="http://datacite.org/schema/kernel-4"
@ -61,7 +62,6 @@
<!-- select="vocabulary:clean( distinct-values(//*[local-name()='resourceType'][1]/@uri, 'dnet:publication_resource')" /-->
<xsl:variable name="varSuperType" select="vocabulary:clean( $varCobjCategory, 'dnet:result_typologies')"/>
<xsl:template match="/">
<xsl:variable name="datasourcePrefix"
select="normalize-space(//oaf:datasourceprefix)" />
@ -177,7 +177,6 @@
<xsl:attribute name="alternateIdentifierType" select="./@*[local-name()=('identifierType', 'alternateIdentifierType')]"/>
<xsl:value-of select="."/>
</datacite:alternateIdentifier>
</xsl:for-each>
<xsl:for-each select="(//datacite:alternateIdentifier, //datacite:identifier)[@*[local-name()=('identifierType', 'alternateIdentifierType')]/lower-case(.) = 'pmid']">
@ -187,7 +186,6 @@
</datacite:alternateIdentifier>
</xsl:for-each>
<!--
<xsl:for-each select="(//datacite:alternateIdentifier, //datacite:identifier)[@*[local-name()=('identifierType', 'alternateIdentifierType')]/lower-case(.) = ('handle')][//oaf:datasourceprefix = 'od______1318']">
@ -354,7 +352,6 @@
</xsl:choose>
</oaf:accessrights>
<xsl:for-each select="distinct-values(//*[local-name()='licenseCondition']/(.[not(./@uri)][not(contains(., 'copyright')) and not(. = 'other')], .[./@uri]/@uri))">
<oaf:license>
<xsl:value-of select="."/>
@ -658,7 +655,6 @@
</xsl:template>
<xsl:template match="//*[local-name() = 'resource']/*[local-name()='identifier']">
<!-- funding -->