Revision 48139
Added by Alessia Bardi almost 7 years ago
corda_contexts.xsl | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 | 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">
|
|
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 | 5 |
|
6 |
<xsl:variable name="namespacePrefix" select="string('ec__________')" />
|
|
7 |
<xsl:variable name="funderID" select="concat($namespacePrefix, '::EC')" />
|
|
6 |
<xsl:variable name="namespacePrefix" select="string('ec__________')"/> |
|
7 |
<xsl:variable name="funderID" select="concat($namespacePrefix, '::EC')"/> |
|
8 | 8 |
|
9 | 9 |
<xsl:template match="/"> |
10 | 10 |
<xsl:variable name="specificProgramName"> |
11 | 11 |
<xsl:choose> |
12 | 12 |
<xsl:when test="normalize-space(.//ProjectSpecificProgram)"> |
13 |
<xsl:value-of select="normalize-space(.//ProjectSpecificProgram)" />
|
|
13 |
<xsl:value-of select="normalize-space(.//ProjectSpecificProgram)"/> |
|
14 | 14 |
</xsl:when> |
15 | 15 |
<xsl:otherwise> |
16 |
<xsl:value-of select="string('UNKNOWN')" />
|
|
16 |
<xsl:value-of select="string('UNKNOWN')"/> |
|
17 | 17 |
</xsl:otherwise> |
18 | 18 |
</xsl:choose> |
19 | 19 |
</xsl:variable> |
20 | 20 |
<xsl:variable name="programName"> |
21 | 21 |
<xsl:choose> |
22 | 22 |
<xsl:when test="normalize-space(.//ProjectProgram)"> |
23 |
<xsl:value-of select="normalize-space(.//ProjectProgram)" />
|
|
23 |
<xsl:value-of select="normalize-space(.//ProjectProgram)"/> |
|
24 | 24 |
</xsl:when> |
25 | 25 |
<xsl:otherwise> |
26 |
<xsl:value-of select="string('UNKNOWN')" />
|
|
26 |
<xsl:value-of select="string('UNKNOWN')"/> |
|
27 | 27 |
</xsl:otherwise> |
28 | 28 |
</xsl:choose> |
29 | 29 |
</xsl:variable> |
30 |
<xsl:variable name="specificProgramDesc" select=".//ProjectSpecificProgramDescr" />
|
|
30 |
<xsl:variable name="specificProgramDesc" select=".//ProjectSpecificProgramDescr"/> |
|
31 | 31 |
<xsl:variable name="specificProgramId" |
32 |
select="normalize-space(concat($funderID, '::FP7::', $specificProgramName))" />
|
|
33 |
<xsl:variable name="programDesc" select=".//ProjectProgramDescr" />
|
|
32 |
select="normalize-space(concat($funderID, '::FP7::', $specificProgramName))"/>
|
|
33 |
<xsl:variable name="programDesc" select=".//ProjectProgramDescr"/> |
|
34 | 34 |
<xsl:variable name="programId" |
35 |
select="concat($funderID, '::FP7::', $specificProgramName, '::', $programName)" />
|
|
35 |
select="concat($funderID, '::FP7::', $specificProgramName, '::', $programName)"/>
|
|
36 | 36 |
|
37 | 37 |
<fundingtree> |
38 | 38 |
<funder> |
39 | 39 |
<id> |
40 |
<xsl:value-of select="$funderID" />
|
|
40 |
<xsl:value-of select="$funderID"/> |
|
41 | 41 |
</id> |
42 | 42 |
<shortname>EC</shortname> |
43 | 43 |
<name>European Commission</name> |
... | ... | |
45 | 45 |
</funder> |
46 | 46 |
<funding_level_2> |
47 | 47 |
<id> |
48 |
<xsl:value-of select="$programId" />
|
|
48 |
<xsl:value-of select="$programId"/> |
|
49 | 49 |
</id> |
50 | 50 |
<description> |
51 |
<xsl:value-of select="$programDesc" />
|
|
51 |
<xsl:value-of select="$programDesc"/> |
|
52 | 52 |
</description> |
53 | 53 |
<name> |
54 |
<xsl:value-of select="$programName" />
|
|
54 |
<xsl:value-of select="$programName"/> |
|
55 | 55 |
</name> |
56 | 56 |
<class>ec:program</class> |
57 | 57 |
<parent> |
58 | 58 |
<funding_level_1> |
59 | 59 |
<id> |
60 |
<xsl:value-of select="$specificProgramId" />
|
|
60 |
<xsl:value-of select="$specificProgramId"/> |
|
61 | 61 |
</id> |
62 | 62 |
<description> |
63 |
<xsl:value-of select="$specificProgramDesc" />
|
|
63 |
<xsl:value-of select="$specificProgramDesc"/> |
|
64 | 64 |
</description> |
65 | 65 |
<name> |
66 |
<xsl:value-of select="$specificProgramName" />
|
|
66 |
<xsl:value-of select="$specificProgramName"/> |
|
67 | 67 |
</name> |
68 | 68 |
<class>ec:specificprogram</class> |
69 | 69 |
<parent> |
70 | 70 |
<funding_level_0> |
71 |
<id><xsl:value-of select="concat($funderID, '::FP7')" /></id> |
|
71 |
<id> |
|
72 |
<xsl:value-of select="concat($funderID, '::FP7')"/> |
|
73 |
</id> |
|
72 | 74 |
<description>SEVENTH FRAMEWORK PROGRAMME</description> |
73 | 75 |
<name>FP7</name> |
74 |
<parent />
|
|
76 |
<parent/> |
|
75 | 77 |
<class>ec:frameworkprogram</class> |
76 | 78 |
</funding_level_0> |
77 | 79 |
</parent> |
Also available in: Unified diff
integrated (hopefully) all required changes from dnet40