1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
3
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" exclude-result-prefixes="xsl xsi">
|
4
|
|
5
|
<xsl:output omit-xml-declaration="yes" standalone="omit" indent="yes"/>
|
6
|
|
7
|
<xsl:template match="/">
|
8
|
<xsl:variable name="jurisdiction" select="//FIELD[@name='jurisdiction']"/>
|
9
|
<xsl:variable name="id" select="//FIELD[@name='grant_agreement_number']" />
|
10
|
<xsl:variable name="title" select="//FIELD[@name='title']" />
|
11
|
<xsl:variable name="acronym" select="//FIELD[@name='acronym']" />
|
12
|
<xsl:variable name="funder" select="//FIELD[@name='funder']" />
|
13
|
<xsl:variable name="fundingProgramme">
|
14
|
<xsl:value-of select="replace(tokenize(//FIELD[@name='fundingpathid'],'::')[3], '/', '%2F')"/>
|
15
|
</xsl:variable>
|
16
|
|
17
|
<xsl:variable name="idnamespace">
|
18
|
<!-- info:eu-repo/grantAgreement/Funder/FundingProgram/ProjectID /[Jurisdiction]/[ProjectName]/[ProjectAcronym] -->
|
19
|
<xsl:choose>
|
20
|
<xsl:when test="$jurisdiction != ''"><xsl:value-of select="concat('info:eu-repo/grantAgreement/', $funder, '/', $fundingProgramme, '/', $id, '/', $jurisdiction)" /></xsl:when>
|
21
|
<xsl:otherwise><xsl:value-of select="concat('info:eu-repo/grantAgreement/', $funder, '/', $id)" /></xsl:otherwise>
|
22
|
</xsl:choose>
|
23
|
</xsl:variable>
|
24
|
<pair>
|
25
|
<displayed-value><xsl:value-of select="concat($id, ' - ', $acronym, ' - ', $title)" /></displayed-value>
|
26
|
<stored-value><xsl:value-of select="$idnamespace" /></stored-value>
|
27
|
</pair>
|
28
|
</xsl:template>
|
29
|
|
30
|
</xsl:stylesheet>
|