Project

General

Profile

1 20906 antonis.le
<?xml version="1.0" encoding="UTF-8"?>
2
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
xmlns:dri="http://www.driver-repository.eu/namespace/dri"
4
xmlns:oaf="http://namespace.openaire.eu/oaf"
5
xmlns:dc="http://purl.org/dc/elements/1.1/">
6
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
7
8
<xsl:template match = "/">
9
<result type ="result">
10
	<xsl:apply-templates select="//header"/>
11
	<xsl:apply-templates select="//oaf:project"/>
12
</result>
13
</xsl:template>
14
15
<xsl:template match = "header">
16
	<field name="encoding" multiplicity="false" indexId="objIdentifier" label="Object id">
17
		<xsl:attribute name="value">
18
			<xsl:value-of select='./dri:objIdentifier'/>
19
		</xsl:attribute>
20
	</field>
21
</xsl:template>
22
23
24 34557 katerina.i
25 20906 antonis.le
<xsl:template match = "oaf:project">
26
	<xsl:choose>
27 35566 katerina.i
		<xsl:when test="./acronym != '' and ./acronym != 'UNKNOWN'">
28 34557 katerina.i
			<field name="value" multiplicity="true" indexId="relprojectid" label="Project name">
29
				<xsl:attribute name="value">
30
                    <xsl:value-of select="./acronym"/>
31
                </xsl:attribute>
32
			</field>
33 20906 antonis.le
		</xsl:when>
34 34557 katerina.i
		<xsl:otherwise>
35
				<field name="value" multiplicity="true" indexId="relprojectid" label="Project name">
36
                    <xsl:attribute name="value">
37
                           <xsl:value-of select="./title"/>
38
                    </xsl:attribute>
39 20906 antonis.le
				</field>
40 34557 katerina.i
		</xsl:otherwise>
41 20906 antonis.le
	</xsl:choose>
42
</xsl:template>
43
44
</xsl:stylesheet>
45