Project

General

Profile

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('rcuk________')"/>
7
	<xsl:variable name="funderID" select="concat($namespacePrefix, '::RCUK')"/>
8

    
9
	<xsl:template match="/">
10
		<xsl:variable name="funding" select="//funder/name"/>
11
		<fundingtree>
12
			<funder>
13
				<id>
14
					<xsl:value-of select="$funderID"/>
15
				</id>
16
				<shortname>RCUK</shortname>
17
				<name>Research Council UK</name>
18
				<jurisdiction>GB</jurisdiction>
19
			</funder>
20
			<xsl:if test="string-length($funding) > 0">
21
			<funding_level_0>
22
				<id>
23
					<xsl:value-of select="concat($funderID, '::', $funding)"/>
24
				</id>
25
				<description>
26
					<xsl:value-of select="$funding"/>
27
				</description>
28
				<name>
29
					<xsl:value-of select="$funding"/>
30
				</name>
31
				<parent></parent>
32
				<class>rcuk:fundingStream</class>
33
			</funding_level_0>
34
			</xsl:if>
35
		</fundingtree>
36
	</xsl:template>
37
</xsl:stylesheet>
(21-21/30)