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
												
32
							<xsl:for-each select="//record">
33
								<oai_dc:dc
34
									xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
35
									xmlns:dc="http://purl.org/dc/elements/1.1/"
36
									xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
37

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