1 |
52327
|
alessia.ba
|
<RESOURCE_PROFILE>
|
2 |
53143
|
alessia.ba
|
<HEADER>
|
3 |
|
|
<RESOURCE_IDENTIFIER value="76843fdc-3179-40b9-b906-2366f4210be7_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
|
4 |
|
|
<RESOURCE_TYPE value="TransformationRuleDSResourceType"/>
|
5 |
|
|
<RESOURCE_KIND value="TransformationRuleDSResources"/>
|
6 |
|
|
<RESOURCE_URI value=""/>
|
7 |
|
|
<DATE_OF_CREATION value="2018-06-04T11:15:30+00:00"/>
|
8 |
|
|
</HEADER>
|
9 |
|
|
<BODY>
|
10 |
|
|
<CONFIGURATION>
|
11 |
|
|
<IMPORTED/>
|
12 |
|
|
<SCRIPT>
|
13 |
|
|
<TITLE>AKA to DB</TITLE>
|
14 |
|
|
<CODE>
|
15 |
|
|
<![CDATA[
|
16 |
49040
|
miriam.bag
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
17 |
|
|
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:utils="eu.dnetlib.data.transform.xml.AbstractDNetXsltFunctions"
|
18 |
|
|
exclude-result-prefixes="xs" version="2.0">
|
19 |
|
|
|
20 |
52370
|
miriam.bag
|
<xsl:param name="varDataSourceId"/>
|
21 |
|
|
<xsl:variable name="namespacePrefix" select="string('aka_________')"/>
|
22 |
49040
|
miriam.bag
|
|
23 |
51380
|
miriam.bag
|
<xsl:variable name="funderID" select="concat($namespacePrefix, '::AKA')"/>
|
24 |
49040
|
miriam.bag
|
|
25 |
|
|
|
26 |
52332
|
miriam.bag
|
<!--<xsl:variable name="stream" select="normalize-space(.//column[@name='FUNDING STREAM(S)'])"/>-->
|
27 |
49040
|
miriam.bag
|
<xsl:variable name="fundingID">
|
28 |
|
|
|
29 |
|
|
<xsl:value-of select="$funderID"/>
|
30 |
|
|
</xsl:variable>
|
31 |
|
|
|
32 |
|
|
<xsl:variable name="projectId" select="concat($namespacePrefix, '::', normalize-space(.//column[@name='Decision No.']))"/>
|
33 |
|
|
|
34 |
|
|
<xsl:variable name="fundingPeriod" select="tokenize(.//column[@name='Funding period'],'-')"/>
|
35 |
|
|
<xsl:variable name="startDate" select="normalize-space($fundingPeriod[1])"/>
|
36 |
|
|
<xsl:variable name="endDate" select="normalize-space($fundingPeriod[2])"/>
|
37 |
|
|
|
38 |
|
|
<xsl:variable name="dateFormat" select="string('dd.MM.yyyy')"/>
|
39 |
|
|
<xsl:variable name="projectTitle" select="normalize-space(.//column[@name='Project title'])"/>
|
40 |
|
|
|
41 |
|
|
<xsl:template match="/">
|
42 |
|
|
<record>
|
43 |
|
|
|
44 |
|
|
<xsl:copy-of select=".//*[local-name()='header']"/>
|
45 |
|
|
<metadata>
|
46 |
|
|
<xsl:if test="string-length($projectTitle) > 0 and string-length($projectId) > 0">
|
47 |
|
|
<ROWS>
|
48 |
|
|
<ROW table="projects">
|
49 |
|
|
<FIELD name="_dnet_resource_identifier_">
|
50 |
|
|
<xsl:value-of select="$projectId"/>
|
51 |
|
|
</FIELD>
|
52 |
|
|
<FIELD name="id">
|
53 |
|
|
<xsl:value-of select="$projectId"/>
|
54 |
|
|
</FIELD>
|
55 |
52335
|
alessia.ba
|
<FIELD name="lastupdate" type="date"><xsl:value-of select="current-dateTime()"/></FIELD>
|
56 |
49040
|
miriam.bag
|
<FIELD name="code">
|
57 |
|
|
<xsl:value-of select="normalize-space(.//column[@name='Decision No.'])"/>
|
58 |
|
|
</FIELD>
|
59 |
|
|
<FIELD name="startdate" type="date" format="{$dateFormat}">
|
60 |
|
|
<xsl:value-of select="$startDate"/>
|
61 |
|
|
</FIELD>
|
62 |
|
|
<FIELD name="enddate" type="date" format="{$dateFormat}">
|
63 |
|
|
<xsl:value-of select="$endDate"/>
|
64 |
|
|
</FIELD>
|
65 |
|
|
<FIELD name="title">
|
66 |
|
|
<xsl:value-of select="$projectTitle"/>
|
67 |
|
|
</FIELD>
|
68 |
|
|
<FIELD name="call_identifier">
|
69 |
|
|
<xsl:value-of select=".//column[@name='Call']"/>
|
70 |
|
|
</FIELD>
|
71 |
|
|
<FIELD name="optional1">
|
72 |
|
|
<xsl:value-of select="concat(.//column[@name='Funding'], ' €')"/>
|
73 |
|
|
</FIELD>
|
74 |
|
|
<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD>
|
75 |
|
|
<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD>
|
76 |
|
|
<FIELD name="collectedfrom">
|
77 |
52372
|
miriam.bag
|
<xsl:value-of select="$varDataSourceId"/>
|
78 |
49040
|
miriam.bag
|
</FIELD>
|
79 |
|
|
<FIELD name="oa_mandate_for_publications" type="boolean">false</FIELD>
|
80 |
|
|
</ROW>
|
81 |
|
|
|
82 |
|
|
<ROW table="project_fundingpath">
|
83 |
|
|
<FIELD name="_dnet_resource_identifier_">
|
84 |
|
|
<xsl:value-of select="concat($fundingID,'@@', $projectId)"/>
|
85 |
|
|
</FIELD>
|
86 |
|
|
<FIELD name="funding">
|
87 |
|
|
<xsl:value-of select="$fundingID"/>
|
88 |
|
|
</FIELD>
|
89 |
|
|
<FIELD name="project">
|
90 |
|
|
<xsl:value-of select="$projectId"/>
|
91 |
|
|
</FIELD>
|
92 |
|
|
<FIELD name="startdate" type="date" format="{$dateFormat}">
|
93 |
|
|
<xsl:value-of select="$startDate"/>
|
94 |
|
|
</FIELD>
|
95 |
|
|
<FIELD name="enddate" type="date" format="{$dateFormat}">
|
96 |
|
|
<xsl:value-of select="$endDate"/>
|
97 |
|
|
</FIELD>
|
98 |
|
|
</ROW>
|
99 |
|
|
<xsl:variable name="organizationId" select="concat($namespacePrefix,'::',utils:md5(normalize-space(.//column[@name='Organisation'])))"/>
|
100 |
53335
|
miriam.bag
|
|
101 |
52327
|
alessia.ba
|
<ROW table = "dsm_organizations">
|
102 |
49040
|
miriam.bag
|
<FIELD name="_dnet_resource_identifier_">
|
103 |
|
|
<xsl:value-of select="$organizationId"/>
|
104 |
|
|
</FIELD>
|
105 |
|
|
<FIELD name="id">
|
106 |
|
|
<xsl:value-of select="$organizationId"/>
|
107 |
|
|
</FIELD>
|
108 |
|
|
<FIELD name="legalname">
|
109 |
|
|
<xsl:value-of select="normalize-space(.//column[@name='Organisation'])"/>
|
110 |
|
|
</FIELD>
|
111 |
53335
|
miriam.bag
|
<FIELD name="country">
|
112 |
|
|
<xsl:value-of select="string('FI')"/>
|
113 |
|
|
</FIELD>
|
114 |
49040
|
miriam.bag
|
<FIELD name="collectedfrom">
|
115 |
52372
|
miriam.bag
|
<xsl:value-of select="$varDataSourceId"/>
|
116 |
49040
|
miriam.bag
|
</FIELD>
|
117 |
52335
|
alessia.ba
|
<FIELD name="lastupdate" type="date"><xsl:value-of select="current-dateTime()"/></FIELD>
|
118 |
52337
|
miriam.bag
|
<FIELD name="provenanceaction">sysimport:crosswalk:entityregistry</FIELD>
|
119 |
49040
|
miriam.bag
|
</ROW>
|
120 |
|
|
<ROW table="project_organization">
|
121 |
|
|
<FIELD name="_dnet_resource_identifier_">
|
122 |
|
|
<xsl:value-of select='concat($projectId, "@@", $organizationId)'/>
|
123 |
|
|
</FIELD>
|
124 |
|
|
<FIELD name="project">
|
125 |
|
|
<xsl:value-of select="$projectId"/>
|
126 |
|
|
</FIELD>
|
127 |
52369
|
miriam.bag
|
<FIELD name="resporganization">
|
128 |
49040
|
miriam.bag
|
<xsl:value-of select="$organizationId"/>
|
129 |
|
|
</FIELD>
|
130 |
52369
|
miriam.bag
|
<FIELD name="semanticclass">coordinator</FIELD>
|
131 |
49040
|
miriam.bag
|
</ROW>
|
132 |
|
|
</ROWS>
|
133 |
|
|
</xsl:if>
|
134 |
|
|
</metadata>
|
135 |
|
|
</record>
|
136 |
|
|
|
137 |
|
|
</xsl:template>
|
138 |
52327
|
alessia.ba
|
</xsl:stylesheet>
|
139 |
53143
|
alessia.ba
|
]]>
|
140 |
|
|
</CODE>
|
141 |
|
|
</SCRIPT>
|
142 |
|
|
</CONFIGURATION>
|
143 |
|
|
<STATUS/>
|
144 |
|
|
<SECURITY_PARAMETERS>SECURITY_PARAMETERS</SECURITY_PARAMETERS>
|
145 |
|
|
</BODY>
|
146 |
52327
|
alessia.ba
|
</RESOURCE_PROFILE>
|