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: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

    
25
<xsl:template match = "oaf:project">
26
	<xsl:choose>
27
		<xsl:when test="./acronym != '' and ./acronym != 'UNKNOWN'">
28
			<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
		</xsl:when>
34
		<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
				</field>
40
		</xsl:otherwise>
41
	</xsl:choose>				
42
</xsl:template>
43

    
44
</xsl:stylesheet>
45

    
46

    
(26-26/40)