Project

General

Profile

1
<RESOURCE_PROFILE>
2
    <HEADER>
3
        <RESOURCE_IDENTIFIER value="be55f848-95eb-49c7-a045-1027a5ce8971_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
4
        <RESOURCE_TYPE value="TransformationRuleDSResourceType"/>
5
        <RESOURCE_KIND value="TransformationRuleDSResources"/>
6
        <RESOURCE_URI value=""/>
7
        <DATE_OF_CREATION value="2023-11-28T10:40:10+00:00"/>
8
    </HEADER>
9
    <BODY>
10
        <CONFIGURATION>
11
            <IMPORTED/>
12
            <SCRIPT>
13
                <TITLE>xslt_opendata_deliverable_2_oaf</TITLE>
14
                <CODE>
15
                    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" xmlns:oaf="http://namespace.openaire.eu/oaf" xmlns:dri="http://www.driver-repository.eu/namespace/dri" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:TransformationFunction="eu.dnetlib.data.collective.transformation.core.xsl.ext.TransformationFunctionProxy" xmlns:dr="http://www.driver-repository.eu/namespace/dr" xmlns:dc="http://purl.org/dc/elements/1.1/" exclude-result-prefixes="xs TransformationFunction" extension-element-prefixes="date TransformationFunction" version="2.0">
16
                        <xsl:output indent="yes" omit-xml-declaration="yes"/>
17
                        <xsl:param name="varOfficialName"/>
18
                        <xsl:param name="varDataSourceId"/>
19
                        <xsl:variable name="validationDate">
20
                            <xsl:value-of select="substring-before(//column[@name='contentUpdateDate'], ' ')"/>
21
                        </xsl:variable>
22
                        <xsl:template name="terminate">
23
                            <xsl:message terminate="yes">record is not compliant, transformation is
24
                                interrupted.
25
                            </xsl:message>
26
                        </xsl:template>
27
                        <xsl:variable name="title" select=".//column[@name='title']"/>
28
                        <xsl:variable name="deliverableType" select=".//column[@name='deliverableType']"/>
29
                        <xsl:variable name="url" select=".//column[@name='url']"/>
30
                        <xsl:variable name="description" select=".//column[@name = 'description']"/>
31
                        <xsl:variable name="project">
32
                            <xsl:choose>
33
                                <xsl:when test="ends-with(//column[@name='id']/text(), 'DELIVHORIZON')">
34
                                    <xsl:value-of select="concat('corda_____he::', .//column[@name = 'projectID'])"/>
35
                                </xsl:when>
36
                                <xsl:otherwise>
37
                                    <xsl:value-of select="concat('corda__h2020::', .//column[@name = 'projectID'])"/>
38
                                </xsl:otherwise>
39
                            </xsl:choose>
40
                        </xsl:variable>
41
                        <xsl:template match="/">
42
                            <record>
43
                                <header>
44
                                    <xsl:copy-of copy-namespaces="no" select="//*[local-name() = 'header']/*"/>
45
                                    <dr:dateOfTransformation>
46
                                        <xsl:value-of select="date:date-time()"/>
47
                                    </dr:dateOfTransformation>
48
                                </header>
49
                                <metadata>
50
                                    <xsl:if test="not(string-length(normalize-space($title)) &gt; 0)">
51
                                        <xsl:call-template name="terminate"/>
52
                                    </xsl:if>
53
                                    <dc:identifier>
54
                                        <xsl:value-of select="$url"/>
55
                                    </dc:identifier>
56
                                    <dc:title>
57
                                        <xsl:value-of select="normalize-space($title)"/>
58
                                    </dc:title>
59
                                    <oaf:accessrights>
60
                                        <xsl:value-of select="'OPEN'"/>
61
                                    </oaf:accessrights>
62
                                    <oaf:hostedBy id="openaire____::participantPortal" name="European Commission Participant Portal"/>
63
                                    <dc:type>
64
                                        <xsl:value-of select="$deliverableType"/>
65
                                    </dc:type>
66
                                    <xsl:choose>
67
                                        <xsl:when test="contains(lower-case($title), 'data management plan')">
68
                                            <dr:CobjCategory>
69
                                                <xsl:attribute name="type">
70
                                                    <xsl:value-of select="string('publication')"/>
71
                                                </xsl:attribute>
72
                                                <xsl:value-of select="string('0045')"/>
73
                                            </dr:CobjCategory>
74
                                        </xsl:when>
75
                                        <xsl:otherwise>
76
                                            <dr:CobjCategory>
77
                                                <xsl:attribute name="type">
78
                                                    <xsl:value-of select="string('publication')"/>
79
                                                </xsl:attribute>
80
                                                <xsl:value-of select="string('0034')"/>
81
                                            </dr:CobjCategory>
82
                                        </xsl:otherwise>
83
                                    </xsl:choose>
84
                                    <dc:description>
85
                                        <xsl:value-of select="$description"/>
86
                                    </dc:description>
87
                                    <oaf:projectid>
88
                                        <xsl:attribute name="validationDate">
89
                                            <xsl:value-of select="$validationDate"/>
90
                                        </xsl:attribute>
91
                                        <xsl:value-of select="$project"/>
92
                                    </oaf:projectid>
93
                                    <oaf:collectedFrom>
94
                                        <xsl:attribute name="name">
95
                                            <xsl:value-of select="$varOfficialName"/>
96
                                        </xsl:attribute>
97
                                        <xsl:attribute name="id">
98
                                            <xsl:value-of select="$varDataSourceId"/>
99
                                        </xsl:attribute>
100
                                    </oaf:collectedFrom>
101
                                </metadata>
102
                                <xsl:copy-of copy-namespaces="no" select="//*[local-name() = 'about']/*"/>
103
                            </record>
104
                        </xsl:template>
105
                        <xsl:template match="* | @*"/>
106
                    </xsl:stylesheet>
107
                </CODE>
108
            </SCRIPT>
109
        </CONFIGURATION>
110
        <STATUS/>
111
        <SECURITY_PARAMETERS/>
112
    </BODY>
113
</RESOURCE_PROFILE>
(18-18/18)