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