1 |
43915
|
sandro.lab
|
<RESOURCE_PROFILE>
|
2 |
|
|
<HEADER>
|
3 |
|
|
<RESOURCE_IDENTIFIER value="60216DD9-8036-4CF8-A26D-DCDABBCED558_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>People 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 |
44825
|
sandro.lab
|
xmlns:isti="http://www.isti.cnr.it/" xmlns:istiFunction="eu.dnetlib.xml.ISTIUtilityFunction"
|
17 |
|
|
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 istiFunction datetime exslt dc ">
|
18 |
43915
|
sandro.lab
|
<xsl:param name="varOfficialName"/>
|
19 |
|
|
|
20 |
|
|
<xsl:variable name="tf" select="TransformationFunction:getInstance()" />
|
21 |
|
|
|
22 |
|
|
|
23 |
|
|
<xsl:template match="/">
|
24 |
|
|
<oai:record>
|
25 |
|
|
<xsl:copy-of select="//*[local-name() = 'header']"/>
|
26 |
|
|
<oai:metadata>
|
27 |
|
|
<resource xmlns="http://datacite.org/schema/kernel-3"
|
28 |
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
29 |
|
|
xsi:schemaLocation="http://datacite.org/schema/kernel-3 http://schema.datacite.org/meta/kernel-3/metadata.xsd">
|
30 |
|
|
|
31 |
46093
|
michele.ar
|
<identifier identifierType="oai_people">
|
32 |
43915
|
sandro.lab
|
<xsl:value-of select="normalize-space(//dri:recordIdentifier)"/>
|
33 |
|
|
</identifier>
|
34 |
|
|
<creators>
|
35 |
|
|
<xsl:for-each select="//dc:creator">
|
36 |
48965
|
michele.ar
|
<xsl:for-each select="tokenize(istiFunction:cleanNames(.), '#')">
|
37 |
|
|
<xsl:if test="string-length(.) > 0">
|
38 |
48967
|
michele.ar
|
<creator>
|
39 |
|
|
<creatorName><xsl:value-of select="."/></creatorName>
|
40 |
|
|
</creator>
|
41 |
48965
|
michele.ar
|
</xsl:if>
|
42 |
43915
|
sandro.lab
|
</xsl:for-each>
|
43 |
|
|
</xsl:for-each>
|
44 |
|
|
</creators>
|
45 |
|
|
<titles>
|
46 |
|
|
<xsl:for-each select="//dc:title">
|
47 |
|
|
<title>
|
48 |
|
|
<xsl:value-of select="."/>
|
49 |
|
|
</title>
|
50 |
|
|
</xsl:for-each>
|
51 |
|
|
</titles>
|
52 |
|
|
|
53 |
|
|
<xsl:if test="//dc:publisher">
|
54 |
|
|
<publisher>
|
55 |
|
|
<xsl:value-of select="//dc:publisher[1]"/>
|
56 |
|
|
</publisher>
|
57 |
|
|
</xsl:if>
|
58 |
|
|
|
59 |
|
|
<subjects>
|
60 |
|
|
<xsl:for-each select="//dc:subject">
|
61 |
|
|
<subject>
|
62 |
|
|
<xsl:value-of select="."/>
|
63 |
|
|
</subject>
|
64 |
|
|
</xsl:for-each>
|
65 |
|
|
</subjects>
|
66 |
|
|
|
67 |
|
|
<contributors>
|
68 |
|
|
<xsl:for-each select="//dc:contributor">
|
69 |
|
|
<xsl:for-each select="tokenize(., ',')">
|
70 |
|
|
<contributor>
|
71 |
|
|
<contributorName>
|
72 |
|
|
<xsl:value-of select="normalize-space(.)"/>
|
73 |
|
|
</contributorName>
|
74 |
|
|
</contributor>
|
75 |
|
|
</xsl:for-each>
|
76 |
|
|
</xsl:for-each>
|
77 |
|
|
</contributors>
|
78 |
|
|
|
79 |
|
|
<dates>
|
80 |
|
|
<xsl:for-each select="//dc:date">
|
81 |
|
|
<date dateType="Accepted">
|
82 |
|
|
<xsl:value-of select="."/>
|
83 |
|
|
</date>
|
84 |
|
|
</xsl:for-each>
|
85 |
|
|
</dates>
|
86 |
|
|
|
87 |
|
|
<xsl:if test="//dc:language">
|
88 |
44896
|
michele.ar
|
<language><xsl:value-of select="TransformationFunction:convertString($tf, //dc:language[1], 'Languages')"/></language>
|
89 |
43915
|
sandro.lab
|
</xsl:if>
|
90 |
|
|
|
91 |
|
|
<xsl:for-each select="//dc:type">
|
92 |
|
|
<resourceType resourceTypeGeneral="Text">
|
93 |
44642
|
michele.ar
|
<xsl:value-of select="TransformationFunction:convertString($tf, ., 'TextTypologies')" />
|
94 |
43915
|
sandro.lab
|
</resourceType>
|
95 |
|
|
</xsl:for-each>
|
96 |
44642
|
michele.ar
|
|
97 |
43915
|
sandro.lab
|
<alternateIdentifiers>
|
98 |
44642
|
michele.ar
|
<xsl:for-each select="//dc:identifier">
|
99 |
49291
|
michele.ar
|
<xsl:if test="starts-with(., 'http') and not(contains(., 'dx.doi.org'))">
|
100 |
49210
|
michele.ar
|
<alternateIdentifier alternateIdentifierType="url"><xsl:value-of select="."/></alternateIdentifier>
|
101 |
49291
|
michele.ar
|
</xsl:if>
|
102 |
|
|
<xsl:if test="starts-with(., 'info:doi:')">
|
103 |
|
|
<xsl:variable name="doi" select="istiFunction:cleanDoi(substring-after(., 'info:doi:'))" />
|
104 |
|
|
<alternateIdentifier alternateIdentifierType="url"><xsl:value-of select="concat('https://dx.doi.org/', $doi)"/></alternateIdentifier>
|
105 |
|
|
<alternateIdentifier alternateIdentifierType="doi"><xsl:value-of select="$doi"/></alternateIdentifier>
|
106 |
|
|
</xsl:if>
|
107 |
44642
|
michele.ar
|
</xsl:for-each>
|
108 |
43915
|
sandro.lab
|
</alternateIdentifiers>
|
109 |
|
|
|
110 |
|
|
<relatedIdentifiers/>
|
111 |
|
|
<sizes/>
|
112 |
|
|
<formats/>
|
113 |
|
|
|
114 |
|
|
<rightsList>
|
115 |
|
|
<xsl:for-each select="//dc:rights">
|
116 |
|
|
<rights>
|
117 |
|
|
<xsl:value-of select="."/>
|
118 |
|
|
</rights>
|
119 |
|
|
</xsl:for-each>
|
120 |
|
|
</rightsList>
|
121 |
|
|
|
122 |
|
|
<descriptions>
|
123 |
|
|
<xsl:for-each select="//dc:description">
|
124 |
|
|
<description descriptionType="Abstract">
|
125 |
|
|
<xsl:value-of select="."/>
|
126 |
|
|
</description>
|
127 |
|
|
</xsl:for-each>
|
128 |
|
|
</descriptions>
|
129 |
|
|
|
130 |
|
|
<geoLocations/>
|
131 |
44549
|
michele.ar
|
|
132 |
46065
|
michele.ar
|
<sources>
|
133 |
|
|
<xsl:for-each select="//dc:source[string-length(.) > 20]">
|
134 |
|
|
<source><xsl:value-of select="." /></source>
|
135 |
|
|
</xsl:for-each>
|
136 |
|
|
</sources>
|
137 |
|
|
|
138 |
44549
|
michele.ar
|
<isti:projects>
|
139 |
|
|
<xsl:for-each select="//dc:relation[starts-with(., 'info:eu-repo/grantAgreement')]">
|
140 |
49264
|
michele.ar
|
<xsl:if test="istiFunction:isValidProject(.)">
|
141 |
|
|
<isti:project>
|
142 |
|
|
<isti:infoId><xsl:value-of select="." /></isti:infoId>
|
143 |
|
|
<isti:openaireId />
|
144 |
|
|
<isti:code />
|
145 |
|
|
<isti:name />
|
146 |
|
|
<isti:acronym />
|
147 |
|
|
<isti:funder />
|
148 |
|
|
<isti:program />
|
149 |
|
|
<isti:jurisdiction />
|
150 |
|
|
</isti:project>
|
151 |
|
|
</xsl:if>
|
152 |
44549
|
michele.ar
|
</xsl:for-each>
|
153 |
|
|
</isti:projects>
|
154 |
48734
|
michele.ar
|
|
155 |
49368
|
michele.ar
|
<isti:datasets />
|
156 |
|
|
|
157 |
48734
|
michele.ar
|
<isti:persons>
|
158 |
|
|
<xsl:for-each select="//dc:relation[starts-with(., 'info:cnr-pdr/author')]">
|
159 |
|
|
<isti:person>
|
160 |
|
|
<isti:infoId><xsl:value-of select="." /></isti:infoId>
|
161 |
|
|
</isti:person>
|
162 |
|
|
</xsl:for-each>
|
163 |
|
|
</isti:persons>
|
164 |
43915
|
sandro.lab
|
|
165 |
|
|
</resource>
|
166 |
|
|
|
167 |
|
|
</oai:metadata>
|
168 |
|
|
</oai:record>
|
169 |
|
|
</xsl:template>
|
170 |
|
|
</xsl:stylesheet>
|
171 |
|
|
]]></CODE>
|
172 |
|
|
</SCRIPT>
|
173 |
|
|
</CONFIGURATION>
|
174 |
|
|
<STATUS/>
|
175 |
|
|
<SECURITY_PARAMETERS/>
|
176 |
|
|
</BODY>
|
177 |
|
|
</RESOURCE_PROFILE>
|