1 |
52327
|
alessia.ba
|
<RESOURCE_PROFILE>
|
2 |
|
|
<HEADER>
|
3 |
52416
|
alessia.ba
|
<RESOURCE_IDENTIFIER value="59a88ce6-8352-4106-8629-bbfd29453714_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
|
4 |
52327
|
alessia.ba
|
<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>SFI to DB</TITLE>
|
14 |
|
|
<CODE>
|
15 |
53143
|
alessia.ba
|
<![CDATA[
|
16 |
38509
|
michele.ar
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
17 |
60429
|
miriam.bag
|
xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="2.0">
|
18 |
38509
|
michele.ar
|
|
19 |
60429
|
miriam.bag
|
<xsl:param name="varDataSourceId"/>
|
20 |
|
|
<xsl:variable name="namespacePrefix" select="string('sfi_________')"/>
|
21 |
48139
|
alessia.ba
|
|
22 |
60429
|
miriam.bag
|
<xsl:template match="/">
|
23 |
|
|
<record>
|
24 |
38509
|
michele.ar
|
|
25 |
60429
|
miriam.bag
|
<xsl:copy-of select=".//*[local-name() = 'header']"/>
|
26 |
38509
|
michele.ar
|
|
27 |
60429
|
miriam.bag
|
<metadata>
|
28 |
|
|
<ROWS>
|
29 |
|
|
<xsl:if
|
30 |
|
|
test="normalize-space(.//column[@name = 'Proposal ID']) and normalize-space(.//column[@name = 'Proposal Title'])">
|
31 |
|
|
<xsl:variable name="projectId"
|
32 |
|
|
select="concat($namespacePrefix, '::', normalize-space(.//column[@name = 'Proposal ID']))"/>
|
33 |
|
|
<xsl:variable name="startDate" select=".//column[@name = 'Start Date']"/>
|
34 |
|
|
<xsl:variable name="endDate" select=".//column[@name = 'End Date']"/>
|
35 |
|
|
<ROW table="projects">
|
36 |
|
|
<FIELD name="_dnet_resource_identifier_">
|
37 |
|
|
<xsl:value-of select="$projectId"/>
|
38 |
|
|
</FIELD>
|
39 |
|
|
<FIELD name="id">
|
40 |
|
|
<xsl:value-of select="$projectId"/>
|
41 |
|
|
</FIELD>
|
42 |
|
|
<FIELD name="code">
|
43 |
|
|
<xsl:value-of select=".//column[@name = 'Proposal ID']"/>
|
44 |
|
|
</FIELD>
|
45 |
|
|
<FIELD name="title">
|
46 |
|
|
<xsl:value-of select=".//column[@name = 'Proposal Title']"/>
|
47 |
|
|
</FIELD>
|
48 |
|
|
<FIELD name="startdate" type="date" format="dd/MM/yyyy">
|
49 |
|
|
<xsl:value-of select="$startDate"/>
|
50 |
|
|
</FIELD>
|
51 |
|
|
<FIELD name="enddate" type="date" format="dd/MM/yyyy">
|
52 |
|
|
<xsl:value-of select="$endDate"/>
|
53 |
|
|
</FIELD>
|
54 |
|
|
<FIELD name="collectedfrom">
|
55 |
|
|
<xsl:value-of select="$varDataSourceId"/>
|
56 |
|
|
</FIELD>
|
57 |
|
|
<FIELD name="fundedamount" type="float">
|
58 |
|
|
<xsl:value-of select=".//column[@name= 'Revised Total Commitment']"/>
|
59 |
|
|
</FIELD>
|
60 |
|
|
<FIELD name="currency">
|
61 |
|
|
<xsl:value-of select="string('EUR')"/>
|
62 |
|
|
</FIELD>
|
63 |
|
|
<xsl:if
|
64 |
|
|
test="normalize-space(.//column[@name='Lead Applicant'])">
|
65 |
|
|
<FIELD name="contactfullname">
|
66 |
|
|
<xsl:value-of select="normalize-space(.//column[@name='Lead Applicant'])"/>
|
67 |
|
|
</FIELD>
|
68 |
|
|
</xsl:if>
|
69 |
|
|
<xsl:if test="normalize-space(.//column[@name='ORCID'])">
|
70 |
|
|
<FIELD name="optional1">
|
71 |
|
|
<xsl:value-of select="normalize-space(.//column[@name='ORCID'])"/>
|
72 |
|
|
</FIELD>
|
73 |
|
|
</xsl:if>
|
74 |
|
|
<FIELD name="provenanceactionclass"
|
75 |
|
|
>sysimport:crosswalk:entityregistry</FIELD>
|
76 |
|
|
<!-- 30/06/2016 must be converted into 2016-06-30-->
|
77 |
|
|
<xsl:variable name="date"
|
78 |
|
|
select="
|
79 |
|
|
xs:date(concat(
|
80 |
|
|
substring($startDate, 7, 4), '-',
|
81 |
|
|
substring($startDate, 4, 2), '-',
|
82 |
|
|
substring($startDate, 1, 2)))"/>
|
83 |
|
|
<FIELD name="oa_mandate_for_publications" type="boolean">
|
84 |
|
|
<xsl:value-of select="$date >= xs:date('2009-01-01')"/>
|
85 |
|
|
</FIELD>
|
86 |
|
|
<FIELD name="lastupdate" type="date">
|
87 |
|
|
<xsl:value-of select="current-dateTime()"/>
|
88 |
|
|
</FIELD>
|
89 |
|
|
</ROW>
|
90 |
48139
|
alessia.ba
|
|
91 |
60429
|
miriam.bag
|
<xsl:if test="normalize-space(.//column[@name = 'Programme Name'])">
|
92 |
|
|
<xsl:variable name="funderId" select="concat($namespacePrefix, '::SFI')"/>
|
93 |
|
|
<xsl:choose>
|
94 |
|
|
<xsl:when test="normalize-space(.//column[@name='Sub-programme Name'])">
|
95 |
|
|
<xsl:variable name="fundingId"
|
96 |
|
|
select="concat($funderId, '::', normalize-space(.//column[@name = 'Programme Name']), '::', normalize-space(.//column[@name='Sub-programme Name']))"/>
|
97 |
|
|
<ROW table="project_fundingpath">
|
98 |
|
|
<FIELD name="_dnet_resource_identifier_">
|
99 |
|
|
<xsl:value-of select="concat($fundingId, '@@', $projectId)"/>
|
100 |
|
|
</FIELD>
|
101 |
|
|
<FIELD name="funding">
|
102 |
|
|
<xsl:value-of select="$fundingId"/>
|
103 |
|
|
</FIELD>
|
104 |
|
|
<FIELD name="project">
|
105 |
|
|
<xsl:value-of select="$projectId"/>
|
106 |
|
|
</FIELD>
|
107 |
|
|
<FIELD name="startdate" type="date" format="dd/MM/yyyy">
|
108 |
|
|
<xsl:value-of select="$startDate"/>
|
109 |
|
|
</FIELD>
|
110 |
|
|
<FIELD name="enddate" type="date" format="dd/MM/yyyy">
|
111 |
|
|
<xsl:value-of select="$endDate"/>
|
112 |
|
|
</FIELD>
|
113 |
|
|
</ROW>
|
114 |
|
|
</xsl:when>
|
115 |
|
|
<xsl:otherwise>
|
116 |
|
|
<xsl:variable name="fundingId"
|
117 |
|
|
select="concat($funderId, '::', normalize-space(.//column[@name = 'Programme Name']))"/>
|
118 |
|
|
<ROW table="project_fundingpath">
|
119 |
|
|
<FIELD name="_dnet_resource_identifier_">
|
120 |
|
|
<xsl:value-of select="concat($fundingId, '@@', $projectId)"/>
|
121 |
|
|
</FIELD>
|
122 |
|
|
<FIELD name="funding">
|
123 |
|
|
<xsl:value-of select="$fundingId"/>
|
124 |
|
|
</FIELD>
|
125 |
|
|
<FIELD name="project">
|
126 |
|
|
<xsl:value-of select="$projectId"/>
|
127 |
|
|
</FIELD>
|
128 |
|
|
<FIELD name="startdate" type="date" format="dd/MM/yyyy">
|
129 |
|
|
<xsl:value-of select="$startDate"/>
|
130 |
|
|
</FIELD>
|
131 |
|
|
<FIELD name="enddate" type="date" format="dd/MM/yyyy">
|
132 |
|
|
<xsl:value-of select="$endDate"/>
|
133 |
|
|
</FIELD>
|
134 |
|
|
</ROW>
|
135 |
|
|
</xsl:otherwise>
|
136 |
48139
|
alessia.ba
|
|
137 |
60429
|
miriam.bag
|
</xsl:choose>
|
138 |
53335
|
miriam.bag
|
|
139 |
60429
|
miriam.bag
|
</xsl:if>
|
140 |
38509
|
michele.ar
|
|
141 |
60429
|
miriam.bag
|
<xsl:if test="normalize-space(.//column[@name = 'Research Body'])">
|
142 |
|
|
<xsl:variable name="organizationId"
|
143 |
|
|
select="concat($namespacePrefix, '::', normalize-space(.//column[@name = 'Research Body']))"/>
|
144 |
|
|
<ROW table="dsm_organizations">
|
145 |
|
|
<FIELD name="_dnet_resource_identifier_">
|
146 |
|
|
<xsl:value-of select="$organizationId"/>
|
147 |
|
|
</FIELD>
|
148 |
|
|
<FIELD name="id">
|
149 |
|
|
<xsl:value-of select="$organizationId"/>
|
150 |
|
|
</FIELD>
|
151 |
|
|
<FIELD name="legalname">
|
152 |
|
|
<xsl:value-of select=".//column[@name = 'Research Body']"/>
|
153 |
|
|
</FIELD>
|
154 |
|
|
<FIELD name="country">IE</FIELD>
|
155 |
|
|
|
156 |
|
|
<FIELD name="collectedfrom">
|
157 |
|
|
<xsl:value-of select="$varDataSourceId"/>
|
158 |
|
|
</FIELD>
|
159 |
|
|
<FIELD name="provenanceaction"
|
160 |
|
|
>sysimport:crosswalk:entityregistry</FIELD>
|
161 |
|
|
<FIELD name="lastupdate" type="date">
|
162 |
|
|
<xsl:value-of select="current-dateTime()"/>
|
163 |
|
|
</FIELD>
|
164 |
|
|
</ROW>
|
165 |
|
|
<ROW table="project_organization">
|
166 |
|
|
<FIELD name="_dnet_resource_identifier_">
|
167 |
|
|
<xsl:value-of select='concat($projectId, "@@", $organizationId)'
|
168 |
|
|
/>
|
169 |
|
|
</FIELD>
|
170 |
|
|
<FIELD name="project">
|
171 |
|
|
<xsl:value-of select="$projectId"/>
|
172 |
|
|
</FIELD>
|
173 |
|
|
<FIELD name="resporganization">
|
174 |
|
|
<xsl:value-of select="$organizationId"/>
|
175 |
|
|
</FIELD>
|
176 |
|
|
<FIELD name="participantnumber" type="int">1</FIELD>
|
177 |
|
|
<FIELD name="semanticclass">coordinator</FIELD>
|
178 |
|
|
</ROW>
|
179 |
|
|
</xsl:if>
|
180 |
|
|
</xsl:if>
|
181 |
|
|
</ROWS>
|
182 |
|
|
</metadata>
|
183 |
|
|
</record>
|
184 |
|
|
</xsl:template>
|
185 |
|
|
|
186 |
52327
|
alessia.ba
|
</xsl:stylesheet>
|
187 |
60429
|
miriam.bag
|
|
188 |
53143
|
alessia.ba
|
]]>
|
189 |
52327
|
alessia.ba
|
</CODE>
|
190 |
|
|
</SCRIPT>
|
191 |
|
|
</CONFIGURATION>
|
192 |
|
|
<STATUS/>
|
193 |
|
|
<SECURITY_PARAMETERS>SECURITY_PARAMETERS</SECURITY_PARAMETERS>
|
194 |
|
|
</BODY>
|
195 |
|
|
</RESOURCE_PROFILE>
|