Project

General

Profile

1
<RESOURCE_PROFILE>
2
	<HEADER>
3
		<RESOURCE_IDENTIFIER
4
			value="23ecba9f-f152-498e-b639-2ac8022865be_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU=" />
5
		<RESOURCE_TYPE value="TransformationRuleDSResourceType" />
6
		<RESOURCE_KIND value="TransformationRuleDSResources" />
7
		<RESOURCE_URI value="" />
8
		<DATE_OF_CREATION value="2019-09-06T12:45:47+00:00" />
9
	</HEADER>
10
	<BODY>
11
		<CONFIGURATION>
12
			<SOURCE_METADATA_FORMAT interpretation="final"
13
				layout="oai" name="native" />
14
			<SINK_METADATA_FORMAT name="oai_dc" />
15
			<IMPORTED />
16
			<SCRIPT>
17
				<TITLE>native to OAI_DC</TITLE>
18
				<CODE>
19
					<xsl:stylesheet version="2.0"
20
						xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
21
						xmlns:dnet="eu.dnetlib.data.utils.XsltFunctions"
22
						xmlns:oai="http://www.openarchives.org/OAI/2.0/"
23
						xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24

    
25
						exclude-result-prefixes="xsl dnet oai">
26

    
27
						<xsl:output method="xml" encoding="UTF-8"
28
							omit-xml-declaration="yes" />
29

    
30
						<xsl:template match="/">
31
							<xsl:for-each select="//record">
32
								<oai_dc:dc
33
									xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
34
									xmlns:dc="http://purl.org/dc/elements/1.1/"
35
									xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
36

    
37
									<xsl:variable name="bestRights" select="./bestRights" />
38
									<xsl:variable name="type" select="./type" />
39
									
40
									<dc:title>
41
										<xsl:value-of select="./title" />
42
									</dc:title>
43
									<xsl:for-each select="./creators/creator">
44
										<dc:creator>
45
											<xsl:value-of select="." />
46
										</dc:creator>
47
									</xsl:for-each>
48
									<xsl:for-each select="./contributors/contributor">
49
										<dc:contributor>
50
											<xsl:value-of select="." />
51
										</dc:contributor>
52
									</xsl:for-each>
53
									<dc:publisher>
54
										<xsl:value-of select="./publisher" />
55
									</dc:publisher>
56
									<dc:description>
57
										<xsl:value-of select="./abstract" />
58
									</dc:description>
59
									<xsl:for-each select="./subjects/subject">
60
										<dc:subject>
61
											<xsl:value-of select="." />
62
										</dc:subject>
63
									</xsl:for-each>
64
									<dc:date>
65
										<xsl:value-of select="./date" />
66
									</dc:date>
67
									<dc:language>
68
										<xsl:value-of select="./language" />
69
									</dc:language>
70
									
71
									<dc:type>
72
										<xsl:choose>
73
											<xsl:when test="$type = 'Conference object'">info:eu-repo/semantics/conferenceObject</xsl:when>
74
											<xsl:when test="$type = 'Report'">info:eu-repo/semantics/report</xsl:when>
75
											<xsl:when test="$type = 'Article'">info:eu-repo/semantics/article</xsl:when>
76
											<xsl:when test="$type = 'Other'">info:eu-repo/semantics/other</xsl:when>
77
											<xsl:when test="$type = 'Part of book or chapter of book'">info:eu-repo/semantics/bookPart</xsl:when>
78
											<xsl:when test="$type = 'Book'">info:eu-repo/semantics/book</xsl:when>
79
											<xsl:when test="$type = 'Bachelor thesis'">info:eu-repo/semantics/bachelorThesis</xsl:when>
80
											<xsl:when test="$type = 'Doctoral thesis'">info:eu-repo/semantics/doctoralThesis</xsl:when>
81
											<xsl:when test="$type = 'Patent'">info:eu-repo/semantics/patent</xsl:when>
82
											<xsl:when test="$type = 'Master thesis'">info:eu-repo/semantics/masterThesis</xsl:when>
83
											<xsl:otherwise>info:eu-repo/semantics/other</xsl:otherwise>
84
										</xsl:choose> 
85
									</dc:type>
86
									<dc:type>
87
										<xsl:value-of select="$type" />
88
									</dc:type>
89
									<dc:rights>
90
										<xsl:choose>
91
											<xsl:when test="$bestRights = 'Closed Access'">info:eu-repo/semantics/closedAccess</xsl:when>
92
											<xsl:when test="$bestRights = 'Open Access'">info:eu-repo/semantics/openAccess</xsl:when>
93
											<xsl:when test="$bestRights = 'Restricted'">info:eu-repo/semantics/restrictedAccess</xsl:when>
94
											<xsl:otherwise>info:eu-repo/semantics/restrictedAccess</xsl:otherwise> <!-- IT SHOULD BE UNKNOWN -->
95
										</xsl:choose> 
96
									</dc:rights>
97
									<dc:identifier>
98
										<xsl:value-of select="concat('people:',./identifier)" />
99
									</dc:identifier>
100
									<xsl:for-each select="./urls/url[@rights = $bestRights]">
101
										<dc:identifier>
102
											<xsl:value-of select="." />
103
										</dc:identifier>
104
									</xsl:for-each>
105
									<xsl:for-each select="./dois/doi">
106
										<dc:identifier>
107
											<xsl:value-of select="concat('info:doi:',.)" />
108
										</dc:identifier>
109
									</xsl:for-each>
110
									<xsl:for-each select="./projects/project">
111
										<dc:relation>
112
											<xsl:value-of select="concat('info:eu-repo/grantAgreement/',./funder,'/',./program,'/',./code,'/',./jurisdiction,'/',./name,'/',./acronym)" />
113
										</dc:relation>
114
									</xsl:for-each>
115
								</oai_dc:dc>
116
							</xsl:for-each>
117
						</xsl:template>
118
					</xsl:stylesheet>
119
				</CODE>
120
			</SCRIPT>
121
		</CONFIGURATION>
122
		<STATUS />
123
		<SECURITY_PARAMETERS>SECURITY_PARAMETERS</SECURITY_PARAMETERS>
124
	</BODY>
125
</RESOURCE_PROFILE>
(3-3/3)