1
|
<RESOURCE_PROFILE>
|
2
|
<HEADER>
|
3
|
<RESOURCE_IDENTIFIER value="72ced451-f4eb-4efb-ad77-06194e43bf5b_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
|
4
|
<RESOURCE_TYPE value="TransformationRuleDSResourceType"/>
|
5
|
<RESOURCE_KIND value="TransformationRuleDSResources"/>
|
6
|
<RESOURCE_URI value=""/>
|
7
|
<DATE_OF_CREATION value="2019-05-22T07:57:37+00:00"/>
|
8
|
</HEADER>
|
9
|
<BODY>
|
10
|
<CONFIGURATION>
|
11
|
<IMPORTED/>
|
12
|
<SCRIPT>
|
13
|
<TITLE>xslt_cleaning_datarepo_datacite</TITLE>
|
14
|
<CODE>
|
15
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1"
|
16
|
xmlns:oaf="http://namespace.openaire.eu/oaf"
|
17
|
xmlns:dr="http://www.driver-repository.eu/namespace/dr"
|
18
|
xmlns:TransformationFunction="eu.dnetlib.data.collective.transformation.core.xsl.ext.TransformationFunctionProxy"
|
19
|
extension-element-prefixes="TransformationFunction"
|
20
|
exclude-result-prefixes="TransformationFunction">
|
21
|
|
22
|
<xsl:param name="varOfficialName"/>
|
23
|
<xsl:param name="varDsType"/>
|
24
|
<xsl:param name="varDataSourceId"/>
|
25
|
|
26
|
<xsl:param name="varFP7" select="'corda_______::'"/>
|
27
|
<xsl:param name="varH2020" select="'corda__h2020::'"/>
|
28
|
<xsl:param name="varAKA" select="'aka_________::'"/>
|
29
|
<xsl:param name="varARC" select="'arc_________::'"/>
|
30
|
<xsl:param name="varCONICYT" select="'conicytf____::'"/>
|
31
|
<xsl:param name="varDFG" select="'dfgf________::'"/>
|
32
|
<xsl:param name="varFCT" select="'fct_________::'"/>
|
33
|
<xsl:param name="varFWF" select="'fwf_________::'"/>
|
34
|
<xsl:param name="varHRZZ" select="'irb_hr______::'"/>
|
35
|
<xsl:param name="varMESTD" select="'mestd_______::'"/>
|
36
|
<xsl:param name="varMZOS" select="'irb_hr______::'"/>
|
37
|
<xsl:param name="varNHMRC" select="'nhmrc_______::'"/>
|
38
|
<xsl:param name="varNIH" select="'nih_________::'"/>
|
39
|
<xsl:param name="varNSF" select="'nsf_________::'"/>
|
40
|
<xsl:param name="varNWO" select="'nwo_________::'"/>
|
41
|
<xsl:param name="varRCUK" select="'rcuk________::'"/>
|
42
|
<xsl:param name="varSFI" select="'sfi_________::'"/>
|
43
|
<xsl:param name="varSGOV" select="'sgov________::'"/>
|
44
|
<xsl:param name="varSNSF" select="'snsf________::'"/>
|
45
|
<xsl:param name="varTARA" select="'taraexp_____::'"/>
|
46
|
<xsl:param name="varTUBITAK" select="'tubitakf____::'"/>
|
47
|
<xsl:param name="varWT" select="'wt__________::'"/>
|
48
|
|
49
|
<!--
|
50
|
// HRZZ not found
|
51
|
// SGOV to be added, awaiting DOI from Pilar, found project ids not in CSV list?
|
52
|
// TARA to be added, awaiting DOI from André
|
53
|
-->
|
54
|
|
55
|
<xsl:param name="index" select="0"/>
|
56
|
<xsl:variable name="tf" select="TransformationFunction:getInstance()"/>
|
57
|
|
58
|
|
59
|
<xsl:template match="/">
|
60
|
<xsl:variable name="datasourcePrefix"
|
61
|
select="normalize-space(//oaf:datasourceprefix)"/>
|
62
|
<xsl:call-template name="validRecord"/>
|
63
|
</xsl:template>
|
64
|
|
65
|
<xsl:template name="terminate">
|
66
|
<xsl:message terminate="yes">
|
67
|
record is not compliant, transformation is interrupted.
|
68
|
</xsl:message>
|
69
|
</xsl:template>
|
70
|
|
71
|
<xsl:template name="validRecord">
|
72
|
<record>
|
73
|
<xsl:copy-of select="//*[local-name() = 'header']"/>
|
74
|
|
75
|
<metadata>
|
76
|
|
77
|
<xsl:apply-templates select="//*[local-name() = 'metadata']//*[local-name() = 'resource']"/>
|
78
|
|
79
|
|
80
|
<!-- -->
|
81
|
<xsl:for-each select="//*[local-name() = 'resource']/*[local-name()='identifier'][@identifierType='Handle'][not(. = '123456789')]">
|
82
|
<oaf:identifier>
|
83
|
<xsl:attribute name="identifierType">
|
84
|
<xsl:value-of select="'handle'"/>
|
85
|
</xsl:attribute>
|
86
|
<xsl:value-of select="."/>
|
87
|
</oaf:identifier>
|
88
|
</xsl:for-each>
|
89
|
|
90
|
<xsl:for-each select="//*[local-name() = 'resource']/*[local-name()='identifier'][@identifierType='DOI']">
|
91
|
<oaf:identifier>
|
92
|
<xsl:attribute name="identifierType">
|
93
|
<xsl:value-of select="'doi'"/>
|
94
|
</xsl:attribute>
|
95
|
<xsl:if test="contains(., '://dx.doi.org/')">
|
96
|
<xsl:value-of select="substring-after(., '://dx.doi.org/')"/>
|
97
|
</xsl:if>
|
98
|
<xsl:if test="not(contains(., '://dx.doi.org/'))">
|
99
|
<xsl:value-of select="."/>
|
100
|
</xsl:if>
|
101
|
</oaf:identifier>
|
102
|
</xsl:for-each>
|
103
|
<!-- -->
|
104
|
|
105
|
|
106
|
<xsl:if test="//*[local-name()='date']/@dateType='Available' and (//*[local-name()='datasourceprefix']!='od______3691' and //*[local-name()='datasourceprefix']!='r33ffb097cef')">
|
107
|
<xsl:variable name='varEmbargoEndDate'
|
108
|
select="TransformationFunction:convertString($tf, normalize-space(//*[local-name()='date'][@dateType='Available']), 'DateISO8601')"/>
|
109
|
<xsl:choose>
|
110
|
<xsl:when test="string-length($varEmbargoEndDate) > 0">
|
111
|
<oaf:embargoenddate>
|
112
|
<xsl:value-of select="$varEmbargoEndDate"/>
|
113
|
</oaf:embargoenddate>
|
114
|
</xsl:when>
|
115
|
<xsl:otherwise>
|
116
|
<xsl:call-template name="terminate"/>
|
117
|
</xsl:otherwise>
|
118
|
</xsl:choose>
|
119
|
</xsl:if>
|
120
|
|
121
|
<xsl:choose>
|
122
|
<!--
|
123
|
<xsl:when test="//*[local-name()='resourceType']/@resourceTypeGeneral='Dataset' or //*[local-name()='resourceType']/@resourceTypeGeneral='Software' or //*[local-name()='resourceType']/@resourceTypeGeneral='Collection' or //*[local-name()='resourceType']/@resourceTypeGeneral='Film' or //*[local-name()='resourceType']/@resourceTypeGeneral='Sound' or //*[local-name()='resourceType']/@resourceTypeGeneral='PhysicalObject' or //*[local-name()='resourceType']/@resourceTypeGeneral='Audiovisual'">
|
124
|
-->
|
125
|
<!--
|
126
|
<xsl:when test="//*[local-name()='resourceType'][lower-case(.)='article'] or lower-case(//*[local-name()='resourceType']/@resourceTypeGeneral)=('dataset', 'software', 'collection', 'film', 'sound', 'physicalobject', 'audiovisual', 'model', 'workflow', 'service', 'image') or (//*[local-name()='resourceType'][lower-case(@resourceTypeGeneral)='other' and lower-case(.)='EGI Virtual Appliance'])">
|
127
|
-->
|
128
|
<xsl:when test="//*[local-name()='resourceType'][lower-case(.)='article'] or lower-case(//*[local-name()='resourceType']/@resourceTypeGeneral)=('dataset', 'software', 'collection', 'film', 'sound', 'physicalobject', 'audiovisual', 'model', 'workflow', 'service', 'image') or (//*[local-name()='resourceType'][lower-case(./@resourceTypeGeneral)='other' and lower-case(.)=('study', 'egi virtual appliance')])">
|
129
|
|
130
|
<!--
|
131
|
<dr:CobjCategory>
|
132
|
<xsl:value-of
|
133
|
select="TransformationFunction:convertString($tf, distinct-values(//*[local-name()='resourceType']/@resourceTypeGeneral), 'TextTypologies')" />
|
134
|
</dr:CobjCategory>
|
135
|
-->
|
136
|
|
137
|
<dr:CobjCategory>
|
138
|
<xsl:variable name='varCobjCategory' select="TransformationFunction:convertString($tf, distinct-values(//*[local-name()='resourceType']/@resourceTypeGeneral), 'TextTypologies')"/>
|
139
|
<xsl:attribute name="type" select="TransformationFunction:convertString($tf, $varCobjCategory, 'SuperTypes')"/>
|
140
|
<xsl:value-of select="$varCobjCategory"/>
|
141
|
</dr:CobjCategory>
|
142
|
|
143
|
</xsl:when>
|
144
|
<xsl:otherwise>
|
145
|
<xsl:call-template name="terminate"/>
|
146
|
</xsl:otherwise>
|
147
|
</xsl:choose>
|
148
|
|
149
|
<oaf:dateAccepted>
|
150
|
<xsl:value-of select="TransformationFunction:convertString($tf, normalize-space(//*[local-name()='publicationYear']), 'DateISO8601')"/>
|
151
|
</oaf:dateAccepted>
|
152
|
<xsl:choose>
|
153
|
|
154
|
<!--
|
155
|
<xsl:if test="//*[local-name() = 'datasourceprefix'][.='r310e4cd113d'] and not(boolean(//*[local-name() = 'rights']/@rightsURI ) )]">
|
156
|
<oaf:skip>
|
157
|
<xsl:value-of select="TransformationFunction:skipRecord($tf, $index)"/>
|
158
|
</oaf:skip>
|
159
|
</xsl:if>
|
160
|
-->
|
161
|
|
162
|
<!-- <xsl:when test="//*[local-name() = 'rights'][starts-with(normalize-space(.), 'info:eu-repo/semantics')]">
|
163
|
<oaf:accessrights>
|
164
|
<xsl:value-of select="TransformationFunction:convertString($tf, //*[local-name() = 'rights'][starts-with(normalize-space(.), 'info:eu-repo/semantics')], 'AccessRights')"/>
|
165
|
</oaf:accessrights>
|
166
|
</xsl:when>
|
167
|
-->
|
168
|
<xsl:when test="//*[local-name() = 'rights']/@rightsURI[starts-with(normalize-space(.), 'info:eu-repo/semantics')]">
|
169
|
<oaf:accessrights>
|
170
|
<xsl:value-of select="TransformationFunction:convertString($tf, //*[local-name() = 'rights']/@rightsURI[starts-with(normalize-space(.), 'info:eu-repo/semantics')], 'AccessRights')"/>
|
171
|
</oaf:accessrights>
|
172
|
</xsl:when>
|
173
|
|
174
|
<xsl:otherwise>
|
175
|
<xsl:choose>
|
176
|
<xsl:when test="//*[local-name() = 'rights'][starts-with(normalize-space(.), 'http://creativecommons.org') or starts-with(normalize-space(.), 'Creative Commons') or starts-with(normalize-space(.), 'GNU LESSER GENERAL PUBLIC LICENSE')]">
|
177
|
<oaf:accessrights>
|
178
|
<xsl:text>OPEN</xsl:text>
|
179
|
</oaf:accessrights>
|
180
|
</xsl:when>
|
181
|
<xsl:when test="//*[local-name() = 'rights']/@rightsURI[starts-with(normalize-space(.), 'http://creativecommons.org') or starts-with(normalize-space(.), 'http://opendatacommons.org')]">
|
182
|
<oaf:accessrights>
|
183
|
<xsl:text>OPEN</xsl:text>
|
184
|
</oaf:accessrights>
|
185
|
</xsl:when>
|
186
|
<xsl:otherwise>
|
187
|
<oaf:accessrights>
|
188
|
<xsl:text>CLOSED</xsl:text>
|
189
|
</oaf:accessrights>
|
190
|
</xsl:otherwise>
|
191
|
</xsl:choose>
|
192
|
</xsl:otherwise>
|
193
|
</xsl:choose>
|
194
|
|
195
|
<xsl:for-each select="//*[local-name()='rights']/@rightsURI[starts-with(normalize-space(.), 'http') and matches(., '.*(/licenses|/publicdomain|unlicense.org/|/legal-and-data-protection-notices|/download/license|/open-government-licence).*')]">
|
196
|
<oaf:license>
|
197
|
<xsl:value-of select="."/>
|
198
|
</oaf:license>
|
199
|
</xsl:for-each>
|
200
|
|
201
|
<oaf:language>
|
202
|
<xsl:value-of select="TransformationFunction:convert($tf, //*[local-name()='language'], 'Languages')"/>
|
203
|
</oaf:language>
|
204
|
|
205
|
<!--
|
206
|
<xsl:if test="//*[local-name() = 'rights'][starts-with(normalize-space(.), 'info:eu-repo/semantics/embargoedAccess')]">
|
207
|
<oaf:embargoenddate>
|
208
|
<xsl:value-of select="//*[local-name()='date']/@dateType='Available'"/>
|
209
|
</oaf:embargoenddate>
|
210
|
</xsl:if>
|
211
|
-->
|
212
|
|
213
|
<xsl:for-each select="//*[local-name()='nameIdentifier']">
|
214
|
<xsl:if test="matches(normalize-space(.), '(info:eu-repo/grantagreement/ec/fp7/)(\d\d\d\d\d\d)(.*)', 'i')">
|
215
|
<oaf:projectid>
|
216
|
<xsl:value-of select="concat($varFP7, replace(normalize-space(.), '(info:eu-repo/grantagreement/ec/fp7/)(\d\d\d\d\d\d)(.*)', '$2', 'i'))"/>
|
217
|
</oaf:projectid>
|
218
|
</xsl:if>
|
219
|
<xsl:if test="matches(normalize-space(.), '(info:eu-repo/grantagreement/ec/h2020/)(\d\d\d\d\d\d)(.*)', 'i')">
|
220
|
<oaf:projectid>
|
221
|
<xsl:value-of select="concat($varH2020, replace(normalize-space(.), '(info:eu-repo/grantagreement/ec/h2020/)(\d\d\d\d\d\d)(.*)', '$2', 'i'))"/>
|
222
|
</oaf:projectid>
|
223
|
</xsl:if>
|
224
|
</xsl:for-each>
|
225
|
<!--
|
226
|
<xsl:if test="not(//*[local-name()='nameIdentifier'][starts-with(., 'info:eu-repo/grantAgreement/')])">
|
227
|
<xsl:call-template name="terminate"/>
|
228
|
</xsl:if>
|
229
|
-->
|
230
|
|
231
|
<oaf:hostedBy>
|
232
|
<xsl:attribute name="name">
|
233
|
<xsl:value-of select="$varOfficialName"/>
|
234
|
</xsl:attribute>
|
235
|
<xsl:attribute name="id">
|
236
|
<xsl:value-of select="$varDataSourceId"/>
|
237
|
</xsl:attribute>
|
238
|
</oaf:hostedBy>
|
239
|
<oaf:collectedFrom>
|
240
|
<xsl:attribute name="name">
|
241
|
<xsl:value-of select="$varOfficialName"/>
|
242
|
</xsl:attribute>
|
243
|
<xsl:attribute name="id">
|
244
|
<xsl:value-of select="$varDataSourceId"/>
|
245
|
</xsl:attribute>
|
246
|
</oaf:collectedFrom>
|
247
|
</metadata>
|
248
|
<xsl:copy-of select="//*[local-name() = 'about']"/>
|
249
|
</record>
|
250
|
</xsl:template>
|
251
|
|
252
|
<xsl:template match="node()|@*">
|
253
|
<xsl:copy>
|
254
|
<xsl:apply-templates select="node()|@*"/>
|
255
|
</xsl:copy>
|
256
|
</xsl:template>
|
257
|
|
258
|
<xsl:template match="//*[local-name() = 'metadata']//*[local-name() = 'resource']">
|
259
|
<xsl:copy>
|
260
|
<xsl:apply-templates select="node()|@*"/>
|
261
|
</xsl:copy>
|
262
|
</xsl:template>
|
263
|
|
264
|
<xsl:template match="//*[local-name() = 'resource']/*[local-name()='alternateIdentifiers']">
|
265
|
<xsl:element name="alternateIdentifiers" namespace="http://www.openarchives.org/OAI/2.0/">
|
266
|
|
267
|
<xsl:copy-of select="./*"/>
|
268
|
|
269
|
<xsl:if test="//*[local-name() = 'resource']/*[local-name()='identifier'][@identifierType='Handle']">
|
270
|
<xsl:element name="alternateIdentifier" namespace="http://www.openarchives.org/OAI/2.0/">
|
271
|
<xsl:attribute name="alternateIdentifierType">
|
272
|
<xsl:value-of select="'URL'"/>
|
273
|
</xsl:attribute>
|
274
|
<xsl:value-of
|
275
|
select="concat('http://hdl.handle.net/', //*[local-name() = 'resource']/*[local-name()='identifier'])"/>
|
276
|
</xsl:element>
|
277
|
</xsl:if>
|
278
|
|
279
|
<xsl:if test="//*[local-name() = 'resource']/*[local-name()='identifier'][@identifierType='URN']">
|
280
|
<xsl:element name="alternateIdentifier" namespace="http://www.openarchives.org/OAI/2.0/">
|
281
|
<xsl:attribute name="alternateIdentifierType">
|
282
|
<xsl:value-of select="'URL'"/>
|
283
|
</xsl:attribute>
|
284
|
<xsl:value-of
|
285
|
select="concat('http://nbn-resolving.org/', //*[local-name() = 'resource']/*[local-name()='identifier'])"/>
|
286
|
</xsl:element>
|
287
|
</xsl:if>
|
288
|
|
289
|
<xsl:if test="//*[local-name() = 'resource']/*[local-name()='identifier'][@identifierType='DOI']">
|
290
|
<xsl:element name="alternateIdentifier" namespace="http://www.openarchives.org/OAI/2.0/">
|
291
|
<xsl:attribute name="alternateIdentifierType">
|
292
|
<xsl:value-of select="'URL'"/>
|
293
|
</xsl:attribute>
|
294
|
|
295
|
<!--
|
296
|
<xsl:value-of
|
297
|
select="concat('http://dx.doi.org/', //*[local-name() = 'resource']/*[local-name()='identifier'])" />
|
298
|
-->
|
299
|
<xsl:value-of
|
300
|
select="//*[local-name() = 'resource']/(*[local-name()='identifier'][not(contains(., '://dx.doi.org/'))]/concat('http://dx.doi.org/', .), *[local-name()='identifier'][contains(., '://dx.doi.org/')])"/>
|
301
|
</xsl:element>
|
302
|
</xsl:if>
|
303
|
|
304
|
</xsl:element>
|
305
|
|
306
|
</xsl:template>
|
307
|
|
308
|
<xsl:template match="//*[local-name() = 'resource']/*[local-name()='identifier']">
|
309
|
<!-- cut off DOI resolver prefix to just get the number part -->
|
310
|
<xsl:if test=".[@identifierType='DOI'][contains(., '://dx.doi.org/')]">
|
311
|
<xsl:element name="identifier" namespace="http://www.openarchives.org/OAI/2.0/">
|
312
|
<xsl:attribute name="identifierType">
|
313
|
<xsl:value-of select="'DOI'"/>
|
314
|
</xsl:attribute>
|
315
|
<xsl:value-of
|
316
|
select="substring-after(., '://dx.doi.org/')"/>
|
317
|
</xsl:element>
|
318
|
</xsl:if>
|
319
|
<xsl:copy-of select=".[not(contains(., '://dx.doi.org/'))]"/>
|
320
|
<xsl:if test="not(//*[local-name() = 'resource']/*[local-name()='alternateIdentifiers'])">
|
321
|
<xsl:element name="alternateIdentifiers" namespace="http://www.openarchives.org/OAI/2.0/">
|
322
|
<xsl:if test=".[@identifierType='Handle']">
|
323
|
<xsl:element name="alternateIdentifier" namespace="http://www.openarchives.org/OAI/2.0/">
|
324
|
<xsl:attribute name="alternateIdentifierType">
|
325
|
<xsl:value-of select="'URL'"/>
|
326
|
</xsl:attribute>
|
327
|
<xsl:value-of
|
328
|
select="concat('http://hdl.handle.net/', .)"/>
|
329
|
</xsl:element>
|
330
|
</xsl:if>
|
331
|
<xsl:if test=".[@identifierType='URN']">
|
332
|
<xsl:element name="alternateIdentifier" namespace="http://www.openarchives.org/OAI/2.0/">
|
333
|
<xsl:attribute name="alternateIdentifierType">
|
334
|
<xsl:value-of select="'URL'"/>
|
335
|
</xsl:attribute>
|
336
|
<xsl:value-of
|
337
|
select="concat('http://nbn-resolving.org/', .)"/>
|
338
|
</xsl:element>
|
339
|
</xsl:if>
|
340
|
<xsl:if test=".[@identifierType='DOI']">
|
341
|
<xsl:element name="alternateIdentifier" namespace="http://www.openarchives.org/OAI/2.0/">
|
342
|
<xsl:attribute name="alternateIdentifierType">
|
343
|
<xsl:value-of select="'URL'"/>
|
344
|
</xsl:attribute>
|
345
|
<xsl:value-of
|
346
|
select="concat('http://dx.doi.org/', .)"/>
|
347
|
</xsl:element>
|
348
|
</xsl:if>
|
349
|
|
350
|
</xsl:element>
|
351
|
</xsl:if>
|
352
|
|
353
|
|
354
|
<!-- funding -->
|
355
|
<xsl:for-each select="//*[local-name()='fundingReference']">
|
356
|
<!-- FP7 -->
|
357
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100004963', '10.13039/100011199') and matches(./*[local-name()='awardNumber'], '.*(^|[^\d])\d\d\d\d\d\d($|[^\d]).*')">
|
358
|
<oaf:projectid>
|
359
|
<xsl:value-of select="concat($varFP7, replace(./*[local-name()='awardNumber'], '.*(^|[^\d])(\d\d\d\d\d\d)($|[^\d]).*', '$2'))"/>
|
360
|
</oaf:projectid>
|
361
|
</xsl:if>
|
362
|
<!-- H2020 -->
|
363
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/100010661') and matches(./*[local-name()='awardNumber'], '.*(^|[^\d])\d\d\d\d\d\d($|[^\d]).*')">
|
364
|
<oaf:projectid>
|
365
|
<xsl:value-of select="concat($varH2020, replace(./*[local-name()='awardNumber'], '.*(^|[^\d])(\d\d\d\d\d\d)($|[^\d]).*', '$2'))"/>
|
366
|
</oaf:projectid>
|
367
|
</xsl:if>
|
368
|
<!-- AKA -->
|
369
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100002341') or contains(./*[local-name()='funderName'], 'Suomen Akatemia') or contains(./*[local-name()='funderName'], 'Academy of Finland')">
|
370
|
<oaf:projectid>
|
371
|
<xsl:value-of select="concat($varAKA, ./*[local-name()='awardNumber'])"/>
|
372
|
</oaf:projectid>
|
373
|
</xsl:if>
|
374
|
<!-- ARC -->
|
375
|
<xsl:if test="(substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100000923') or contains(./*[local-name()='funderName'], 'Australian Research Council')) and matches(./*[local-name()='awardNumber'], '^\d{6}$')">
|
376
|
<oaf:projectid>
|
377
|
<xsl:value-of select="concat($varAKA, replace(./*[local-name()='awardNumber'], '.*(^\d{6}$).*', '$2'))"/>
|
378
|
</oaf:projectid>
|
379
|
</xsl:if>
|
380
|
<!-- CONICYT -->
|
381
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100002848') or contains(./*[local-name()='funderName'], 'Comisión Nacional de Investigación Científica y Tecnológica') or contains(./*[local-name()='funderName'], 'CONICYT')">
|
382
|
<oaf:projectid>
|
383
|
<xsl:value-of select="concat($varCONICYT, ./*[local-name()='awardNumber'])"/>
|
384
|
</oaf:projectid>
|
385
|
</xsl:if>
|
386
|
<!-- DFG -->
|
387
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100001659') or contains(./*[local-name()='funderName'], 'Deutsche Forschungsgemeinschaft') or contains(./*[local-name()='funderName'], 'DFG')">
|
388
|
<oaf:projectid>
|
389
|
<xsl:value-of select="concat($varDFG, ./*[local-name()='awardNumber'])"/>
|
390
|
</oaf:projectid>
|
391
|
</xsl:if>
|
392
|
<!-- FCT -->
|
393
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100001871') or contains(./*[local-name()='funderName'], 'Fundação para a Ciência e a Tecnologia')">
|
394
|
<oaf:projectid>
|
395
|
<xsl:value-of select="concat($varFCT, ./*[local-name()='awardNumber'])"/>
|
396
|
</oaf:projectid>
|
397
|
</xsl:if>
|
398
|
<!-- FWF -->
|
399
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100002428') or contains(./*[local-name()='funderName'], 'Fonds zur Förderung der Wissenschaftlichen Forschung') or contains(./*[local-name()='funderName'], 'Austrian Science Fund')">
|
400
|
<oaf:projectid>
|
401
|
<xsl:value-of select="concat($varFCT, ./*[local-name()='awardNumber'])"/>
|
402
|
</oaf:projectid>
|
403
|
</xsl:if>
|
404
|
<!-- MESTD -->
|
405
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100001871') or (contains(./*[local-name()='funderName'], 'Ministarstvo Prosvete, Nauke i Tehnolo') and contains(./*[local-name()='funderName'], 'kog Razvoja')) or contains(./*[local-name()='funderName'], 'MESTD')">
|
406
|
<oaf:projectid>
|
407
|
<xsl:value-of select="concat($varMESTD, ./*[local-name()='awardNumber'])"/>
|
408
|
</oaf:projectid>
|
409
|
</xsl:if>
|
410
|
<!-- MZOS -->
|
411
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100006588') or contains(./*[local-name()='funderName'], 'Ministarstvo Znanosti, Obrazovanja i Sporta') or contains(./*[local-name()='funderName'], 'Ministry of Science, Education and Sports')">
|
412
|
<oaf:projectid>
|
413
|
<xsl:value-of select="concat($varMZOS, ./*[local-name()='awardNumber'])"/>
|
414
|
</oaf:projectid>
|
415
|
</xsl:if>
|
416
|
<!-- NHMRC -->
|
417
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100000925') or contains(./*[local-name()='funderName'], 'National Health and Medical Research Council') or contains(./*[local-name()='funderName'], 'NHMRC')">
|
418
|
<oaf:projectid>
|
419
|
<xsl:value-of select="concat($varNHMRC, ./*[local-name()='awardNumber'])"/>
|
420
|
</oaf:projectid>
|
421
|
</xsl:if>
|
422
|
<!-- NIH -->
|
423
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/100000002') or contains(./*[local-name()='funderName'], 'National Institutes of Health')">
|
424
|
<oaf:projectid>
|
425
|
<xsl:value-of select="concat($varNIH, ./*[local-name()='awardNumber'])"/>
|
426
|
</oaf:projectid>
|
427
|
</xsl:if>
|
428
|
<!-- NSF -->
|
429
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org') = ('10.13039/100000001') or contains(./*[local-name()='funderName'], 'National Science Foundation')">
|
430
|
<oaf:projectid>
|
431
|
<xsl:value-of select="concat($varNSF, ./*[local-name()='awardNumber'])"/>
|
432
|
</oaf:projectid>
|
433
|
</xsl:if>
|
434
|
<!-- NWO -->
|
435
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100003246') or contains(./*[local-name()='funderName'], 'Netherlands Organisation for Scientific Research') or contains(./*[local-name()='funderName'], 'Nederlandse Organisatie voor Wetenschappelijk Onderzoek')">
|
436
|
<oaf:projectid>
|
437
|
<xsl:value-of select="concat($varNWO, ./*[local-name()='awardNumber'])"/>
|
438
|
</oaf:projectid>
|
439
|
</xsl:if>
|
440
|
<!-- RCUK -->
|
441
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100000690') or contains(./*[local-name()='funderName'], 'Research Councils UK') or contains(./*[local-name()='funderName'], 'RCUK')">
|
442
|
<oaf:projectid>
|
443
|
<xsl:value-of select="concat($varRCUK, ./*[local-name()='awardNumber'])"/>
|
444
|
</oaf:projectid>
|
445
|
</xsl:if>
|
446
|
<!-- SFI -->
|
447
|
<xsl:if test="(substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100001602') or contains(./*[local-name()='funderName'], 'Science Foundation Ireland')) and matches(./*[local-name()='awardNumber'], '.*([\dA-Za-z\.\-]+/)+[\dA-Za-z\.\-]+.*')">
|
448
|
<oaf:projectid>
|
449
|
<xsl:value-of select="concat($varSFI, replace(./*[local-name()='awardNumber'], '.*(^|\s)(([\dA-Za-z\.\-]+/)+[\dA-Za-z\.\-]+)($|\s).*', '$2'))"/>
|
450
|
</oaf:projectid>
|
451
|
</xsl:if>
|
452
|
<!-- SNSF -->
|
453
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100001711') or contains(./*[local-name()='funderName'], 'Swiss National Science Foundation') or contains(./*[local-name()='funderName'], 'Schweizerischer Nationalfonds zur Förderung der Wissenschaftlichen Forschung')">
|
454
|
<oaf:projectid>
|
455
|
<xsl:value-of select="concat($varSNSF, ./*[local-name()='awardNumber'])"/>
|
456
|
</oaf:projectid>
|
457
|
</xsl:if>
|
458
|
<!-- TUBITAK -->
|
459
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100004410') or contains(./*[local-name()='funderName'], 'Turkish National Science and Research Council') or (contains(./*[local-name()='funderName'], 'Türkiye Bilimsel ve Teknolojik Ara') and contains(./*[local-name()='funderName'], 'rma Kurumu'))">
|
460
|
<oaf:projectid>
|
461
|
<xsl:value-of select="concat($varTUBITAK, ./*[local-name()='awardNumber'])"/>
|
462
|
</oaf:projectid>
|
463
|
</xsl:if>
|
464
|
<!-- WT -->
|
465
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/100004440') or contains(./*[local-name()='funderName'], 'Wellcome Trust')">
|
466
|
<oaf:projectid>
|
467
|
<xsl:value-of select="concat($varWT, ./*[local-name()='awardNumber'])"/>
|
468
|
</oaf:projectid>
|
469
|
</xsl:if>
|
470
|
</xsl:for-each>
|
471
|
|
472
|
</xsl:template>
|
473
|
|
474
|
<!--
|
475
|
<xsl:template match="//*[local-name()='language']">
|
476
|
<oaf:language>
|
477
|
<xsl:value-of select="TransformationFunction:convert($tf, //*[local-name()='language'], 'Languages')" />
|
478
|
</oaf:language>
|
479
|
</xsl:template>
|
480
|
-->
|
481
|
</xsl:stylesheet>
|
482
|
</CODE>
|
483
|
</SCRIPT>
|
484
|
</CONFIGURATION>
|
485
|
<STATUS/>
|
486
|
<SECURITY_PARAMETERS/>
|
487
|
</BODY>
|
488
|
</RESOURCE_PROFILE>
|