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="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:apply-templates select="//oaf:organization"/>
|
15
|
</xsl:template>
|
16
|
|
17
|
<!-- Name, Projects, Country -->
|
18
|
<xsl:template match="oaf:organization">
|
19
|
|
20
|
<!-- Title -->
|
21
|
<xsl:text>"</xsl:text>
|
22
|
<xsl:value-of select="legalname"/>
|
23
|
<xsl:text>",</xsl:text>
|
24
|
|
25
|
<xsl:for-each select="rels/rel/to[@class='isParticipant']">
|
26
|
<xsl:value-of select="../funding/funder/@shortname"/>
|
27
|
<xsl:text>|</xsl:text>
|
28
|
<xsl:value-of select="../acronym"/>
|
29
|
<xsl:text>(</xsl:text>
|
30
|
<xsl:value-of select="../code"/>
|
31
|
<xsl:text>)</xsl:text>
|
32
|
<xsl:if test="not(position()=last())">
|
33
|
<xsl:text>;</xsl:text>
|
34
|
</xsl:if>
|
35
|
</xsl:for-each>
|
36
|
<xsl:text>,</xsl:text>
|
37
|
|
38
|
<xsl:value-of select="country/@classname"/>
|
39
|
<xsl:text>
</xsl:text>
|
40
|
|
41
|
</xsl:template>
|
42
|
|
43
|
</xsl:stylesheet>
|