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
|
|
7
|
<!-- Turn off auto-insertion of <?xml> tag and set indenting on -->
|
8
|
<xsl:output method="text" encoding="utf-8" omit-xml-declaration="yes" media-type="text/csv" />
|
9
|
|
10
|
<!-- strip whitespace from whitespace-only nodes -->
|
11
|
<xsl:strip-space elements="*"/>
|
12
|
|
13
|
<xsl:template match = "/">
|
14
|
<xsl:text disable-output-escaping="yes">Project title,Project Acronym,Project ID,Funder,Funding Stream,Funding Substream level 1,Funding Substream level 2,SC39,Start Date,End Date
</xsl:text>
|
15
|
<xsl:apply-templates select="//oaf:project"/>
|
16
|
</xsl:template>
|
17
|
|
18
|
<!-- Project title, Project Acronym, Project ID, Funder, Funding Stream, Funding Substream level 1, Funding Substream level 2, SC39, Start Date, End Date -->
|
19
|
<xsl:template match="//oaf:project">
|
20
|
|
21
|
<xsl:for-each select="fundingtree">
|
22
|
<!-- Project title -->
|
23
|
<xsl:text>"</xsl:text>
|
24
|
<xsl:value-of select="../title"/>
|
25
|
<xsl:text>"</xsl:text>
|
26
|
<xsl:text>,</xsl:text>
|
27
|
|
28
|
<!-- Project Acronym -->
|
29
|
<xsl:text>"</xsl:text>
|
30
|
<xsl:value-of select="../acronym"/>
|
31
|
<xsl:text>"</xsl:text>
|
32
|
<xsl:text>,</xsl:text>
|
33
|
|
34
|
<!-- Project ID -->
|
35
|
<xsl:text>"</xsl:text>
|
36
|
<xsl:value-of select="../code"/>
|
37
|
<xsl:text>"</xsl:text>
|
38
|
<xsl:text>,</xsl:text>
|
39
|
|
40
|
<!-- Funder -->
|
41
|
<!--<xsl:for-each select="funder">-->
|
42
|
<xsl:text>"</xsl:text>
|
43
|
<xsl:value-of select="funder/shortname"/>
|
44
|
<xsl:text>"</xsl:text>
|
45
|
<!--</xsl:for-each>-->
|
46
|
<xsl:text>,</xsl:text>
|
47
|
|
48
|
<!-- Funding Stream-->
|
49
|
<!--<xsl:for-each select="funding_level_2/parent/funding_level_1/parent/funding_level_0">-->
|
50
|
<xsl:text>"</xsl:text>
|
51
|
<xsl:value-of select=".//funding_level_0/name"/>
|
52
|
<xsl:text>"</xsl:text>
|
53
|
<!--</xsl:for-each>-->
|
54
|
<xsl:text>,</xsl:text>
|
55
|
|
56
|
<!-- Funding Substream Level 1 -->
|
57
|
<!--<xsl:for-each select="funding_level_2/parent/funding_level_1">-->
|
58
|
<xsl:text>"</xsl:text>
|
59
|
<xsl:value-of select=".//funding_level_1/name"/>
|
60
|
<xsl:text>"</xsl:text>
|
61
|
<!--</xsl:for-each>-->
|
62
|
<xsl:text>,</xsl:text>
|
63
|
|
64
|
<!-- Funding Substream Level 2 -->
|
65
|
<!--<xsl:for-each select="funding_level_2">-->
|
66
|
<xsl:text>"</xsl:text>
|
67
|
<xsl:value-of select=".//funding_level_2/name"/>
|
68
|
<xsl:text>"</xsl:text>
|
69
|
<!--</xsl:for-each>-->
|
70
|
<xsl:text>,</xsl:text>
|
71
|
|
72
|
|
73
|
<!-- SC39 -->
|
74
|
<xsl:text>"</xsl:text>
|
75
|
<xsl:value-of select="../ecsc39"/>
|
76
|
<xsl:text>"</xsl:text>
|
77
|
<xsl:text>,</xsl:text>
|
78
|
|
79
|
<!-- Start Date -->
|
80
|
<xsl:text>"</xsl:text>
|
81
|
<xsl:value-of select="../startdate"/>
|
82
|
<xsl:text>"</xsl:text>
|
83
|
<xsl:text>,</xsl:text>
|
84
|
|
85
|
<!-- End Date -->
|
86
|
<xsl:text>"</xsl:text>
|
87
|
<xsl:value-of select="../enddate"/>
|
88
|
<xsl:text>"</xsl:text>
|
89
|
<xsl:text>
</xsl:text>
|
90
|
</xsl:for-each>
|
91
|
|
92
|
</xsl:template>
|
93
|
|
94
|
</xsl:stylesheet>
|