1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
3
|
xmlns:dri="http://www.driver-repository.eu/namespace/dri"
|
4
|
xmlns:oaf="http://namespace.openaire.eu/oaf"
|
5
|
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
6
|
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
|
7
|
|
8
|
<xsl:template match = "/">
|
9
|
|
10
|
<result type ="result">
|
11
|
<xsl:apply-templates select="//header"/>
|
12
|
<xsl:apply-templates select="//children/result"/>
|
13
|
<xsl:apply-templates select="//oaf:result"/>
|
14
|
<xsl:apply-templates select="//rel"/>
|
15
|
<xsl:apply-templates select="//children"/>
|
16
|
<xsl:apply-templates select="//extraInfo"/>
|
17
|
</result>
|
18
|
</xsl:template>
|
19
|
|
20
|
<!-- HEADER
|
21
|
fields in header:
|
22
|
1. dri:objIdentifier [objIdentifier]
|
23
|
2. dri:repositoryId X
|
24
|
3. dri:dateOfCollection X
|
25
|
-->
|
26
|
|
27
|
<xsl:template match="text()">
|
28
|
<xsl:value-of select="replace(., '[-Ÿ]', ' ')"/>
|
29
|
</xsl:template>
|
30
|
|
31
|
<xsl:template match = "header">
|
32
|
<field name="resultId" multiplicity="false" indexId="objIdentifier" label="Object id">
|
33
|
<xsl:attribute name="value">
|
34
|
<xsl:value-of select='./dri:objIdentifier'/>
|
35
|
</xsl:attribute>
|
36
|
</field>
|
37
|
|
38
|
<field name="underCuration" multiplicity="false" indexId="" label="Under Curation">
|
39
|
<xsl:attribute name="value">
|
40
|
<xsl:value-of select='./dri:status'/>
|
41
|
</xsl:attribute>
|
42
|
</field>
|
43
|
|
44
|
<!--<field name="repositoryId" multiplicity="false" indexId="???" label="???">
|
45
|
<xsl:attribute name="value">
|
46
|
<xsl:value-of select='./dri:repositoryId'/>
|
47
|
</xsl:attribute>
|
48
|
</field>-->
|
49
|
<!--<field name="dateOfCollection" multiplicity="false" indexId="???" label="???">
|
50
|
<xsl:attribute name="value">
|
51
|
<xsl:value-of select='./dri:dateOfCollection'/>
|
52
|
</xsl:attribute>
|
53
|
</field>-->
|
54
|
</xsl:template>
|
55
|
|
56
|
|
57
|
<xsl:template match = "oaf:result">
|
58
|
|
59
|
<xsl:for-each select = "./title">
|
60
|
<field name="title" indexId = "resulttitle" multiplicity="true" label="Title">
|
61
|
<xsl:attribute name="value">
|
62
|
<xsl:value-of select='.'/>
|
63
|
</xsl:attribute>
|
64
|
</field>
|
65
|
</xsl:for-each>
|
66
|
|
67
|
<xsl:for-each select = "./dateofacceptance">
|
68
|
<field name="dateofacceptance" indexId = "resultdateofacceptance" multiplicity="true" label="Date of acceptance">
|
69
|
<xsl:attribute name="value">
|
70
|
<xsl:value-of select='.'/>
|
71
|
</xsl:attribute>
|
72
|
</field>
|
73
|
</xsl:for-each>
|
74
|
|
75
|
<xsl:for-each select = "./storagedate">
|
76
|
<field name="storagedate" indexId = "resultstoragedate" multiplicity="true" label="Date of storage">
|
77
|
<xsl:attribute name="value">
|
78
|
<xsl:value-of select='.'/>
|
79
|
</xsl:attribute>
|
80
|
</field>
|
81
|
</xsl:for-each>
|
82
|
|
83
|
<xsl:for-each select="./creator">
|
84
|
<field name="hasAuthor">
|
85
|
<field name="fullname">
|
86
|
<xsl:attribute name="value">
|
87
|
<xsl:value-of select='.'/>
|
88
|
</xsl:attribute>
|
89
|
</field>
|
90
|
<field name="ranking">
|
91
|
<xsl:attribute name="value">
|
92
|
<xsl:value-of select='./@rank'/>
|
93
|
</xsl:attribute>
|
94
|
</field>
|
95
|
</field>
|
96
|
</xsl:for-each>
|
97
|
|
98
|
<xsl:for-each select = "./description">
|
99
|
<field name="description" indexId = "resultdescription" multiplicity="true" label="Description">
|
100
|
<xsl:attribute name="value">
|
101
|
<xsl:value-of select='.'/>
|
102
|
</xsl:attribute>
|
103
|
</field>
|
104
|
</xsl:for-each>
|
105
|
|
106
|
<xsl:for-each select = "./publisher">
|
107
|
<field name="publisher" indexId = "resultpublisher" multiplicity="true" label="Publisher(s)">
|
108
|
<xsl:attribute name="value">
|
109
|
<xsl:value-of select='.'/>
|
110
|
</xsl:attribute>
|
111
|
</field>
|
112
|
</xsl:for-each>
|
113
|
|
114
|
<xsl:for-each select = "./language">
|
115
|
<field name="languageid" indexId = "resultlanguageid" multiplicity="true" label="Language(s)">
|
116
|
<xsl:attribute name="value">
|
117
|
<xsl:value-of select='./@classid'/>
|
118
|
</xsl:attribute>
|
119
|
</field>
|
120
|
<field name="languagename" indexId = "resultlanguagename" multiplicity="true" label="Language(s)">
|
121
|
<xsl:attribute name="value">
|
122
|
<xsl:value-of select='./@classname'/>
|
123
|
</xsl:attribute>
|
124
|
</field>
|
125
|
<field name="language" indexId = "" multiplicity="true" label="Language(s)">
|
126
|
<xsl:attribute name="value">
|
127
|
<xsl:value-of select='./@classname'/>
|
128
|
</xsl:attribute>
|
129
|
<xsl:attribute name="value_original">
|
130
|
<xsl:value-of select='./@classid'/>
|
131
|
</xsl:attribute>
|
132
|
</field>
|
133
|
</xsl:for-each>
|
134
|
|
135
|
<xsl:for-each select = "./resulttype">
|
136
|
<field name="resulttypeid" indexId = "resulttypeid" multiplicity="true" label="Type">
|
137
|
<xsl:attribute name="value">
|
138
|
<xsl:value-of select='./@classid'/>
|
139
|
</xsl:attribute>
|
140
|
</field>
|
141
|
<field name="resulttypename" indexId = "resulttypename" multiplicity="true" label="Type">
|
142
|
<xsl:attribute name="value">
|
143
|
<xsl:value-of select='./@classname'/>
|
144
|
</xsl:attribute>
|
145
|
</field>
|
146
|
</xsl:for-each>
|
147
|
|
148
|
<xsl:for-each select = "./resourcetype">
|
149
|
<field name="resourcetypeid" indexId = "" multiplicity="true" label="Resource Type">
|
150
|
<xsl:attribute name="value">
|
151
|
<xsl:value-of select='./@classid'/>
|
152
|
</xsl:attribute>
|
153
|
</field>
|
154
|
<field name="resourcetypename" indexId = "" multiplicity="true" label="Resource Type">
|
155
|
<xsl:attribute name="value">
|
156
|
<xsl:value-of select='./@classname'/>
|
157
|
</xsl:attribute>
|
158
|
</field>
|
159
|
</xsl:for-each>
|
160
|
|
161
|
<xsl:for-each select = "./subject">
|
162
|
<field name="subject" indexId = "resultsubject" multiplicity="true" label="Subject">
|
163
|
<xsl:attribute name="value">
|
164
|
<xsl:value-of select='.'/>
|
165
|
</xsl:attribute>
|
166
|
<field name = "inferred" indexId="" multiplicity = "false" label="inferred">
|
167
|
<xsl:attribute name="value">
|
168
|
<xsl:choose>
|
169
|
<xsl:when test="@inferred !=''">
|
170
|
<xsl:value-of select="@inferred"/>
|
171
|
</xsl:when>
|
172
|
<xsl:otherwise>
|
173
|
<xsl:text>false</xsl:text>
|
174
|
</xsl:otherwise>
|
175
|
</xsl:choose>
|
176
|
</xsl:attribute>
|
177
|
</field>
|
178
|
<field name = "trust" indexId="" multiplicity = "false" label="trust level">
|
179
|
<xsl:attribute name="value">
|
180
|
<xsl:choose>
|
181
|
<xsl:when test="@trust !=''">
|
182
|
<xsl:value-of select="@trust"/>
|
183
|
</xsl:when>
|
184
|
<xsl:otherwise>
|
185
|
<xsl:text>NEUTRAL</xsl:text>
|
186
|
</xsl:otherwise>
|
187
|
</xsl:choose>
|
188
|
</xsl:attribute>
|
189
|
</field>
|
190
|
<field name = "provenance" indexId="" multiplicity = "false" label="provenance">
|
191
|
<xsl:attribute name="value">
|
192
|
<xsl:choose>
|
193
|
<xsl:when test="@provenanceaction !=''">
|
194
|
<xsl:value-of select="@provenanceaction"/>
|
195
|
</xsl:when>
|
196
|
<xsl:otherwise>
|
197
|
<xsl:text></xsl:text>
|
198
|
</xsl:otherwise>
|
199
|
</xsl:choose>
|
200
|
</xsl:attribute>
|
201
|
</field>
|
202
|
<field name="taxonomy" indexId="" multiplicity="false">
|
203
|
<xsl:attribute name="value">
|
204
|
<xsl:choose>
|
205
|
<xsl:when test="@classname !=''">
|
206
|
<xsl:value-of select="@classname"/>
|
207
|
</xsl:when>
|
208
|
<xsl:otherwise>
|
209
|
<xsl:text></xsl:text>
|
210
|
</xsl:otherwise>
|
211
|
</xsl:choose>
|
212
|
</xsl:attribute>
|
213
|
</field>
|
214
|
</field>
|
215
|
</xsl:for-each>
|
216
|
|
217
|
<xsl:for-each select = "./relevantdate">
|
218
|
<field name="relevantyear" indexId = "" multiplicity="true" label="Relevant year">
|
219
|
<xsl:attribute name="value">
|
220
|
<xsl:value-of select='substring-before(.,"-")'/>
|
221
|
</xsl:attribute>
|
222
|
</field>
|
223
|
<field name="relevantdate" indexId = "resultdate" multiplicity="true" label="Relevant date">
|
224
|
<xsl:attribute name="value">
|
225
|
<xsl:value-of select='.'/>
|
226
|
</xsl:attribute>
|
227
|
</field>
|
228
|
</xsl:for-each>
|
229
|
|
230
|
<xsl:for-each select = "./pid">
|
231
|
<field name="pid" multiplicity="true" label="Pid">
|
232
|
<field name="value" indexId = "pid" multiplicity="false" label="Pid">
|
233
|
<xsl:attribute name="value">
|
234
|
<xsl:value-of select='.'/>
|
235
|
</xsl:attribute>
|
236
|
</field>
|
237
|
<field name="classid" indexId = "pidclassid" multiplicity="false" label="Pid class id">
|
238
|
<xsl:attribute name="value">
|
239
|
<xsl:value-of select='./@classid'/>
|
240
|
</xsl:attribute>
|
241
|
</field>
|
242
|
<field name="classname" indexId = "pidclassname" multiplicity="false" label="Pid class name">
|
243
|
<xsl:attribute name="value">
|
244
|
<xsl:value-of select='./@classname'/>
|
245
|
</xsl:attribute>
|
246
|
</field>
|
247
|
</field>
|
248
|
</xsl:for-each>
|
249
|
|
250
|
<xsl:for-each select="./bestaccessright">
|
251
|
<field name="bestaccessright" indexId="resultbestaccessright" multiplicity="false" label="Best License">
|
252
|
<xsl:attribute name="value">
|
253
|
<xsl:value-of select="@classid" />
|
254
|
</xsl:attribute>
|
255
|
</field>
|
256
|
</xsl:for-each>
|
257
|
|
258
|
<xsl:for-each select = "./embargoenddate">
|
259
|
<field name="embargoendyear" indexId = "" multiplicity="true" label="Embargo end year">
|
260
|
<xsl:attribute name="value">
|
261
|
<xsl:value-of select='substring-before(.,"-")'/>
|
262
|
</xsl:attribute>
|
263
|
</field>
|
264
|
<field name="embargoenddate" indexId = "resultembargoenddate" multiplicity="true" label="Embargo end date">
|
265
|
<xsl:attribute name="value">
|
266
|
<xsl:value-of select='.'/>
|
267
|
</xsl:attribute>
|
268
|
</field>
|
269
|
</xsl:for-each>
|
270
|
|
271
|
<xsl:for-each select = "./journal">
|
272
|
<field name="journal" indexId = "" multiplicity="true" label="Journal">
|
273
|
<xsl:attribute name="value">
|
274
|
<xsl:value-of select='.'/>
|
275
|
</xsl:attribute>
|
276
|
</field>
|
277
|
</xsl:for-each>
|
278
|
|
279
|
<xsl:for-each select = "./collectedfrom">
|
280
|
<field name="collectedfrom">
|
281
|
<field name="collectedfromid" indexId = "resultcollectedfromdatasourceid" multiplicity="true" label="Collected from">
|
282
|
<xsl:attribute name="value">
|
283
|
<xsl:value-of select='./@id'/>
|
284
|
</xsl:attribute>
|
285
|
</field>
|
286
|
<field name="collectedfromname" indexId = "" multiplicity="true" label="Collected from">
|
287
|
<xsl:attribute name="value">
|
288
|
<xsl:value-of select='./@name'/>
|
289
|
</xsl:attribute>
|
290
|
</field>
|
291
|
</field>
|
292
|
</xsl:for-each>
|
293
|
|
294
|
<xsl:for-each select = "./device">
|
295
|
<field name="device" indexId = "" multiplicity="true" label="Device">
|
296
|
<xsl:attribute name="value">
|
297
|
<xsl:value-of select='.'/>
|
298
|
</xsl:attribute>
|
299
|
</field>
|
300
|
</xsl:for-each>
|
301
|
|
302
|
<xsl:for-each select = "./size">
|
303
|
<field name="size" indexId = "" multiplicity="true" label="Size">
|
304
|
<xsl:attribute name="value">
|
305
|
<xsl:value-of select='.'/>
|
306
|
</xsl:attribute>
|
307
|
</field>
|
308
|
</xsl:for-each>
|
309
|
|
310
|
<xsl:for-each select = "./format">
|
311
|
<field name="format" indexId = "" multiplicity="true" label="Format">
|
312
|
<xsl:attribute name="value">
|
313
|
<xsl:value-of select='.'/>
|
314
|
</xsl:attribute>
|
315
|
</field>
|
316
|
</xsl:for-each>
|
317
|
|
318
|
<xsl:for-each select = "./version">
|
319
|
<field name="version" indexId = "" multiplicity="true" label="Version">
|
320
|
<xsl:attribute name="value">
|
321
|
<xsl:value-of select='.'/>
|
322
|
</xsl:attribute>
|
323
|
</field>
|
324
|
</xsl:for-each>
|
325
|
|
326
|
<xsl:for-each select = "./lastmetadataupdate">
|
327
|
<field name="lastmetadataupdate" indexId = "" multiplicity="true" label="Last metadata update">
|
328
|
<xsl:attribute name="value">
|
329
|
<xsl:value-of select='.'/>
|
330
|
</xsl:attribute>
|
331
|
</field>
|
332
|
</xsl:for-each>
|
333
|
|
334
|
<xsl:for-each select = "./metadataversionnumber">
|
335
|
<field name="metadataversionnumber" indexId = "" multiplicity="true" label="Metadata version number">
|
336
|
<xsl:attribute name="value">
|
337
|
<xsl:value-of select='.'/>
|
338
|
</xsl:attribute>
|
339
|
</field>
|
340
|
</xsl:for-each>
|
341
|
|
342
|
<xsl:for-each select = "./source">
|
343
|
<field name="source" indexId = "" multiplicity="true" label="source">
|
344
|
<xsl:attribute name="value">
|
345
|
<xsl:value-of select='.'/>
|
346
|
</xsl:attribute>
|
347
|
</field>
|
348
|
</xsl:for-each>
|
349
|
|
350
|
<xsl:for-each select = "./context">
|
351
|
<field indexId="context" multiplicity="true" name="context" >
|
352
|
|
353
|
<xsl:attribute name="value">
|
354
|
<xsl:value-of select='./@value'/>
|
355
|
</xsl:attribute>
|
356
|
<xsl:attribute name="value_original">
|
357
|
<xsl:value-of select='./@id'/>
|
358
|
</xsl:attribute>
|
359
|
|
360
|
<field name="contexttype" indexId="contexttype" multiplicity="false" label="Context Type">
|
361
|
<xsl:attribute name="value">
|
362
|
<xsl:value-of select="@type"></xsl:value-of>
|
363
|
</xsl:attribute>
|
364
|
</field>
|
365
|
|
366
|
<xsl:for-each select = "./category">
|
367
|
<field name="category" indexId="category" multiplicity="true" label="Category" >
|
368
|
<xsl:attribute name="value">
|
369
|
<xsl:value-of select='./@label' />
|
370
|
</xsl:attribute>
|
371
|
<xsl:attribute name="value_original">
|
372
|
<xsl:value-of select='./@id'/>
|
373
|
</xsl:attribute>
|
374
|
|
375
|
<xsl:for-each select = ".//concept">
|
376
|
<field name="concept" indexId="concept" multiplicity="true" label="Concept" >
|
377
|
<xsl:attribute name="value">
|
378
|
<xsl:value-of select='./@label'/>
|
379
|
</xsl:attribute>
|
380
|
<xsl:attribute name="value_original">
|
381
|
<xsl:value-of select='./@id'/>
|
382
|
</xsl:attribute>
|
383
|
</field>
|
384
|
</xsl:for-each>
|
385
|
</field>
|
386
|
</xsl:for-each>
|
387
|
</field>
|
388
|
</xsl:for-each>
|
389
|
</xsl:template>
|
390
|
|
391
|
|
392
|
<xsl:template match="extraInfo">
|
393
|
<xsl:for-each select="./citations/citation">
|
394
|
<field name="citation" multiplicity="true" indexId="" label="Citation">
|
395
|
<field name="rawText" multiplicity="false" indexId="" label="Citation Text">
|
396
|
<xsl:attribute name="value">
|
397
|
<xsl:value-of select="rawText"/>
|
398
|
</xsl:attribute>
|
399
|
</field>
|
400
|
<xsl:for-each select="id">
|
401
|
<field name="citationId" indexId="" multiplicity="true" label="Citation id details">
|
402
|
<field name="id" multiplicity="false" indexId="" label="Citation id">
|
403
|
<xsl:attribute name="value">
|
404
|
<xsl:value-of select="@value"/>
|
405
|
</xsl:attribute>
|
406
|
</field>
|
407
|
<field name="type" multiplicity="false" indexId="" label="Citation id type">
|
408
|
<xsl:attribute name="value">
|
409
|
<xsl:value-of select="@type"/>
|
410
|
</xsl:attribute>
|
411
|
</field>
|
412
|
<field name="confidenceLevel" multiplicity="false" indexId="" label="Citation id confidence">
|
413
|
<xsl:attribute name="value">
|
414
|
<xsl:value-of select="@confidenceLevel"/>
|
415
|
</xsl:attribute>
|
416
|
</field>
|
417
|
</field>
|
418
|
</xsl:for-each>
|
419
|
</field>
|
420
|
</xsl:for-each>
|
421
|
</xsl:template>
|
422
|
|
423
|
<xsl:template match="rel">
|
424
|
<!--PROJECT-->
|
425
|
<xsl:if test="./to/@type='project'">
|
426
|
<field name="project" indexId = "objIdentifier" multiplicity="true">
|
427
|
<xsl:attribute name="value"><xsl:value-of select='./to'/> </xsl:attribute>
|
428
|
<field name = "inferred" indexId="" multiplicity = "false" label="inferred">
|
429
|
<xsl:attribute name="value">
|
430
|
<xsl:choose>
|
431
|
<xsl:when test="@inferred !=''">
|
432
|
<xsl:value-of select="@inferred"/>
|
433
|
</xsl:when>
|
434
|
<xsl:otherwise>
|
435
|
<xsl:text>false</xsl:text>
|
436
|
</xsl:otherwise>
|
437
|
</xsl:choose>
|
438
|
</xsl:attribute>
|
439
|
</field>
|
440
|
<field name = "trust" indexId="" multiplicity = "false" label="trust level">
|
441
|
<xsl:attribute name="value">
|
442
|
<xsl:choose>
|
443
|
<xsl:when test="@trust !=''">
|
444
|
<xsl:value-of select="@trust"/>
|
445
|
</xsl:when>
|
446
|
<xsl:otherwise>
|
447
|
<xsl:text>NEUTRAL</xsl:text>
|
448
|
</xsl:otherwise>
|
449
|
</xsl:choose>
|
450
|
</xsl:attribute>
|
451
|
</field>
|
452
|
<field name = "provenance" indexId="" multiplicity = "false" label="provenance">
|
453
|
<xsl:attribute name="value">
|
454
|
<xsl:choose>
|
455
|
<xsl:when test="@provenanceaction !=''">
|
456
|
<xsl:value-of select="@provenanceaction"/>
|
457
|
</xsl:when>
|
458
|
<xsl:otherwise>
|
459
|
<xsl:text></xsl:text>
|
460
|
</xsl:otherwise>
|
461
|
</xsl:choose>
|
462
|
</xsl:attribute>
|
463
|
</field>
|
464
|
<field name = "projectId" indexId ="objIdentifier" multiplicity="false" label="Project id">
|
465
|
<xsl:attribute name="value"><xsl:value-of select='./to'/> </xsl:attribute>
|
466
|
</field>
|
467
|
<field name = "role" indexId ="" multiplicity="false" label="role">
|
468
|
<xsl:attribute name="value"><xsl:value-of select='./to/@class'/> </xsl:attribute>
|
469
|
</field>
|
470
|
<field name = "projectcode" indexId ="projectcode" multiplicity="false" label="Project(s)">
|
471
|
<xsl:attribute name="value"><xsl:value-of select='./code'/> </xsl:attribute>
|
472
|
</field>
|
473
|
<field name = "projectacronym" indexId ="projectacronym" multiplicity="false" label="Project(s)">
|
474
|
<xsl:attribute name="value"><xsl:value-of select='./acronym'/> </xsl:attribute>
|
475
|
</field>
|
476
|
<field name = "projecttitle" indexId ="projecttitle" multiplicity="false" label="Project title">
|
477
|
<xsl:attribute name="value"><xsl:value-of select='./title'/> </xsl:attribute>
|
478
|
</field>
|
479
|
<field name = "projectcontracttypeid" indexId ="projectcontracttypeid" multiplicity="false" label="Project contract type id">
|
480
|
<xsl:attribute name="value"><xsl:value-of select='./contracttype/@classid'/> </xsl:attribute>
|
481
|
</field>
|
482
|
<field name = "projectcontracttypename" indexId ="projectcontracttypename" multiplicity="false" label="Project contract type name">
|
483
|
<xsl:attribute name="value"><xsl:value-of select='./contracttype/@classname'/> </xsl:attribute>
|
484
|
</field>
|
485
|
<field name = "funding" indexId = "" multiplicity = "false">
|
486
|
<field name = "funder" indexId = "relfunder" multiplicity = "true">
|
487
|
<xsl:attribute name="value_original">
|
488
|
<xsl:value-of select="./funding/funder/@id"/>
|
489
|
</xsl:attribute>
|
490
|
<xsl:attribute name = "value">
|
491
|
<xsl:call-template name="getExtension">
|
492
|
<xsl:with-param name="filename" select="./funding/funder/@id"/>
|
493
|
</xsl:call-template>
|
494
|
<!--xsl:value-of select='./funding/funding_level_0'/-->
|
495
|
</xsl:attribute>
|
496
|
</field>
|
497
|
<field name = "fundershortname" indexId = "relfundershortname" multiplicity = "true">
|
498
|
<xsl:attribute name = "value">
|
499
|
<xsl:call-template name="getExtension">
|
500
|
<xsl:with-param name="filename" select="./funding/funder/@shortname"/>
|
501
|
</xsl:call-template>
|
502
|
</xsl:attribute>
|
503
|
</field>
|
504
|
<field name = "funding_level_0" indexId = "fundinglevel0_id" multiplicity = "false">
|
505
|
<xsl:attribute name="value_original">
|
506
|
<xsl:value-of select="./funding/funding_level_0"/>
|
507
|
</xsl:attribute>
|
508
|
<xsl:attribute name = "value">
|
509
|
<xsl:call-template name="getExtension">
|
510
|
<xsl:with-param name="filename" select="./funding/funding_level_0/@name"/>
|
511
|
</xsl:call-template>
|
512
|
<!--xsl:value-of select='./funding/funding_level_0'/-->
|
513
|
</xsl:attribute>
|
514
|
</field>
|
515
|
<field name = "funding_level_1" indexId = "fundinglevel1_id" multiplicity = "false">
|
516
|
<xsl:if test="not(starts-with(./funding/funding_level_1, 'ec__________::EC::FP7::'))">
|
517
|
<xsl:attribute name="value_original">
|
518
|
<xsl:value-of select="./funding/funding_level_1"/>
|
519
|
</xsl:attribute>
|
520
|
<xsl:attribute name = "value">
|
521
|
<xsl:call-template name="getExtension">
|
522
|
<xsl:with-param name="filename" select="./funding/funding_level_1/@name"/>
|
523
|
</xsl:call-template>
|
524
|
</xsl:attribute>
|
525
|
</xsl:if>
|
526
|
<xsl:if test="starts-with(./funding/funding_level_1, 'ec__________::EC::FP7::')">
|
527
|
<xsl:attribute name="value">
|
528
|
<xsl:value-of select="./funding/funding_level_1"/>
|
529
|
</xsl:attribute>
|
530
|
</xsl:if>
|
531
|
<!--<xsl:attribute name = "value">
|
532
|
<xsl:call-template name="getExtension">
|
533
|
<xsl:with-param name="filename" select="./funding/funding_level_1"/>
|
534
|
</xsl:call-template>
|
535
|
<!–xsl:value-of select='./funding/funding_level_1'/–>
|
536
|
</xsl:attribute>-->
|
537
|
</field>
|
538
|
<field name = "funding_level_2" indexId = "fundinglevel2_id" multiplicity = "false">
|
539
|
<xsl:if test="not(starts-with(./funding/funding_level_2, 'ec__________::EC::FP7::'))">
|
540
|
<xsl:attribute name="value_original">
|
541
|
<xsl:value-of select="./funding/funding_level_2"/>
|
542
|
</xsl:attribute>
|
543
|
<xsl:attribute name = "value">
|
544
|
<xsl:call-template name="getExtension">
|
545
|
<xsl:with-param name="filename" select="./funding/funding_level_2/@name"/>
|
546
|
</xsl:call-template>
|
547
|
</xsl:attribute>
|
548
|
</xsl:if>
|
549
|
<xsl:if test="starts-with(./funding/funding_level_2, 'ec__________::EC::FP7::')">
|
550
|
<xsl:attribute name="value">
|
551
|
<xsl:value-of select="./funding/funding_level_2"/>
|
552
|
</xsl:attribute>
|
553
|
</xsl:if>
|
554
|
<!-- <xsl:attribute name = "value">
|
555
|
<xsl:call-template name="getExtension">
|
556
|
<xsl:with-param name="filename" select="./funding/funding_level_2"/>
|
557
|
</xsl:call-template>
|
558
|
</xsl:attribute>
|
559
|
-->
|
560
|
</field>
|
561
|
</field>
|
562
|
</field>
|
563
|
</xsl:if>
|
564
|
<!--RESULT-->
|
565
|
<xsl:if test="./to/@type='result'">
|
566
|
<field indexId = "objIdentifier" multiplicity="true">
|
567
|
<xsl:attribute name="name"><xsl:value-of select='./to/@class'/></xsl:attribute>
|
568
|
<xsl:attribute name="value"><xsl:value-of select='./to'/> </xsl:attribute>
|
569
|
<field name = "resultid" indexId ="objIdentifier" multiplicity="false" label="Result id">
|
570
|
<xsl:attribute name="value"><xsl:value-of select='./to'/> </xsl:attribute>
|
571
|
</field>
|
572
|
<field name = "title" indexId = "resulttitle" multiplicity = "false" label = "Title">
|
573
|
<xsl:attribute name="value">
|
574
|
<xsl:value-of select="./title"/>
|
575
|
</xsl:attribute>
|
576
|
</field>
|
577
|
<field name = "dateofacceptance" indexId = "resultdateofacceptance" multiplicity = "false" label = "Date of acceptance">
|
578
|
<xsl:attribute name="value">
|
579
|
<xsl:value-of select="./dateofacceptance"/>
|
580
|
</xsl:attribute>
|
581
|
</field>
|
582
|
<field name = "resulttypeid" indexId = "resulttypeid" multiplicity = "false" label = "type id">
|
583
|
<xsl:attribute name="value">
|
584
|
<xsl:value-of select="./resulttype/@classid"/>
|
585
|
</xsl:attribute>
|
586
|
</field>
|
587
|
<field name = "resulttypename" indexId = "resulttypename" multiplicity = "false" label = "type name">
|
588
|
<xsl:attribute name="value">
|
589
|
<xsl:value-of select="./resulttype/@classname"/>
|
590
|
</xsl:attribute>
|
591
|
</field>
|
592
|
<field name = "inferred" indexId="" multiplicity = "false" label="inferred">
|
593
|
<xsl:attribute name="value">
|
594
|
<xsl:choose>
|
595
|
<xsl:when test="@inferred !=''">
|
596
|
<xsl:value-of select="@inferred"/>
|
597
|
</xsl:when>
|
598
|
<xsl:otherwise>
|
599
|
<xsl:text>false</xsl:text>
|
600
|
</xsl:otherwise>
|
601
|
</xsl:choose>
|
602
|
</xsl:attribute>
|
603
|
</field>
|
604
|
<field name = "trust" indexId="" multiplicity = "false" label="trust level">
|
605
|
<xsl:attribute name="value">
|
606
|
<xsl:choose>
|
607
|
<xsl:when test="@trust !=''">
|
608
|
<xsl:value-of select="@trust"/>
|
609
|
</xsl:when>
|
610
|
<xsl:otherwise>
|
611
|
<xsl:text>NEUTRAL</xsl:text>
|
612
|
</xsl:otherwise>
|
613
|
</xsl:choose>
|
614
|
</xsl:attribute>
|
615
|
</field>
|
616
|
<field name = "provenance" indexId="" multiplicity = "false" label="provenance">
|
617
|
<xsl:attribute name="value">
|
618
|
<xsl:choose>
|
619
|
<xsl:when test="@provenanceaction !=''">
|
620
|
<xsl:value-of select="@provenanceaction"/>
|
621
|
</xsl:when>
|
622
|
<xsl:otherwise>
|
623
|
<xsl:text></xsl:text>
|
624
|
</xsl:otherwise>
|
625
|
</xsl:choose>
|
626
|
</xsl:attribute>
|
627
|
</field>
|
628
|
<xsl:if test="./to/@class = 'hasAmongTopNSimilarDocuments'">
|
629
|
<field name="similarity" label="similarity" multiplicity="false" indexId="">
|
630
|
<xsl:attribute name="value">
|
631
|
<xsl:value-of select="similarity"/>
|
632
|
</xsl:attribute>
|
633
|
</field>
|
634
|
</xsl:if>
|
635
|
</field>
|
636
|
</xsl:if>
|
637
|
<!--ORGANIZATION-->
|
638
|
<xsl:if test="./to/@type='organization'">
|
639
|
<field name="organization" indexId = "objIdentifier" multiplicity="true">
|
640
|
<xsl:attribute name="value"><xsl:value-of select='./to'/> </xsl:attribute>
|
641
|
<field name = "organizationid" indexId ="objIdentifier" multiplicity="false" label="Organization id">
|
642
|
<xsl:attribute name="value"><xsl:value-of select='./to'/> </xsl:attribute>
|
643
|
</field>
|
644
|
<field name = "role" indexId ="" multiplicity="false" label="role">
|
645
|
<xsl:attribute name="value"><xsl:value-of select='./to/@class'/> </xsl:attribute>
|
646
|
</field>
|
647
|
<field name = "legalshortname" indexId ="organizationlegalshortname" multiplicity="false" label="Organization short name">
|
648
|
<xsl:attribute name="value"><xsl:value-of select='./legalshortname'/> </xsl:attribute>
|
649
|
</field>
|
650
|
<field name = "websiteurl" indexId ="organizationwebsiteurl" multiplicity="false" label="Website">
|
651
|
<xsl:attribute name="value"><xsl:value-of select='./websiteurl'/> </xsl:attribute>
|
652
|
</field>
|
653
|
<field name = "countryid" indexId ="organizationcountryid" multiplicity="false" label="Country code">
|
654
|
<xsl:attribute name="value"><xsl:value-of select='./country/@classid'/> </xsl:attribute>
|
655
|
</field>
|
656
|
<field name = "countryname" indexId ="organizationcountryname" multiplicity="false" label="Country">
|
657
|
<xsl:attribute name="value"><xsl:value-of select='./country/@classname'/> </xsl:attribute>
|
658
|
</field>
|
659
|
<field name = "participantnumber" indexId ="" multiplicity="false" label="Participant Number">
|
660
|
<xsl:attribute name="value"><xsl:value-of select='./participantnumber'/> </xsl:attribute>
|
661
|
</field>
|
662
|
<field name = "contactperson" indexId ="" multiplicity="false" label="Contact Person">
|
663
|
<xsl:attribute name="value"><xsl:value-of select='./contactperson'/> </xsl:attribute>
|
664
|
</field>
|
665
|
</field>
|
666
|
</xsl:if>
|
667
|
|
668
|
</xsl:template>
|
669
|
<!-- CHILDREN -->
|
670
|
|
671
|
<xsl:template match="children/result">
|
672
|
<field name="resultId" multiplicity="true" indexId="resultid" label="Result id">
|
673
|
<xsl:attribute name="value">
|
674
|
<xsl:value-of select='./@objidentifier'/>
|
675
|
</xsl:attribute>
|
676
|
</field>
|
677
|
</xsl:template>
|
678
|
|
679
|
<xsl:template match="children">
|
680
|
|
681
|
<xsl:for-each select = "./instance">
|
682
|
<field name = "datasource" indexId = "resultcollectedfromdatasourceid" multiplicity="true">
|
683
|
<xsl:attribute name = "value"> <xsl:value-of select="./@id"/> </xsl:attribute><!--??-->
|
684
|
<field name = "instanceId" indexId = "objIdentifier" multiplicity = "false">
|
685
|
<xsl:attribute name="value"><xsl:value-of select="./@id"/></xsl:attribute>
|
686
|
</field>
|
687
|
<field name = "hostedby" indexId = "resulthostingdatasourceid" multiplicity="false">
|
688
|
<xsl:attribute name = "value"> <xsl:value-of select="./hostedby/@id"/> </xsl:attribute>
|
689
|
</field>
|
690
|
<field name = "hostedbyname" indexId = "resulthostingdatasourcename" multiplicity="false">
|
691
|
<xsl:attribute name = "value"> <xsl:value-of select="./hostedby/@name"/> </xsl:attribute>
|
692
|
</field>
|
693
|
<xsl:for-each select="./accessright">
|
694
|
<field name = "accessrightid" indexId = "" multiplicity = "true">
|
695
|
<xsl:attribute name = "value"> <xsl:value-of select="./@classid"/> </xsl:attribute>
|
696
|
</field>
|
697
|
<field name = "accessrightname" indexId = "resultrights" multiplicity = "true">
|
698
|
<xsl:attribute name = "value"> <xsl:value-of select="./@classname"/> </xsl:attribute>
|
699
|
</field>
|
700
|
</xsl:for-each>
|
701
|
<xsl:for-each select="./instancetype">
|
702
|
<field name = "typeid" indexId = "instancetypeid" multiplicity = "true">
|
703
|
<xsl:attribute name = "value"> <xsl:value-of select="./@classid"/> </xsl:attribute>
|
704
|
</field>
|
705
|
<field name = "typename" indexId = "instancetypename" multiplicity = "true">
|
706
|
<xsl:attribute name = "value"> <xsl:value-of select="./@classname"/> </xsl:attribute>
|
707
|
</field>
|
708
|
</xsl:for-each>
|
709
|
|
710
|
<xsl:for-each select="./webresource">
|
711
|
<field name = "webresource" indexId = "" multiplicity="true">
|
712
|
<xsl:attribute name = "value"> <xsl:value-of select="."/> </xsl:attribute>
|
713
|
</field>
|
714
|
<xsl:for-each select="./url">
|
715
|
<field name = "url" indexId = "" multiplicity="true">
|
716
|
<xsl:attribute name = "value"> <xsl:value-of select="."/> </xsl:attribute>
|
717
|
</field>
|
718
|
</xsl:for-each>
|
719
|
</xsl:for-each>
|
720
|
<!--field name = "officialname" indexId = "" multiplicity="false">
|
721
|
<xsl:attribute name = "value"> <xsl:value-of select="./datasource/officialname"/> </xsl:attribute>
|
722
|
</field>
|
723
|
<field name = "datasourcetypeid" indexId = "" multiplicity = "true">
|
724
|
<xsl:attribute name = "value"> <xsl:value-of select="./datasource/datasourcetype/@classid"/> </xsl:attribute>
|
725
|
</field>
|
726
|
<field name = "datasourcetypename" indexId = "" multiplicity = "true">
|
727
|
<xsl:attribute name = "value"> <xsl:value-of select="./datasource/datasourcetype/@classname"/> </xsl:attribute>
|
728
|
</field-->
|
729
|
|
730
|
</field>
|
731
|
</xsl:for-each>
|
732
|
|
733
|
<xsl:for-each select = "./externalreference">
|
734
|
<field name="externalreference" multiplicity="true" indexId="">
|
735
|
<field name="sitename" multiplicity="false" indexId="">
|
736
|
<xsl:attribute name="value">
|
737
|
<xsl:value-of select="./sitename"/>
|
738
|
</xsl:attribute>
|
739
|
</field>
|
740
|
<field name="label" multiplicity="false" indexId="">
|
741
|
<xsl:attribute name="value">
|
742
|
<xsl:value-of select="./label"/>
|
743
|
</xsl:attribute>
|
744
|
</field>
|
745
|
|
746
|
<field name="url" multiplicity="false" indexId="">
|
747
|
<xsl:attribute name="value">
|
748
|
<xsl:value-of select="./url"/>
|
749
|
</xsl:attribute>
|
750
|
</field>
|
751
|
|
752
|
<field name="typeid" multiplicity="false" indexId="">
|
753
|
<xsl:attribute name="value">
|
754
|
<xsl:value-of select="./qualifier/@classid"/>
|
755
|
</xsl:attribute>
|
756
|
</field>
|
757
|
<field name="refidentifier" multiplicity="false" indexId="">
|
758
|
<xsl:attribute name="value">
|
759
|
<xsl:value-of select="./refidentifier"/>
|
760
|
</xsl:attribute>
|
761
|
</field>
|
762
|
</field>
|
763
|
</xsl:for-each>
|
764
|
</xsl:template>
|
765
|
|
766
|
<xsl:template name="getExtension">
|
767
|
<xsl:param name="filename"/>
|
768
|
<xsl:choose>
|
769
|
<xsl:when test="contains($filename, '::')">
|
770
|
<xsl:call-template name="getExtension">
|
771
|
<xsl:with-param name="filename" select="substring-after($filename, '::')"/>
|
772
|
</xsl:call-template>
|
773
|
</xsl:when>
|
774
|
<xsl:otherwise>
|
775
|
<xsl:value-of select="$filename"/>
|
776
|
</xsl:otherwise>
|
777
|
</xsl:choose>
|
778
|
</xsl:template>
|
779
|
|
780
|
</xsl:stylesheet>
|
781
|
|
782
|
|