Project

General

Profile

1

    
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" media-type="text/html" />
9

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

    
13
    <xsl:template match = "/">
14
        <xsl:apply-templates select="//oaf:result"/>
15
    </xsl:template>
16

    
17
    <!-- Title, Authors, Publication Year, DOI, Download From, Publication Type, Journal, Funder, Project Name (GA Number), Access -->
18

    
19
    <xsl:template match="oaf:result">
20
        <tr>
21
            <!-- Type -->
22
            <td>
23
                <xsl:value-of select="resulttype/@classname"/>
24
            </td>
25

    
26
            <!-- Title -->
27
            <td>
28
                <xsl:value-of select="title"/>
29
            </td>
30

    
31
            <!-- Authors -->
32
            <td>
33
                <xsl:for-each select="creator">
34
                    <xsl:sort select="@rank"/>
35
                    <xsl:value-of select="."/>
36
                    <xsl:if test="not(position()=last())">
37
                        <xsl:text>;</xsl:text>
38
                    </xsl:if>
39
                </xsl:for-each>
40
            </td>
41

    
42
            <!-- Publication Year -->
43
            <td>
44
                <xsl:value-of select="dateofacceptance"/>
45
            </td>
46

    
47
            <!-- DOI -->
48
            <td>
49
                <xsl:apply-templates select="pid"/>
50
            </td>
51

    
52
            <!-- Download from -->
53
            <td>
54
                <a target="_blank">
55
                    <xsl:attribute name="href">
56
                        <xsl:value-of select="children/instance[1]/webresource[1]"/>
57
                    </xsl:attribute>
58
                    <xsl:value-of select="children/instance[1]/webresource[1]"/>
59
                </a>
60
            </td>
61

    
62
            <!-- Publication Type -->
63
            <td>
64
                <xsl:value-of select="children/instance[1]/instancetype/@classname"/>
65
            </td>
66

    
67
            <!-- Journal -->
68
            <td>
69
                <xsl:value-of select="replace(source, '[&#x007F;-&#x009F;]', ' ')"/>
70
            </td>
71

    
72
            <!-- Funder|Project Name (GA Number) -->
73
            <td>
74
                <xsl:for-each select="rels/rel/to[@class='isProducedBy']">
75
                    <xsl:value-of select="../funding/funder/@shortname"/>
76
                    <xsl:text>|</xsl:text>
77
                    <xsl:choose>
78
                        <xsl:when test="../acronym">
79
                            <xsl:value-of select="../acronym"/>
80
                        </xsl:when>
81
                        <xsl:otherwise>
82
                            <xsl:text>"</xsl:text>
83
                            <xsl:value-of select="../title"/>
84
                            <xsl:text>"</xsl:text>
85
                        </xsl:otherwise>
86
                    </xsl:choose>
87
                    <xsl:text>(</xsl:text>
88
                    <xsl:value-of select="../code"/>
89
                    <xsl:text>)</xsl:text>
90
                    <xsl:if test="not(position()=last())">
91
                        <xsl:text>;</xsl:text>
92
                    </xsl:if>
93
                </xsl:for-each>
94
            </td>
95

    
96
            <!-- Access -->
97
            <td>
98
                <xsl:value-of select="bestaccessright/@classname"/>
99
            </td>
100
        </tr>
101
    </xsl:template>
102

    
103
    <xsl:template match="pid[@classid='doi']">
104
        <xsl:value-of select="."/>
105
    </xsl:template>
106

    
107
</xsl:stylesheet>
(26-26/51)