Project

General

Profile

1 28340 alessia.ba
<?xml version="1.0" encoding="UTF-8"?>
2
<xsl:stylesheet version="1.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 28343 alessia.ba
	<xsl:output omit-xml-declaration="yes" standalone="omit" indent="yes"/>
6 28340 alessia.ba
7
	<xsl:template match="/">
8
		<xsl:variable name="id" select="//FIELD[@name='grant_agreement_number']" />
9
		<xsl:variable name="title" select="//FIELD[@name='title']" />
10
		<xsl:variable name="acronym" select="//FIELD[@name='acronym']" />
11 29219 alessia.ba
		<xsl:variable name="fundingProgramme" select="//FIELD[@name='fundingprogramme']" />
12
		<xsl:variable name="idnamespace">
13
			<xsl:choose>
14
				<xsl:when test="$fundingProgramme = 'FP7'">info:eu-repo/grantAgreement/EC/FP7/</xsl:when>
15
				<xsl:when test="$fundingProgramme = 'WT'">info:eu-repo/grantAgreement/WT/</xsl:when>
16 33446 alessia.ba
				<xsl:when test="$fundingProgramme = 'FCT'">info:eu-repo/grantAgreement/PT/FCT/</xsl:when>
17 29219 alessia.ba
				<xsl:otherwise>info:eu-repo/grantAgreement/</xsl:otherwise>
18
			</xsl:choose>
19
		</xsl:variable>
20 28340 alessia.ba
		<pair>
21
			<displayed-value><xsl:value-of select="concat($id, ' - ', $acronym, ' - ', $title)" /></displayed-value>
22 29219 alessia.ba
			<stored-value><xsl:value-of select="concat($idnamespace, $id)" /></stored-value>
23 28340 alessia.ba
		</pair>
24
	</xsl:template>
25
26
</xsl:stylesheet>