Project

General

Profile

1
<?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
	<xsl:output omit-xml-declaration="yes" standalone="omit" indent="yes"/>
6
	
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
		<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
				<xsl:when test="$fundingProgramme = 'FCT'">info:eu-repo/grantAgreement/PT/FCT/</xsl:when>
17
				<xsl:otherwise>info:eu-repo/grantAgreement/</xsl:otherwise>
18
			</xsl:choose>
19
		</xsl:variable>
20
		<pair>
21
			<displayed-value><xsl:value-of select="concat($id, ' - ', $acronym, ' - ', $title)" /></displayed-value>
22
			<stored-value><xsl:value-of select="concat($idnamespace, $id)" /></stored-value>
23
		</pair>
24
	</xsl:template>
25

    
26
</xsl:stylesheet>
(1-1/2)