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 article'">http://purl.org/coar/resource_type/c_5794</xsl:when>	
80
											<xsl:when test="$type = 'Journal article'">http://purl.org/coar/resource_type/c_6501</xsl:when>	
81
											<xsl:when test="$type = 'Report'">http://purl.org/coar/resource_type/c_93fc</xsl:when>	
82
											<xsl:when test="$type = 'Contribution to journal'">http://purl.org/coar/resource_type/c_3e5a</xsl:when>	
83
											<xsl:when test="$type = 'Contribution to conference'">http://purl.org/coar/resource_type/c_c94f</xsl:when>	
84
											<xsl:when test="$type = 'Book'">http://purl.org/coar/resource_type/c_2f33</xsl:when>	
85
											<xsl:when test="$type = 'Contribution to book'">http://purl.org/coar/resource_type/c_3248</xsl:when>	
86
											<xsl:when test="$type = 'Part of book or chapter of book'">http://purl.org/coar/resource_type/c_3248</xsl:when>	
87
											<xsl:when test="$type = 'Master thesis'">http://purl.org/coar/resource_type/c_bdcc</xsl:when>	
88
											<xsl:when test="$type = 'Bachelor thesis'">http://purl.org/coar/resource_type/c_7a1f</xsl:when>	
89
											<xsl:when test="$type = 'Doctoral thesis'">http://purl.org/coar/resource_type/c_db06</xsl:when>	
90
											<xsl:when test="$type = 'Patent'">http://purl.org/coar/resource_type/c_15cd</xsl:when>	
91
											<xsl:when test="$type = 'Software'">http://purl.org/coar/resource_type/c_5ce6</xsl:when>
92
											<xsl:when test="$type = 'Dataset'">http://purl.org/coar/resource_type/c_ddb1</xsl:when>	
93
											<xsl:when test="$type = 'Other'">http://purl.org/coar/resource_type/c_1843</xsl:when>	
94
											<xsl:otherwise>http://purl.org/coar/resource_type/c_1843</xsl:otherwise>
95
										</xsl:choose> 
96
									</dc:type>
97
									<dc:type>
98
										<xsl:choose>
99
											<xsl:when test="$type = 'Conference article'">info:eu-repo/semantics/article</xsl:when>
100
											<xsl:when test="$type = 'Journal article'">info:eu-repo/semantics/article</xsl:when>
101
											<xsl:when test="$type = 'Report'">info:eu-repo/semantics/report</xsl:when>
102
											<xsl:when test="$type = 'Contribution to journal'">info:eu-repo/semantics/contributionToPeriodical</xsl:when>
103
											<xsl:when test="$type = 'Contribution to conference'">info:eu-repo/semantics/conferenceObject</xsl:when>
104
											<xsl:when test="$type = 'Book'">info:eu-repo/semantics/book</xsl:when>
105
											<xsl:when test="$type = 'Contribution to book'">info:eu-repo/semantics/bookPart</xsl:when>
106
											<xsl:when test="$type = 'Part of book or chapter of book'">info:eu-repo/semantics/bookPart</xsl:when>
107
											<xsl:when test="$type = 'Master thesis'">info:eu-repo/semantics/masterThesis</xsl:when>
108
											<xsl:when test="$type = 'Bachelor thesis'">info:eu-repo/semantics/bachelorThesis</xsl:when>
109
											<xsl:when test="$type = 'Doctoral thesis'">info:eu-repo/semantics/doctoralThesis</xsl:when>
110
											<xsl:when test="$type = 'Patent'">info:eu-repo/semantics/patent</xsl:when>
111
											<xsl:when test="$type = 'Software'">info:eu-repo/semantics/other</xsl:when>
112
											<xsl:when test="$type = 'Dataset'">info:eu-repo/semantics/other</xsl:when>
113
											<xsl:when test="$type = 'Other'">info:eu-repo/semantics/other</xsl:when>
114
											<xsl:otherwise>info:eu-repo/semantics/other</xsl:otherwise>
115
										</xsl:choose> 
116
									</dc:type>
117
									<dc:type>
118
										<xsl:value-of select="$type" />
119
									</dc:type>
120
									<dc:rights>
121
										<xsl:choose>
122
											<xsl:when test="$bestRights = 'Closed Access'">info:eu-repo/semantics/closedAccess</xsl:when>
123
											<xsl:when test="$bestRights = 'Open Access'">info:eu-repo/semantics/openAccess</xsl:when>
124
											<xsl:when test="$bestRights = 'Restricted'">info:eu-repo/semantics/restrictedAccess</xsl:when>
125
											<xsl:otherwise>info:eu-repo/semantics/restrictedAccess</xsl:otherwise> <!-- IT SHOULD BE UNKNOWN -->
126
										</xsl:choose> 
127
									</dc:rights>
128
									<dc:identifier>
129
										<xsl:value-of select="concat('https://openportal.isti.cnr.it/doc?id=people______::', dnet:md5(./identifier))" />
130
									</dc:identifier>
131
									<!-- <dc:identifier>
132
										<xsl:value-of select="concat('people:',./identifier)" />
133
									</dc:identifier>
134
									<xsl:for-each select="./urls/url[@rights = $bestRights]">
135
										<dc:identifier>
136
											<xsl:value-of select="." />
137
										</dc:identifier>
138
									</xsl:for-each> -->
139
									<xsl:for-each select="./dois/doi">
140
										<dc:identifier>
141
											<xsl:value-of select="concat('info:doi:',.)" />
142
										</dc:identifier>
143
									</xsl:for-each>
144
									<xsl:for-each select="./projects/project">
145
										<dc:relation>
146
											<xsl:value-of select="concat('info:eu-repo/grantAgreement/',./funder,'/',./program,'/',./code,'/',./jurisdiction,'/',./name,'/',./acronym)" />
147
										</dc:relation>
148
									</xsl:for-each>
149
								</oai_dc:dc>
150
							</xsl:for-each>
151
						</xsl:template>
152
					</xsl:stylesheet>
153
				</CODE>
154
			</SCRIPT>
155
		</CONFIGURATION>
156
		<STATUS />
157
		<SECURITY_PARAMETERS>SECURITY_PARAMETERS</SECURITY_PARAMETERS>
158
	</BODY>
159
</RESOURCE_PROFILE>
(3-3/3)