1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
3
|
<xsl:template match="/">
|
4
|
<record xmlns="http://www.openarchives.org/OAI/2.0/"
|
5
|
xmlns:dr="http://www.driver-repository.eu/namespace/dr"
|
6
|
xmlns:oaf="http://namespace.openaire.eu/oaf">
|
7
|
<xsl:copy-of select=".//*[local-name()='header']"/>
|
8
|
<metadata>
|
9
|
<xsl:for-each select=".//*[local-name()='metadata']/*/*">
|
10
|
<xsl:choose>
|
11
|
<xsl:when test="local-name()='type'">
|
12
|
<dr:CobjCategory>0001</dr:CobjCategory>
|
13
|
</xsl:when>
|
14
|
<xsl:when test="local-name()='identifier'">
|
15
|
<dr:CobjIdentifier>
|
16
|
<xsl:value-of select="normalize-space(.)"/>
|
17
|
</dr:CobjIdentifier>
|
18
|
<xsl:if test="starts-with(., 'doi')">
|
19
|
<oaf:identifier identifierType="doi">
|
20
|
<xsl:value-of select="normalize-space(.)"/>
|
21
|
</oaf:identifier>
|
22
|
</xsl:if>
|
23
|
</xsl:when>
|
24
|
<xsl:when test="local-name()='relation'">
|
25
|
<xsl:if test="contains(., 'grantAgreement/EC/FP7')">
|
26
|
<oaf:projectid>
|
27
|
<xsl:value-of select="concat('corda_______::', substring-after(normalize-space(.), 'FP7/'))"/>
|
28
|
</oaf:projectid>
|
29
|
</xsl:if>
|
30
|
</xsl:when>
|
31
|
<xsl:when test="local-name()='rights'">
|
32
|
<oaf:accessrights>
|
33
|
<xsl:choose>
|
34
|
<xsl:when test="contains(., 'closed')">CLOSED</xsl:when>
|
35
|
<xsl:when test="contains(., 'restricted')">RESTRICTED</xsl:when>
|
36
|
<xsl:when test="contains(., 'embargo')">EMBARGO</xsl:when>
|
37
|
<xsl:when test="contains(., 'open')">OPEN</xsl:when>
|
38
|
<xsl:otherwise>UNKNOWN</xsl:otherwise>
|
39
|
</xsl:choose>
|
40
|
</oaf:accessrights>
|
41
|
</xsl:when>
|
42
|
<xsl:otherwise>
|
43
|
<xsl:copy-of select="."/>
|
44
|
</xsl:otherwise>
|
45
|
</xsl:choose>
|
46
|
</xsl:for-each>
|
47
|
<oaf:hostedBy name="DATASOURCE NAME" id="datasource id (database)"/>
|
48
|
<oaf:collectedFrom name="DATASOURCE NAME" id="datasource id (database)"/>
|
49
|
<oaf:collectedDatasourceid>datasource id taken from the database, es: opendoar____::2659</oaf:collectedDatasourceid>
|
50
|
</metadata>
|
51
|
</record>
|
52
|
</xsl:template>
|
53
|
</xsl:stylesheet>
|