1 |
35137
|
michele.ar
|
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
48957
|
claudio.at
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
3 |
48139
|
alessia.ba
|
|
4 |
|
|
<xsl:param name="parentDatasourceId"/>
|
5 |
|
|
|
6 |
35137
|
michele.ar
|
<xsl:template name="dateCorda">
|
7 |
48139
|
alessia.ba
|
<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 |
35137
|
michele.ar
|
</xsl:template>
|
13 |
48139
|
alessia.ba
|
|
14 |
|
|
<xsl:variable name="namespacePrefix" select="string('ec__________')"/>
|
15 |
|
|
<xsl:variable name="funderID" select="concat($namespacePrefix, '::EC')"/>
|
16 |
|
|
|
17 |
35137
|
michele.ar
|
<xsl:template match="/">
|
18 |
48957
|
claudio.at
|
<record>
|
19 |
48139
|
alessia.ba
|
|
20 |
35137
|
michele.ar
|
<xsl:copy-of select=".//*[local-name()='header']"/>
|
21 |
48139
|
alessia.ba
|
|
22 |
35137
|
michele.ar
|
<metadata>
|
23 |
|
|
<ROWS>
|
24 |
38061
|
michele.ar
|
<xsl:for-each select="//Project">
|
25 |
43196
|
alessia.ba
|
|
26 |
|
|
<xsl:variable name="toaCode" select="./ProjectTOACode"/>
|
27 |
|
|
<xsl:variable name="fundingId">
|
28 |
|
|
<xsl:choose>
|
29 |
|
|
<xsl:when test="$toaCode and starts-with($toaCode, 'ERC-')">
|
30 |
|
|
<xsl:value-of select="concat($funderID, '::H2020::ERC::', $toaCode)"/>
|
31 |
|
|
</xsl:when>
|
32 |
|
|
<xsl:when test="$toaCode and not(starts-with($toaCode, 'ERC-'))">
|
33 |
|
|
<xsl:value-of select="concat($funderID, '::H2020::', $toaCode)"/>
|
34 |
|
|
</xsl:when>
|
35 |
|
|
<xsl:otherwise>
|
36 |
|
|
<xsl:value-of select="concat($funderID, '::H2020')"/>
|
37 |
|
|
</xsl:otherwise>
|
38 |
|
|
</xsl:choose>
|
39 |
|
|
</xsl:variable>
|
40 |
38061
|
michele.ar
|
<xsl:variable name="projectId" select="concat('corda__h2020::', normalize-space(./ProjectId))"/>
|
41 |
48139
|
alessia.ba
|
|
42 |
38144
|
michele.ar
|
<ROW table="projects">
|
43 |
48139
|
alessia.ba
|
<FIELD name="_dnet_resource_identifier_">
|
44 |
|
|
<xsl:value-of select="$projectId"/>
|
45 |
|
|
</FIELD>
|
46 |
|
|
<FIELD name="id">
|
47 |
|
|
<xsl:value-of select="$projectId"/>
|
48 |
|
|
</FIELD>
|
49 |
|
|
<FIELD name="code">
|
50 |
|
|
<xsl:value-of select="./ProjectId"/>
|
51 |
|
|
</FIELD>
|
52 |
|
|
<FIELD name="acronym">
|
53 |
|
|
<xsl:value-of select="./ProjectAcronym"/>
|
54 |
|
|
</FIELD>
|
55 |
|
|
<FIELD name="title">
|
56 |
|
|
<xsl:value-of select="./ProjectTitle"/>
|
57 |
|
|
</FIELD>
|
58 |
38144
|
michele.ar
|
<xsl:call-template name="dateCorda">
|
59 |
|
|
<xsl:with-param name="datename">startdate</xsl:with-param>
|
60 |
|
|
<xsl:with-param name="datevalue" select="./ProjectStartDate"></xsl:with-param>
|
61 |
|
|
</xsl:call-template>
|
62 |
|
|
<xsl:call-template name="dateCorda">
|
63 |
|
|
<xsl:with-param name="datename">enddate</xsl:with-param>
|
64 |
|
|
<xsl:with-param name="datevalue" select="./ProjectEndDate"></xsl:with-param>
|
65 |
48139
|
alessia.ba
|
</xsl:call-template>
|
66 |
|
|
<FIELD name="call_identifier">
|
67 |
|
|
<xsl:value-of select="./ProjectCallIdentifier"/>
|
68 |
|
|
</FIELD>
|
69 |
38144
|
michele.ar
|
<FIELD name="oa_mandate_for_publications" type="boolean">true</FIELD>
|
70 |
48139
|
alessia.ba
|
<FIELD name="ec_article29_3" type="boolean">
|
71 |
|
|
<xsl:value-of select="./Article29-3"/>
|
72 |
|
|
</FIELD>
|
73 |
|
|
<FIELD name="collectedfrom">
|
74 |
|
|
<xsl:value-of select="$parentDatasourceId"/>
|
75 |
|
|
</FIELD>
|
76 |
|
|
<FIELD name="contracttypeclass">
|
77 |
|
|
<xsl:value-of select="./ProjectTOACode"/>
|
78 |
|
|
</FIELD>
|
79 |
38144
|
michele.ar
|
<FIELD name="contracttypescheme">ec:h2020toas</FIELD>
|
80 |
|
|
<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD>
|
81 |
|
|
<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD>
|
82 |
48139
|
alessia.ba
|
<FIELD name="websiteurl">
|
83 |
|
|
<xsl:value-of select="./ProjectInternetAddress"/>
|
84 |
|
|
</FIELD>
|
85 |
|
|
<FIELD name="optional1">
|
86 |
|
|
<xsl:value-of select="./ProjectTopicCode"/>
|
87 |
|
|
</FIELD>
|
88 |
|
|
<FIELD name="optional2">
|
89 |
|
|
<xsl:value-of select="./ProjectTopicDescr"/>
|
90 |
|
|
</FIELD>
|
91 |
48957
|
claudio.at
|
<xsl:variable name="personSurname" select="normalize-space(./CoordinatorContactPerson/PersonLastName)"/>
|
92 |
|
|
<xsl:variable name="personFirstName" select="normalize-space(./CoordinatorContactPerson/PersonFirstName)"/>
|
93 |
48956
|
claudio.at
|
<xsl:variable name="contactfullname">
|
94 |
|
|
<xsl:choose>
|
95 |
|
|
<xsl:when test="string-length($personFirstName) > 0 and string-length($personSurname) > 0">
|
96 |
|
|
<xsl:value-of select="normalize-space(concat($personSurname, ', ', $personFirstName))"/>
|
97 |
|
|
</xsl:when>
|
98 |
|
|
<xsl:when test="string-length($personFirstName) > 0">
|
99 |
48957
|
claudio.at
|
<xsl:value-of select="$personFirstName"/>
|
100 |
48956
|
claudio.at
|
</xsl:when>
|
101 |
|
|
<xsl:when test="string-length($personSurname) > 0">
|
102 |
48957
|
claudio.at
|
<xsl:value-of select="$personSurname"/>
|
103 |
48956
|
claudio.at
|
</xsl:when>
|
104 |
|
|
<xsl:otherwise>
|
105 |
|
|
<xsl:value-of select="''"/>
|
106 |
|
|
</xsl:otherwise>
|
107 |
|
|
</xsl:choose>
|
108 |
|
|
</xsl:variable>
|
109 |
|
|
<xsl:if test="string-length($contactfullname) > 0">
|
110 |
|
|
<FIELD name="contactfullname">
|
111 |
|
|
<xsl:value-of select="$contactfullname"/>
|
112 |
|
|
</FIELD>
|
113 |
|
|
</xsl:if>
|
114 |
|
|
<xsl:variable name="contactfax" select="normalize-space(./CoordinatorContactPerson/ContactFax)"/>
|
115 |
|
|
<xsl:if test="string-length($contactfax) > 0">
|
116 |
|
|
<FIELD name="contactfax">
|
117 |
|
|
<xsl:value-of select="$contactfax"/>
|
118 |
|
|
</FIELD>
|
119 |
|
|
</xsl:if>
|
120 |
|
|
<xsl:variable name="contactphone" select="normalize-space(./CoordinatorContactPerson/ContactPhone)"/>
|
121 |
|
|
<xsl:if test="string-length($contactphone) > 0">
|
122 |
|
|
<FIELD name="contactphone">
|
123 |
|
|
<xsl:value-of select="$contactphone"/>
|
124 |
|
|
</FIELD>
|
125 |
|
|
</xsl:if>
|
126 |
|
|
<xsl:variable name="contactemail" select="normalize-space(./CoordinatorContactPerson/ContactEmail)"/>
|
127 |
|
|
<xsl:if test="string-length($contactemail) > 0">
|
128 |
|
|
<FIELD name="contactemail">
|
129 |
|
|
<xsl:value-of select="$contactemail"/>
|
130 |
|
|
</FIELD>
|
131 |
|
|
</xsl:if>
|
132 |
38144
|
michele.ar
|
</ROW>
|
133 |
38061
|
michele.ar
|
<xsl:for-each select="./OrganisationParticipant">
|
134 |
48139
|
alessia.ba
|
<xsl:variable name="organizationId" select="concat('corda__h2020::', ./OrganisationPIC)"/>
|
135 |
|
|
|
136 |
38061
|
michele.ar
|
<xsl:variable name="whitelist" select="'0123456789'"/>
|
137 |
35137
|
michele.ar
|
<ROW table="organizations">
|
138 |
48139
|
alessia.ba
|
<FIELD name="_dnet_resource_identifier_">
|
139 |
|
|
<xsl:value-of select="$organizationId"/>
|
140 |
|
|
</FIELD>
|
141 |
|
|
<FIELD name="id">
|
142 |
|
|
<xsl:value-of select="$organizationId"/>
|
143 |
|
|
</FIELD>
|
144 |
|
|
<FIELD name="legalshortname">
|
145 |
|
|
<xsl:value-of select="./OrganisationShortName"/>
|
146 |
|
|
</FIELD>
|
147 |
|
|
<FIELD name="legalname">
|
148 |
|
|
<xsl:value-of select="./OrganisationLegalName"/>
|
149 |
|
|
</FIELD>
|
150 |
41330
|
michele.ar
|
<FIELD name="websiteurl">
|
151 |
|
|
<xsl:choose>
|
152 |
|
|
<xsl:when test="starts-with(normalize-space(./OrganisationWebPage), 'http')">
|
153 |
48139
|
alessia.ba
|
<xsl:value-of select="./OrganisationWebPage"/>
|
154 |
41330
|
michele.ar
|
</xsl:when>
|
155 |
|
|
<xsl:when test="string-length(normalize-space(./OrganisationWebPage)) > 0">
|
156 |
48139
|
alessia.ba
|
<xsl:value-of select="concat('http://', normalize-space(./OrganisationWebPage))"/>
|
157 |
41330
|
michele.ar
|
</xsl:when>
|
158 |
|
|
</xsl:choose>
|
159 |
|
|
</FIELD>
|
160 |
48139
|
alessia.ba
|
<FIELD name="ec_legalbody" type="boolean">
|
161 |
|
|
<xsl:value-of select="./PublicBody"/>
|
162 |
|
|
</FIELD>
|
163 |
|
|
<FIELD name="ec_legalperson" type="boolean">
|
164 |
|
|
<xsl:value-of select="./LegalPerson"/>
|
165 |
|
|
</FIELD>
|
166 |
|
|
<FIELD name="ec_nonprofit" type="boolean">
|
167 |
|
|
<xsl:value-of select="./NonProfit"/>
|
168 |
|
|
</FIELD>
|
169 |
|
|
<FIELD name="ec_researchorganization" type="boolean">
|
170 |
|
|
<xsl:value-of select="./ResearchOrganisation"/>
|
171 |
|
|
</FIELD>
|
172 |
|
|
<FIELD name="ec_highereducation" type="boolean">
|
173 |
|
|
<xsl:value-of select="./HigherEducation"/>
|
174 |
|
|
</FIELD>
|
175 |
|
|
<FIELD name="ec_internationalorganizationeurinterests" type="boolean">
|
176 |
|
|
<xsl:value-of select="./InternationalOrgEurInterest"/>
|
177 |
|
|
</FIELD>
|
178 |
|
|
<FIELD name="ec_internationalorganization" type="boolean">
|
179 |
|
|
<xsl:value-of select="./InternationalOrgEurInterest"/>
|
180 |
|
|
</FIELD>
|
181 |
|
|
<FIELD name="ec_smevalidated" type="boolean">
|
182 |
|
|
<xsl:value-of select="./SMEValidated"/>
|
183 |
|
|
</FIELD>
|
184 |
|
|
<FIELD name="countryclass">
|
185 |
|
|
<xsl:value-of select="./OrganisationCountry"/>
|
186 |
|
|
</FIELD>
|
187 |
35137
|
michele.ar
|
<FIELD name="countryscheme">dnet:countries</FIELD>
|
188 |
48139
|
alessia.ba
|
<FIELD name="collectedfrom">
|
189 |
|
|
<xsl:value-of select="$parentDatasourceId"/>
|
190 |
|
|
</FIELD>
|
191 |
35137
|
michele.ar
|
<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD>
|
192 |
|
|
<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD>
|
193 |
48139
|
alessia.ba
|
<FIELD name="trust" type="float">
|
194 |
|
|
<xsl:value-of select="0.92"/>
|
195 |
|
|
</FIELD>
|
196 |
35137
|
michele.ar
|
</ROW>
|
197 |
48139
|
alessia.ba
|
|
198 |
35137
|
michele.ar
|
<ROW table="project_organization">
|
199 |
48139
|
alessia.ba
|
<FIELD name="_dnet_resource_identifier_">
|
200 |
|
|
<xsl:value-of select='concat($projectId, "@@", $organizationId)'/>
|
201 |
|
|
</FIELD>
|
202 |
38061
|
michele.ar
|
<xsl:choose>
|
203 |
48139
|
alessia.ba
|
<xsl:when test="string-length(translate(./ParticipantOrder, $whitelist, '')) > 0">
|
204 |
38061
|
michele.ar
|
<FIELD name="participantnumber" type="int">9999</FIELD>
|
205 |
|
|
</xsl:when>
|
206 |
|
|
<xsl:otherwise>
|
207 |
48139
|
alessia.ba
|
<FIELD name="participantnumber" type="int">
|
208 |
|
|
<xsl:value-of select="./ParticipantOrder"/>
|
209 |
|
|
</FIELD>
|
210 |
38061
|
michele.ar
|
</xsl:otherwise>
|
211 |
|
|
</xsl:choose>
|
212 |
48139
|
alessia.ba
|
<FIELD name="project">
|
213 |
|
|
<xsl:value-of select="$projectId"/>
|
214 |
|
|
</FIELD>
|
215 |
|
|
<FIELD name="resporganization">
|
216 |
|
|
<xsl:value-of select="$organizationId"/>
|
217 |
|
|
</FIELD>
|
218 |
35137
|
michele.ar
|
<xsl:choose>
|
219 |
38061
|
michele.ar
|
<xsl:when test="./ParticipantOrder = 1">
|
220 |
35137
|
michele.ar
|
<FIELD name="semanticclass">coordinator</FIELD>
|
221 |
|
|
</xsl:when>
|
222 |
|
|
<xsl:otherwise>
|
223 |
|
|
<FIELD name="semanticclass">participant</FIELD>
|
224 |
|
|
</xsl:otherwise>
|
225 |
|
|
</xsl:choose>
|
226 |
|
|
<FIELD name="semanticscheme">dnet:project_organization_relations</FIELD>
|
227 |
|
|
</ROW>
|
228 |
|
|
</xsl:for-each>
|
229 |
48139
|
alessia.ba
|
|
230 |
38061
|
michele.ar
|
<ROW table="subjects">
|
231 |
48139
|
alessia.ba
|
<FIELD name="_dnet_resource_identifier_">
|
232 |
|
|
<xsl:value-of select="concat('corda__h2020::', normalize-space(./ProjectTopicCode))"/>
|
233 |
|
|
</FIELD>
|
234 |
|
|
<FIELD name="id">
|
235 |
|
|
<xsl:value-of select="concat('corda__h2020::', normalize-space(./ProjectTopicCode))"/>
|
236 |
|
|
</FIELD>
|
237 |
|
|
<FIELD name="name">
|
238 |
|
|
<xsl:value-of select="./ProjectTopicDescr"/>
|
239 |
|
|
</FIELD>
|
240 |
38061
|
michele.ar
|
<FIELD name="semanticclass">ec:h2020topics</FIELD>
|
241 |
|
|
<FIELD name="semanticscheme">dnet:subject_classification_typologies</FIELD>
|
242 |
|
|
</ROW>
|
243 |
|
|
|
244 |
|
|
<ROW table="project_subject">
|
245 |
48139
|
alessia.ba
|
<FIELD name="_dnet_resource_identifier_">
|
246 |
|
|
<xsl:value-of select="concat($projectId, '@@corda__h2020::', normalize-space(./ProjectTopicCode))"/>
|
247 |
|
|
</FIELD>
|
248 |
|
|
<FIELD name="project">
|
249 |
|
|
<xsl:value-of select="$projectId"/>
|
250 |
|
|
</FIELD>
|
251 |
|
|
<FIELD name="subject">
|
252 |
|
|
<xsl:value-of select="concat('corda__h2020::', normalize-space(./ProjectTopicCode))"/>
|
253 |
|
|
</FIELD>
|
254 |
38061
|
michele.ar
|
</ROW>
|
255 |
48139
|
alessia.ba
|
|
256 |
38061
|
michele.ar
|
<ROW table="project_fundingpath">
|
257 |
48139
|
alessia.ba
|
<FIELD name="_dnet_resource_identifier_">
|
258 |
|
|
<xsl:value-of select="concat($fundingId, '@@', $projectId)"/>
|
259 |
|
|
</FIELD>
|
260 |
|
|
<FIELD name="funding">
|
261 |
|
|
<xsl:value-of select="$fundingId"/>
|
262 |
|
|
</FIELD>
|
263 |
|
|
<FIELD name="project">
|
264 |
|
|
<xsl:value-of select="$projectId"/>
|
265 |
|
|
</FIELD>
|
266 |
38061
|
michele.ar
|
<xsl:call-template name="dateCorda">
|
267 |
|
|
<xsl:with-param name="datename">startdate</xsl:with-param>
|
268 |
|
|
<xsl:with-param name="datevalue" select="./ProjectStartDate"></xsl:with-param>
|
269 |
|
|
</xsl:call-template>
|
270 |
|
|
<xsl:call-template name="dateCorda">
|
271 |
|
|
<xsl:with-param name="datename">enddate</xsl:with-param>
|
272 |
|
|
<xsl:with-param name="datevalue" select="./ProjectEndDate"></xsl:with-param>
|
273 |
48139
|
alessia.ba
|
</xsl:call-template>
|
274 |
|
|
<FIELD name="semanticclass">
|
275 |
|
|
<xsl:value-of select="./ProjectTOACode"/>
|
276 |
|
|
</FIELD>
|
277 |
38143
|
michele.ar
|
<FIELD name="semanticscheme">ec:h2020toas</FIELD>
|
278 |
38061
|
michele.ar
|
</ROW>
|
279 |
|
|
</xsl:for-each>
|
280 |
48139
|
alessia.ba
|
|
281 |
35137
|
michele.ar
|
</ROWS>
|
282 |
|
|
</metadata>
|
283 |
|
|
</record>
|
284 |
|
|
</xsl:template>
|
285 |
|
|
</xsl:stylesheet>
|