Project

General

Profile

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&#x9;Project Acronym&#x9;Project ID&#x9;Funder&#x9;Funding Stream&#x9;Funding Substream level 1&#x9;Funding Substream level 2&#x9;SC39&#x9;Start Date&#x9;End Date&#xD;</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>&quot;</xsl:text>
24
            <xsl:value-of select="../title"/>
25
            <xsl:text>&quot;</xsl:text>
26
            <xsl:text>&#x9;</xsl:text>
27

    
28
            <!-- Project Acronym -->
29
            <xsl:text>&quot;</xsl:text>
30
            <xsl:value-of select="../acronym"/>
31
            <xsl:text>&quot;</xsl:text>
32
            <xsl:text>&#x9;</xsl:text>
33

    
34
            <!-- Project ID -->
35
            <xsl:text>&quot;</xsl:text>
36
            <xsl:value-of select="../code"/>
37
            <xsl:text>&quot;</xsl:text>
38
            <xsl:text>&#x9;</xsl:text>
39

    
40
            <!-- Funder -->
41
<!--
42
            <xsl:for-each select="funder">
43
-->
44
                <xsl:text>&quot;</xsl:text>
45
                <xsl:value-of select="funder/shortname"/>
46
                <xsl:text>&quot;</xsl:text>
47
<!--
48
            </xsl:for-each>
49
-->
50
            <xsl:text>&#x9;</xsl:text>
51

    
52
            <!-- Funding Stream-->
53
<!--
54
            <xsl:for-each select="funding_level_2/parent/funding_level_1/parent/funding_level_0">
55
-->
56
                <xsl:text>&quot;</xsl:text>
57
                <xsl:value-of select=".//funding_level_0/name"/>
58
                <xsl:text>&quot;</xsl:text>
59
<!--
60
            </xsl:for-each>
61
-->
62
            <xsl:text>&#x9;</xsl:text>
63

    
64
            <!-- Funding Substream Level 1 -->
65
<!--
66
            <xsl:for-each select="funding_level_2/parent/funding_level_1">
67
-->
68
                <xsl:text>&quot;</xsl:text>
69
                <xsl:value-of select=".//funding_level_1/name"/>
70
                <xsl:text>&quot;</xsl:text>
71
<!--
72
            </xsl:for-each>
73
-->
74
            <xsl:text>&#x9;</xsl:text>
75

    
76
            <!-- Funding Substream Level 2 -->
77
<!--
78
            <xsl:for-each select="funding_level_2">
79
-->
80
                <xsl:text>&quot;</xsl:text>
81
                <xsl:value-of select=".//funding_level_2/name"/>
82
                <xsl:text>&quot;</xsl:text>
83
            <!--</xsl:for-each>-->
84
            <xsl:text>&#x9;</xsl:text>
85

    
86
            <!-- SC39 -->
87
            <xsl:text>&quot;</xsl:text>
88
            <xsl:value-of select="../ecsc39"/>
89
            <xsl:text>&quot;</xsl:text>
90
            <xsl:text>&#x9;</xsl:text>
91

    
92
            <!-- Start Date -->
93
            <xsl:text>&quot;</xsl:text>
94
            <xsl:value-of select="../startdate"/>
95
            <xsl:text>&quot;</xsl:text>
96
            <xsl:text>&#x9;</xsl:text>
97

    
98
            <!-- End Date -->
99
            <xsl:text>&quot;</xsl:text>
100
            <xsl:value-of select="../enddate"/>
101
            <xsl:text>&quot;</xsl:text>
102
            <xsl:text>&#xD;</xsl:text>
103

    
104
        </xsl:for-each>
105

    
106
    </xsl:template>
107

    
108
</xsl:stylesheet>
(38-38/51)