1 |
35015
|
michele.ar
|
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
41672
|
michele.ar
|
|
3 |
35015
|
michele.ar
|
<xsl:stylesheet version="1.0"
|
4 |
60434
|
miriam.bag
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions"
|
5 |
|
|
exclude-result-prefixes="fn">
|
6 |
35015
|
michele.ar
|
|
7 |
48139
|
alessia.ba
|
<xsl:variable name="namespacePrefix" select="string('fct_________')"/>
|
8 |
|
|
<xsl:variable name="funderID" select="concat($namespacePrefix, '::FCT')"/>
|
9 |
|
|
|
10 |
35015
|
michele.ar
|
<xsl:template match="/">
|
11 |
60434
|
miriam.bag
|
<xsl:variable name="p1" select="normalize-space(.//*[local-name() = 'Identifier'][@type = 'https://w3id.org/cerif/vocab/IdentifierTypes#FundingProgram'])"/>
|
12 |
48139
|
alessia.ba
|
|
13 |
35015
|
michele.ar
|
<fundingtree>
|
14 |
|
|
<funder>
|
15 |
48139
|
alessia.ba
|
<id>
|
16 |
|
|
<xsl:value-of select="$funderID"/>
|
17 |
|
|
</id>
|
18 |
35175
|
michele.ar
|
<shortname>FCT</shortname>
|
19 |
|
|
<name>Fundação para a Ciência e a Tecnologia, I.P.</name>
|
20 |
35538
|
michele.ar
|
<jurisdiction>PT</jurisdiction>
|
21 |
35015
|
michele.ar
|
</funder>
|
22 |
41672
|
michele.ar
|
<xsl:if test="string-length($p1) > 0">
|
23 |
60434
|
miriam.bag
|
|
24 |
|
|
<xsl:variable name="level0" select="concat($funderID, '::', $p1)"/>
|
25 |
|
|
<funding_level_0>
|
26 |
|
|
<id>
|
27 |
|
|
<xsl:value-of select="$level0"/>
|
28 |
|
|
</id>
|
29 |
|
|
<description>
|
30 |
|
|
<xsl:value-of select="$p1"/>
|
31 |
|
|
</description>
|
32 |
|
|
<name>
|
33 |
|
|
<xsl:value-of select="$p1"/>
|
34 |
|
|
</name>
|
35 |
|
|
<parent/>
|
36 |
|
|
<class>fct:program</class>
|
37 |
|
|
</funding_level_0>
|
38 |
41672
|
michele.ar
|
</xsl:if>
|
39 |
35015
|
michele.ar
|
</fundingtree>
|
40 |
|
|
</xsl:template>
|
41 |
|
|
|
42 |
60434
|
miriam.bag
|
</xsl:stylesheet>
|