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:output indent="yes"/>
7

    
8
	<xsl:template match="/">
9
		<fundings>
10
			<fundingtree>
11
				<funder>
12
					<id>nih_________::NIH</id>
13
					<shortname>NIH</shortname>
14
					<name>National Institutes of Health</name>
15
					<jurisdiction>US</jurisdiction>
16
				</funder>
17
			</fundingtree>
18
			<xsl:for-each select="//IC_NAME[./text() != '']">
19
				<fundingtree>
20
					<funder>
21
						<id>nih_________::NIH</id>
22
						<shortname>NIH</shortname>
23
						<name>National Institutes of Health</name>
24
						<jurisdiction>US</jurisdiction>
25
					</funder>
26
					<xsl:variable name="fundingName" select="fn:upper-case(normalize-space(.))"/>
27
					<funding_level_0>
28
						<id>
29
							<xsl:value-of select="concat('nih_________::NIH::', $fundingName)"/>
30
						</id>
31
						<name>
32
							<xsl:value-of select="$fundingName"/>
33
						</name>
34
						<description>
35
							<xsl:value-of select="$fundingName"/>
36
						</description>
37
						<parent></parent>
38
						<class>nih:fundingStream</class>
39
					</funding_level_0>
40
				</fundingtree>
41
			</xsl:for-each>
42
		</fundings>
43
	</xsl:template>
44
</xsl:stylesheet>
45

    
(11-11/18)