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
<xsl:template match = "oaf:project">
25
	<xsl:choose>
26
		<xsl:when test="substring(//header/dri:objIdentifier,1,4)='ec::'">
27
			<xsl:for-each select = "./acronym">
28
				<field name="value" multiplicity="true" indexId="" label="">
29
				<xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute>
30
				</field>
31
			</xsl:for-each>		
32
		</xsl:when>
33
		<xsl:when test="substring(//header/dri:objIdentifier,1,4)='wt::'">
34
			<xsl:for-each select = "./title">
35
				<field name="value" multiplicity="true" indexId="" label="">
36
				<xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute>
37
				</field>
38
			</xsl:for-each>				
39
		</xsl:when>
40
	</xsl:choose>				
41

    
42
</xsl:template>
43

    
44
</xsl:stylesheet>
45

    
46

    
(18-18/22)