1
|
<RESOURCE_PROFILE>
|
2
|
<HEADER>
|
3
|
<RESOURCE_IDENTIFIER value="BC1DE5CD-CEA3-431A-9692-817CAB61274C_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
|
4
|
<RESOURCE_TYPE value="TransformationRuleDSResourceType"/>
|
5
|
<RESOURCE_KIND value="TransformationRuleDSResources"/>
|
6
|
<RESOURCE_URI value=""/>
|
7
|
<DATE_OF_CREATION value="2015-07-28T12:26:13+02:00"/>
|
8
|
</HEADER>
|
9
|
<BODY>
|
10
|
<CONFIGURATION>
|
11
|
<IMPORTED/>
|
12
|
<SCRIPT>
|
13
|
<TITLE>Puma to datacite Transformation</TITLE>
|
14
|
<CODE><![CDATA[
|
15
|
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:transformExt="http://namespace.openaire.eu/java/org.apache.commons.codec.digest.DigestUtils" xmlns:datetime="http://exslt.org/dates-and-times" xmlns:exslt="http://exslt.org/common" xmlns:oai="http://www.openarchives.org/OAI/2.0/"
|
16
|
xmlns:isti="http://www.isti.cnr.it/" xmlns:dri="http://www.driver-repository.eu/namespace/dri" xmlns:TransformationFunction="eu.dnetlib.data.collective.transformation.core.xsl.ext.TransformationFunctionProxy" xmlns:dc="http://purl.org/dc/elements/1.1/" exclude-result-prefixes="xsl transformExt TransformationFunction datetime exslt dc ">
|
17
|
<xsl:param name="varOfficialName"/>
|
18
|
|
19
|
<xsl:variable name="tf" select="TransformationFunction:getInstance()"/>
|
20
|
|
21
|
<xsl:template match="/">
|
22
|
<oai:record>
|
23
|
<xsl:copy-of select="//*[local-name()='header']"/>
|
24
|
<oai:metadata>
|
25
|
<resource xmlns="http://datacite.org/schema/kernel-3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://datacite.org/schema/kernel-3 http://schema.datacite.org/meta/kernel-3/metadata.xsd">
|
26
|
<identifier identifierType="ISTI">
|
27
|
<xsl:value-of select="normalize-space(//dc:identifier)"/>
|
28
|
</identifier>
|
29
|
<creators>
|
30
|
<xsl:for-each select="//dc:creator">
|
31
|
<creator>
|
32
|
<creatorName>
|
33
|
<xsl:value-of select="concat(normalize-space(./dc:surname), ' ', normalize-space(./dc:name))"/>
|
34
|
</creatorName>
|
35
|
|
36
|
<xsl:if test="./dc:person_number">
|
37
|
<nameIdentifier>
|
38
|
<xsl:attribute name="nameIdentifierScheme">cnrIdentifier</xsl:attribute>
|
39
|
<xsl:value-of select="normalize-space(./dc:person_number)"/>
|
40
|
</nameIdentifier>
|
41
|
</xsl:if>
|
42
|
<xsl:if test="./dc:affiliation">
|
43
|
<affiliation>
|
44
|
<xsl:attribute name="department"><xsl:value-of select="normalize-space(./dc:department)"/></xsl:attribute>
|
45
|
<xsl:value-of select="normalize-space(./dc:affiliation)"/>
|
46
|
</affiliation>
|
47
|
</xsl:if>
|
48
|
|
49
|
</creator>
|
50
|
|
51
|
</xsl:for-each>
|
52
|
</creators>
|
53
|
<titles>
|
54
|
<xsl:for-each select="//dc:title">
|
55
|
<title>
|
56
|
<xsl:attribute name="xml:lang"><xsl:value-of select="//dc:language"/></xsl:attribute>
|
57
|
<xsl:value-of select="."/>
|
58
|
</title>
|
59
|
</xsl:for-each>
|
60
|
</titles>
|
61
|
|
62
|
<xsl:if test="//dc:publisher">
|
63
|
<publisher>
|
64
|
<xsl:value-of select="//dc:publisher[1]"/>
|
65
|
</publisher>
|
66
|
</xsl:if>
|
67
|
|
68
|
<subjects>
|
69
|
<xsl:for-each select="//dc:subject">
|
70
|
<subject>
|
71
|
<xsl:value-of select="."/>
|
72
|
</subject>
|
73
|
</xsl:for-each>
|
74
|
<xsl:for-each select="//dc:subject.acm">
|
75
|
<subject subjectScheme='acm'>
|
76
|
<xsl:value-of select="."/>
|
77
|
</subject>
|
78
|
</xsl:for-each>
|
79
|
</subjects>
|
80
|
|
81
|
<contributors>
|
82
|
<xsl:for-each select="//dc:contributor">
|
83
|
<xsl:for-each select="tokenize(.,',')">
|
84
|
<contributor>
|
85
|
<contributorName>
|
86
|
<xsl:value-of select="normalize-space(.)"/>
|
87
|
</contributorName>
|
88
|
</contributor>
|
89
|
</xsl:for-each>
|
90
|
</xsl:for-each>
|
91
|
</contributors>
|
92
|
<dates>
|
93
|
<xsl:for-each select="//dc:date.publication">
|
94
|
<date dateType='Accepted'>
|
95
|
<xsl:value-of select="."/>
|
96
|
</date>
|
97
|
</xsl:for-each>
|
98
|
</dates>
|
99
|
<xsl:if test="//dc:language">
|
100
|
<language><xsl:value-of select="//dc:language[1]" /></language>
|
101
|
</xsl:if>
|
102
|
<xsl:for-each select="//dc:type">
|
103
|
<resourceType resourceTypeGeneral="Text"><xsl:value-of select="TransformationFunction:convertString($tf, ., 'TextTypologies')" /></resourceType>
|
104
|
</xsl:for-each>
|
105
|
|
106
|
<alternateIdentifiers>
|
107
|
<xsl:for-each select="//dc:url">
|
108
|
<alternateIdentifier >
|
109
|
<xsl:attribute name="alternateIdentifierType" >url</xsl:attribute>
|
110
|
<xsl:value-of select="."/>
|
111
|
</alternateIdentifier>
|
112
|
</xsl:for-each>
|
113
|
<xsl:for-each select="//dc:identifier.resource">
|
114
|
<alternateIdentifier >
|
115
|
<xsl:attribute name="alternateIdentifierType" >url</xsl:attribute>
|
116
|
<xsl:value-of select="."/>
|
117
|
</alternateIdentifier>
|
118
|
</xsl:for-each>
|
119
|
</alternateIdentifiers>
|
120
|
|
121
|
<relatedIdentifiers />
|
122
|
<sizes />
|
123
|
<formats />
|
124
|
|
125
|
<rightsList>
|
126
|
<xsl:for-each select="//dc:file.copyright">
|
127
|
<rights><xsl:value-of select="." /></rights>
|
128
|
</xsl:for-each>
|
129
|
</rightsList>
|
130
|
|
131
|
<descriptions>
|
132
|
<xsl:for-each select="//dc:description">
|
133
|
<description descriptionType="Abstract"><xsl:value-of select="." /></description>
|
134
|
</xsl:for-each>
|
135
|
</descriptions>
|
136
|
|
137
|
<geoLocations />
|
138
|
|
139
|
<isti:projects>
|
140
|
<xsl:for-each select="//dc:funds[./dc:relation.grantfund]">
|
141
|
<isti:project>
|
142
|
<isti:code><xsl:value-of select="./dc:relation.grantfund" /></isti:code>
|
143
|
<isti:acronym><xsl:value-of select="./dc:relation.acronym_funding" /></isti:acronym>
|
144
|
</isti:project>
|
145
|
</xsl:for-each>
|
146
|
</isti:projects>
|
147
|
|
148
|
</resource>
|
149
|
|
150
|
</oai:metadata>
|
151
|
</oai:record>
|
152
|
</xsl:template>
|
153
|
</xsl:stylesheet>
|
154
|
]]></CODE>
|
155
|
</SCRIPT>
|
156
|
</CONFIGURATION>
|
157
|
<STATUS/>
|
158
|
<SECURITY_PARAMETERS/>
|
159
|
</BODY>
|
160
|
</RESOURCE_PROFILE>
|