Revision 60432
Added by Miriam Baglioni about 3 years ago
sfi_contexts.xsl | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 | 2 |
|
3 | 3 |
<xsl:stylesheet version="1.0" |
4 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions"
|
|
5 |
exclude-result-prefixes="fn">
|
|
4 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions"
|
|
5 |
exclude-result-prefixes="fn">
|
|
6 | 6 |
|
7 | 7 |
<xsl:variable name="namespacePrefix" select="string('sfi_________')"/> |
8 | 8 |
<xsl:variable name="funderId" select="concat($namespacePrefix, '::SFI')"/> |
... | ... | |
20 | 20 |
<jurisdiction>IE</jurisdiction> |
21 | 21 |
</funder> |
22 | 22 |
<xsl:variable name="funding" select="normalize-space(.//column[@name='Programme Name'])"/> |
23 |
<xsl:variable name="sub_funding" select="normalize-space(.//column[@name='Sub-programme Name'])"/> |
|
23 | 24 |
<xsl:if test="$funding"> |
24 |
<funding_level_0> |
|
25 |
<id> |
|
26 |
<xsl:value-of select="concat($funderId, '::', $funding)"/> |
|
27 |
</id> |
|
28 |
<description> |
|
29 |
<xsl:value-of select="$funding"/> |
|
30 |
</description> |
|
31 |
<name> |
|
32 |
<xsl:value-of select="$funding"/> |
|
33 |
</name> |
|
34 |
<parent></parent> |
|
35 |
<class>sfi:fundingStream</class> |
|
36 |
</funding_level_0> |
|
25 |
<xsl:choose> |
|
26 |
<xsl:when test="$sub_funding"> |
|
27 |
<funding_level_1> |
|
28 |
<id> |
|
29 |
<xsl:value-of select="concat($funderId, '::' , $funding , '::' ,$sub_funding)"/> |
|
30 |
</id> |
|
31 |
<description> |
|
32 |
<xsl:value-of select="$sub_funding"/> |
|
33 |
</description> |
|
34 |
<name> |
|
35 |
<xsl:value-of select="$sub_funding"/> |
|
36 |
</name> |
|
37 |
<class>sfi:fundingStream</class> |
|
38 |
<parent> |
|
39 |
<funding_level_0> |
|
40 |
<id> |
|
41 |
<xsl:value-of select="concat($funderId, '::' , $funding)"/> |
|
42 |
</id> |
|
43 |
<description> |
|
44 |
<xsl:value-of select="$funding"/> |
|
45 |
</description> |
|
46 |
<name> |
|
47 |
<xsl:value-of select="$funding"/> |
|
48 |
</name> |
|
49 |
<parent/> |
|
50 |
<class>sfi:fundingStream</class> |
|
51 |
</funding_level_0> |
|
52 |
</parent> |
|
53 |
</funding_level_1> |
|
54 |
</xsl:when> |
|
55 |
<xsl:otherwise> |
|
56 |
<funding_level_0> |
|
57 |
<id> |
|
58 |
<xsl:value-of select="concat($funderId, '::', $funding)"/> |
|
59 |
</id> |
|
60 |
<description> |
|
61 |
<xsl:value-of select="$funding"/> |
|
62 |
</description> |
|
63 |
<name> |
|
64 |
<xsl:value-of select="$funding"/> |
|
65 |
</name> |
|
66 |
<parent></parent> |
|
67 |
<class>sfi:fundingStream</class> |
|
68 |
</funding_level_0> |
|
69 |
</xsl:otherwise> |
|
70 |
</xsl:choose> |
|
37 | 71 |
</xsl:if> |
38 | 72 |
</fundingtree> |
39 | 73 |
</xsl:template> |
40 |
</xsl:stylesheet> |
|
41 |
|
|
74 |
</xsl:stylesheet> |
Also available in: Unified diff
changed to consider funding stream to level two