1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
3
|
|
4
|
<xsl:param name="parentDatasourceId"/>
|
5
|
|
6
|
<xsl:template name="dateCorda">
|
7
|
<xsl:param name="datename"/>
|
8
|
<xsl:param name="datevalue"/>
|
9
|
<FIELD name="{$datename}" type="date" format="dd-MMM-yyyy">
|
10
|
<xsl:value-of select="concat(substring($datevalue, 1, 2),'-',substring($datevalue,3,3),'-',substring($datevalue,6,4))"/>
|
11
|
</FIELD>
|
12
|
</xsl:template>
|
13
|
|
14
|
<xsl:variable name="namespacePrefix" select="string('ec__________')"/>
|
15
|
<xsl:variable name="funderID" select="concat($namespacePrefix, '::EC')"/>
|
16
|
|
17
|
<xsl:template match="/">
|
18
|
<record>
|
19
|
<xsl:copy-of select=".//*[local-name()='header']"/>
|
20
|
<metadata>
|
21
|
<ROWS>
|
22
|
<xsl:for-each select="//Project">
|
23
|
|
24
|
<xsl:variable name="specificName">
|
25
|
<xsl:choose>
|
26
|
<xsl:when test="normalize-space(./ProjectSpecificProgram)">
|
27
|
<xsl:value-of select="normalize-space(./ProjectSpecificProgram)"/>
|
28
|
</xsl:when>
|
29
|
<xsl:otherwise>
|
30
|
<xsl:value-of select="string('UNKNOWN')"/>
|
31
|
</xsl:otherwise>
|
32
|
</xsl:choose>
|
33
|
</xsl:variable>
|
34
|
|
35
|
<xsl:variable name="specificDesc" select="./ProjectSpecificProgramDescr"/>
|
36
|
<xsl:variable name="specificId" select="normalize-space(concat($funderID, '::FP7::', $specificName))"/>
|
37
|
|
38
|
<xsl:variable name="projectProgramName">
|
39
|
<xsl:choose>
|
40
|
<xsl:when test="normalize-space(./ProjectProgram)">
|
41
|
<xsl:value-of select="normalize-space(./ProjectProgram)"/>
|
42
|
</xsl:when>
|
43
|
<xsl:otherwise>
|
44
|
<xsl:value-of select="string('UNKNOWN')"/>
|
45
|
</xsl:otherwise>
|
46
|
</xsl:choose>
|
47
|
</xsl:variable>
|
48
|
|
49
|
<xsl:variable name="projectProgramDesc" select="./ProjectProgramDescr"/>
|
50
|
<xsl:variable name="projectProgramId" select="concat($funderID, '::FP7::', $specificName, '::', $projectProgramName)"/>
|
51
|
<xsl:variable name="projectId" select="concat('corda_______::', normalize-space(./ProjectId))"/>
|
52
|
|
53
|
<!--
|
54
|
<ROW table="fundings">
|
55
|
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="$specificId" /></FIELD>
|
56
|
<FIELD name="id"><xsl:value-of select="$specificId" /></FIELD>
|
57
|
<FIELD name="name"><xsl:value-of select="$specificName" /></FIELD>
|
58
|
<FIELD name="description"><xsl:value-of select="$specificDesc" /></FIELD>
|
59
|
<FIELD name="semanticclass">ec:specificprogram</FIELD>
|
60
|
<FIELD name="semanticscheme">ec:funding_typologies</FIELD>
|
61
|
</ROW>
|
62
|
|
63
|
<ROW table="fundings">
|
64
|
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="$projectProgramId" /></FIELD>
|
65
|
<FIELD name="id"><xsl:value-of select="$projectProgramId" /></FIELD>
|
66
|
<FIELD name="name"><xsl:value-of select="$projectProgramName" /></FIELD>
|
67
|
<FIELD name="description"><xsl:value-of select="$projectProgramDesc" /></FIELD>
|
68
|
<FIELD name="semanticclass">ec:program</FIELD>
|
69
|
<FIELD name="semanticscheme">ec:funding_typologies</FIELD>
|
70
|
</ROW>
|
71
|
|
72
|
<ROW table="funding_funding">
|
73
|
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="concat($specificId, '@@corda_______::FP7')" /></FIELD>
|
74
|
<FIELD name="funding1"><xsl:value-of select="$specificId" /></FIELD>
|
75
|
<FIELD name="funding2">corda_______::FP7</FIELD>
|
76
|
<FIELD name="semanticclass">ec:hasframeworkprogram</FIELD>
|
77
|
<FIELD name="semanticscheme">ec:funding_relations</FIELD>
|
78
|
</ROW>
|
79
|
|
80
|
<ROW table="funding_funding">
|
81
|
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="concat($projectProgramId, '@@', $specificId)" /></FIELD>
|
82
|
<FIELD name="funding1"><xsl:value-of select="$projectProgramId" /></FIELD>
|
83
|
<FIELD name="funding2"><xsl:value-of select="$specificId" /></FIELD>
|
84
|
<FIELD name="semanticclass">ec:hasspecificprogram</FIELD>
|
85
|
<FIELD name="semanticscheme">ec:funding_relations</FIELD>
|
86
|
</ROW>
|
87
|
-->
|
88
|
|
89
|
<ROW table="projects">
|
90
|
<FIELD name="_dnet_resource_identifier_">
|
91
|
<xsl:value-of select="$projectId"/>
|
92
|
</FIELD>
|
93
|
<FIELD name="id">
|
94
|
<xsl:value-of select="$projectId"/>
|
95
|
</FIELD>
|
96
|
<FIELD name="code">
|
97
|
<xsl:value-of select="./ProjectId"/>
|
98
|
</FIELD>
|
99
|
<FIELD name="acronym">
|
100
|
<xsl:value-of select="./ProjectAcronym"/>
|
101
|
</FIELD>
|
102
|
<FIELD name="title">
|
103
|
<xsl:value-of select="./ProjectTitle"/>
|
104
|
</FIELD>
|
105
|
<xsl:call-template name="dateCorda">
|
106
|
<xsl:with-param name="datename">startdate</xsl:with-param>
|
107
|
<xsl:with-param name="datevalue" select="./ProjectStartDate"></xsl:with-param>
|
108
|
</xsl:call-template>
|
109
|
<xsl:call-template name="dateCorda">
|
110
|
<xsl:with-param name="datename">enddate</xsl:with-param>
|
111
|
<xsl:with-param name="datevalue" select="./ProjectEndDate"></xsl:with-param>
|
112
|
</xsl:call-template>
|
113
|
<FIELD name="call_identifier">
|
114
|
<xsl:value-of select="./ProjectCallIdentifier"/>
|
115
|
</FIELD>
|
116
|
<FIELD name="ec_sc39" type="boolean">
|
117
|
<xsl:value-of select="./SpecialClause39"/>
|
118
|
</FIELD>
|
119
|
<FIELD name="oa_mandate_for_publications" type="boolean">
|
120
|
<xsl:value-of select="./SpecialClause39"/>
|
121
|
</FIELD>
|
122
|
<FIELD name="collectedfrom">
|
123
|
<xsl:value-of select="$parentDatasourceId"/>
|
124
|
</FIELD>
|
125
|
<FIELD name="contracttypeclass">
|
126
|
<xsl:value-of select="./ProjectFundingScheme"/>
|
127
|
</FIELD>
|
128
|
<FIELD name="contracttypescheme">ec:FP7contractTypes</FIELD>
|
129
|
<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD>
|
130
|
<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD>
|
131
|
<FIELD name="websiteurl">
|
132
|
<xsl:value-of select="./ProjectInternetAddress"/>
|
133
|
</FIELD>
|
134
|
<FIELD name="optional1">
|
135
|
<xsl:value-of select="./ProjectSubFundingScheme"/>
|
136
|
</FIELD>
|
137
|
<FIELD name="optional2">
|
138
|
<xsl:value-of select="./ProjectCallWebpageUrl"/>
|
139
|
</FIELD>
|
140
|
<xsl:variable name="personSurname" select="normalize-space(./CoordinatorContactPerson/PersonLastName)"/>
|
141
|
<xsl:variable name="personFirstName" select="normalize-space(./CoordinatorContactPerson/PersonFirstName)"/>
|
142
|
<xsl:variable name="contactfullname">
|
143
|
<xsl:choose>
|
144
|
<xsl:when test="string-length($personFirstName) > 0 and string-length($personSurname) > 0">
|
145
|
<xsl:value-of select="normalize-space(concat($personSurname, ', ', $personFirstName))"/>
|
146
|
</xsl:when>
|
147
|
<xsl:when test="string-length($personFirstName) > 0">
|
148
|
<xsl:value-of select="$personFirstName"/>
|
149
|
</xsl:when>
|
150
|
<xsl:when test="string-length($personSurname) > 0">
|
151
|
<xsl:value-of select="$personSurname"/>
|
152
|
</xsl:when>
|
153
|
<xsl:otherwise>
|
154
|
<xsl:value-of select="''"/>
|
155
|
</xsl:otherwise>
|
156
|
</xsl:choose>
|
157
|
</xsl:variable>
|
158
|
<xsl:if test="string-length($contactfullname) > 0">
|
159
|
<FIELD name="contactfullname">
|
160
|
<xsl:value-of select="$contactfullname"/>
|
161
|
</FIELD>
|
162
|
</xsl:if>
|
163
|
<xsl:variable name="contactfax" select="normalize-space(./CoordinatorContactPerson/ContactFax)"/>
|
164
|
<xsl:if test="string-length($contactfax) > 0">
|
165
|
<FIELD name="contactfax">
|
166
|
<xsl:value-of select="$contactfax"/>
|
167
|
</FIELD>
|
168
|
</xsl:if>
|
169
|
<xsl:variable name="contactphone" select="normalize-space(./CoordinatorContactPerson/ContactPhone)"/>
|
170
|
<xsl:if test="string-length($contactphone) > 0">
|
171
|
<FIELD name="contactphone">
|
172
|
<xsl:value-of select="$contactphone"/>
|
173
|
</FIELD>
|
174
|
</xsl:if>
|
175
|
<xsl:variable name="contactemail" select="normalize-space(./CoordinatorContactPerson/ContactEmail)"/>
|
176
|
<xsl:if test="string-length($contactemail) > 0">
|
177
|
<FIELD name="contactemail">
|
178
|
<xsl:value-of select="$contactemail"/>
|
179
|
</FIELD>
|
180
|
</xsl:if>
|
181
|
</ROW>
|
182
|
|
183
|
<!--
|
184
|
<ROW table="project_funding">
|
185
|
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="concat($projectProgramId, '@@', $projectId)" /></FIELD>
|
186
|
<FIELD name="funding"><xsl:value-of select="$projectProgramId" /></FIELD>
|
187
|
<FIELD name="project"><xsl:value-of select="$projectId" /></FIELD>
|
188
|
<xsl:call-template name="dateCorda">
|
189
|
<xsl:with-param name="datename">startdate</xsl:with-param>
|
190
|
<xsl:with-param name="datevalue" select="./ProjectStartDate"></xsl:with-param>
|
191
|
</xsl:call-template>
|
192
|
<xsl:call-template name="dateCorda">
|
193
|
<xsl:with-param name="datename">enddate</xsl:with-param>
|
194
|
<xsl:with-param name="datevalue" select="./ProjectEndDate"></xsl:with-param>
|
195
|
</xsl:call-template>
|
196
|
<FIELD name="semanticclass"><xsl:value-of select="./ProjectFundingScheme" /></FIELD>
|
197
|
<FIELD name="semanticscheme">ec:FP7contractTypes</FIELD>
|
198
|
</ROW>
|
199
|
-->
|
200
|
|
201
|
<ROW table="project_fundingpath">
|
202
|
<FIELD name="_dnet_resource_identifier_">
|
203
|
<xsl:value-of select="concat($projectProgramId, '@@', $projectId)"/>
|
204
|
</FIELD>
|
205
|
<FIELD name="funding">
|
206
|
<xsl:value-of select="$projectProgramId"/>
|
207
|
</FIELD>
|
208
|
<FIELD name="project">
|
209
|
<xsl:value-of select="$projectId"/>
|
210
|
</FIELD>
|
211
|
<xsl:call-template name="dateCorda">
|
212
|
<xsl:with-param name="datename">startdate</xsl:with-param>
|
213
|
<xsl:with-param name="datevalue" select="./ProjectStartDate"></xsl:with-param>
|
214
|
</xsl:call-template>
|
215
|
<xsl:call-template name="dateCorda">
|
216
|
<xsl:with-param name="datename">enddate</xsl:with-param>
|
217
|
<xsl:with-param name="datevalue" select="./ProjectEndDate"></xsl:with-param>
|
218
|
</xsl:call-template>
|
219
|
<FIELD name="semanticclass">
|
220
|
<xsl:value-of select="./ProjectFundingScheme"/>
|
221
|
</FIELD>
|
222
|
<FIELD name="semanticscheme">ec:FP7contractTypes</FIELD>
|
223
|
</ROW>
|
224
|
</xsl:for-each>
|
225
|
|
226
|
<xsl:for-each select="//OrganisationParticipant">
|
227
|
<xsl:variable name="organizationId" select="concat('corda_______::', ./OrganisationPIC)"/>
|
228
|
<xsl:variable name="projectId" select="concat('corda_______::', normalize-space(../ProjectId))"/>
|
229
|
<xsl:variable name="whitelist" select="'0123456789'"/>
|
230
|
<ROW table="organizations">
|
231
|
<FIELD name="_dnet_resource_identifier_">
|
232
|
<xsl:value-of select="$organizationId"/>
|
233
|
</FIELD>
|
234
|
<FIELD name="id">
|
235
|
<xsl:value-of select="$organizationId"/>
|
236
|
</FIELD>
|
237
|
<FIELD name="legalshortname">
|
238
|
<xsl:value-of select="./OrganisationShortName"/>
|
239
|
</FIELD>
|
240
|
<FIELD name="legalname">
|
241
|
<xsl:value-of select="./OrganisationLegalName"/>
|
242
|
</FIELD>
|
243
|
<FIELD name="websiteurl">
|
244
|
<xsl:choose>
|
245
|
<xsl:when test="starts-with(normalize-space(./OrganisationWebPage), 'http')">
|
246
|
<xsl:value-of select="./OrganisationWebPage"/>
|
247
|
</xsl:when>
|
248
|
<xsl:when test="string-length(normalize-space(./OrganisationWebPage)) > 0">
|
249
|
<xsl:value-of select="concat('http://', normalize-space(./OrganisationWebPage))"/>
|
250
|
</xsl:when>
|
251
|
</xsl:choose>
|
252
|
</FIELD>
|
253
|
<FIELD name="ec_legalbody" type="boolean">
|
254
|
<xsl:value-of select="./PublicBody"/>
|
255
|
</FIELD>
|
256
|
<FIELD name="ec_legalperson" type="boolean">
|
257
|
<xsl:value-of select="./LegalPerson"/>
|
258
|
</FIELD>
|
259
|
<FIELD name="ec_nonprofit" type="boolean">
|
260
|
<xsl:value-of select="./NonProfit"/>
|
261
|
</FIELD>
|
262
|
<FIELD name="ec_researchorganization" type="boolean">
|
263
|
<xsl:value-of select="./ResearchOrganisation"/>
|
264
|
</FIELD>
|
265
|
<FIELD name="ec_highereducation" type="boolean">
|
266
|
<xsl:value-of select="./HigherEducation"/>
|
267
|
</FIELD>
|
268
|
<FIELD name="ec_internationalorganizationeurinterests" type="boolean">
|
269
|
<xsl:value-of select="./InternationalOrgEurInterest"/>
|
270
|
</FIELD>
|
271
|
<FIELD name="ec_internationalorganization" type="boolean">
|
272
|
<xsl:value-of select="./InternationalOrgEurInterest"/>
|
273
|
</FIELD>
|
274
|
<FIELD name="ec_enterprise" type="boolean">
|
275
|
<xsl:value-of select="./Enterprise"/>
|
276
|
</FIELD>
|
277
|
<FIELD name="ec_smevalidated" type="boolean">
|
278
|
<xsl:value-of select="./SMEValidated"/>
|
279
|
</FIELD>
|
280
|
<FIELD name="countryclass">
|
281
|
<xsl:value-of select="./OrganisationCountry"/>
|
282
|
</FIELD>
|
283
|
<FIELD name="countryscheme">dnet:countries</FIELD>
|
284
|
<FIELD name="collectedfrom">
|
285
|
<xsl:value-of select="$parentDatasourceId"/>
|
286
|
</FIELD>
|
287
|
<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD>
|
288
|
<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD>
|
289
|
<FIELD name="trust" type="float">
|
290
|
<xsl:value-of select="0.8"/>
|
291
|
</FIELD>
|
292
|
</ROW>
|
293
|
|
294
|
<ROW table="project_organization">
|
295
|
<FIELD name="_dnet_resource_identifier_">
|
296
|
<xsl:value-of select='concat($projectId, "@@", $organizationId)'/>
|
297
|
</FIELD>
|
298
|
<xsl:choose>
|
299
|
<xsl:when test="string-length(translate(./ParticipantOrder, $whitelist, '')) > 0">
|
300
|
<FIELD name="participantnumber" type="int">9999</FIELD>
|
301
|
</xsl:when>
|
302
|
<xsl:otherwise>
|
303
|
<FIELD name="participantnumber" type="int">
|
304
|
<xsl:value-of select="./ParticipantOrder"/>
|
305
|
</FIELD>
|
306
|
</xsl:otherwise>
|
307
|
</xsl:choose>
|
308
|
<FIELD name="project">
|
309
|
<xsl:value-of select="$projectId"/>
|
310
|
</FIELD>
|
311
|
<FIELD name="resporganization">
|
312
|
<xsl:value-of select="$organizationId"/>
|
313
|
</FIELD>
|
314
|
<xsl:choose>
|
315
|
<xsl:when test="./ParticipantOrder = 1">
|
316
|
<FIELD name="semanticclass">coordinator</FIELD>
|
317
|
</xsl:when>
|
318
|
<xsl:otherwise>
|
319
|
<FIELD name="semanticclass">participant</FIELD>
|
320
|
</xsl:otherwise>
|
321
|
</xsl:choose>
|
322
|
<FIELD name="semanticscheme">dnet:project_organization_relations</FIELD>
|
323
|
</ROW>
|
324
|
</xsl:for-each>
|
325
|
</ROWS>
|
326
|
</metadata>
|
327
|
</record>
|
328
|
</xsl:template>
|
329
|
</xsl:stylesheet>
|