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="html" encoding="utf-8" omit-xml-declaration="yes" />
9

    
10
    <!-- strip whitespace from whitespace-only nodes -->
11
    <xsl:strip-space elements="*"/>
12

    
13
    <!-- Project title, Project Acronym, Project ID, Funder, Funding Stream, Funding Substream level 1, Funding Substream level 2, SC39, Start Date, End Date -->
14

    
15
    <xsl:template match = "/">
16
        <table>
17
            <thead>
18
                <tr>
19
                    <th>Project title</th>
20
                    <th>Project Acronym</th>
21
                    <th>Project ID</th>
22
                    <th>Funder</th>
23
                    <th>Funding Stream</th>
24
                    <th>Funding Substream level 1</th>
25
                    <th>Funding Substream level 2</th>
26
                    <th>SC39</th>
27
                    <th>Start Date</th>
28
                    <th>End Date</th>
29
                </tr>
30
            </thead>
31
            <tbody>
32
                <xsl:apply-templates select="//oaf:project"/>
33
            </tbody>
34
        </table>
35
    </xsl:template>
36

    
37
    <xsl:template match="//oaf:project">
38
        <xsl:for-each select="fundingtree">
39
            <tr>
40
                <!-- Project title -->
41
                <td>
42
                    <xsl:value-of select="../title"/>
43
                </td>
44

    
45
                <!-- Project Acronym -->
46
                <td>
47
                    <xsl:value-of select="../acronym"/>
48
                </td>
49

    
50
                <!-- Project ID -->
51
                <td>
52
                    <xsl:value-of select="../code"/>
53
                </td>
54

    
55
                <!-- Funder -->
56
                <td>
57
                    <xsl:value-of select="funder/shortname"/>
58
                </td>
59

    
60
                <!-- Funding Stream -->
61
                <td>
62
                    <xsl:value-of select=".//funding_level_0/name"/>
63
                </td>
64

    
65
                <!-- Funding Substream Level 1 -->
66
                <td>
67
                    <xsl:value-of select=".//funding_level_1/name"/>
68
                </td>
69

    
70
                <!-- Funding Substream Level 2 -->
71
                <td>
72
                    <xsl:value-of select=".//funding_level_2/name"/>
73
                </td>
74

    
75
                <!-- SC39 -->
76
                <td>
77
                    <xsl:value-of select="../ecsc39"/>
78
                </td>
79

    
80
                <!-- Start Date -->
81
                <td>
82
                <xsl:value-of select="../startdate"/>
83
                </td>
84

    
85
                <!-- End Date -->
86
                <td>
87
                    <xsl:value-of select="../enddate"/>
88
                </td>
89

    
90
            </tr>
91
        </xsl:for-each>
92
    </xsl:template>
93

    
94
</xsl:stylesheet>
(33-33/48)