1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
<xsl:stylesheet version="1.0"
|
3
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions"
|
4
|
exclude-result-prefixes="fn">
|
5
|
|
6
|
<xsl:variable name="namespacePrefix" select="string('wt__________')" />
|
7
|
<xsl:variable name="funderID" select="concat($namespacePrefix, '::WT')" />
|
8
|
|
9
|
<xsl:template match="/">
|
10
|
<xsl:variable name="funding">
|
11
|
<xsl:choose>
|
12
|
<xsl:when test="normalize-space(.//FundingStream)">
|
13
|
<xsl:value-of select="normalize-space(.//FundingStream)" />
|
14
|
</xsl:when>
|
15
|
<xsl:otherwise>
|
16
|
<xsl:value-of select="string('UNKNOWN')" />
|
17
|
</xsl:otherwise>
|
18
|
</xsl:choose>
|
19
|
</xsl:variable>
|
20
|
|
21
|
<fundingtree>
|
22
|
<funder>
|
23
|
<id>
|
24
|
<xsl:value-of select="$funderID" />
|
25
|
</id>
|
26
|
<shortname>WT</shortname>
|
27
|
<name>Wellcome Trust</name>
|
28
|
<jurisdiction></jurisdiction>
|
29
|
</funder>
|
30
|
<funding_level_0>
|
31
|
<id>
|
32
|
<xsl:value-of select="concat($funderID, '::', $funding)" />
|
33
|
</id>
|
34
|
<description>
|
35
|
<xsl:value-of select="$funding" />
|
36
|
</description>
|
37
|
<name>
|
38
|
<xsl:value-of select="$funding" />
|
39
|
</name>
|
40
|
<parent></parent>
|
41
|
<class>wt:fundingStream</class>
|
42
|
</funding_level_0>
|
43
|
</fundingtree>
|
44
|
</xsl:template>
|
45
|
|
46
|
</xsl:stylesheet>
|