1 |
40203
|
claudio.at
|
<RESOURCE_PROFILE>
|
2 |
|
|
<HEADER>
|
3 |
44586
|
alessia.ba
|
<RESOURCE_IDENTIFIER value="2bc17dbe-93a9-4a4d-bd61-9831f1efdd0c_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
|
4 |
40203
|
claudio.at
|
<RESOURCE_TYPE value="TransformationRuleDSResourceType"/>
|
5 |
|
|
<RESOURCE_KIND value="TransformationRuleDSResources"/>
|
6 |
|
|
<RESOURCE_URI value=""/>
|
7 |
44586
|
alessia.ba
|
<DATE_OF_CREATION value="2016-11-21T11:15:30+00:00"/>
|
8 |
40203
|
claudio.at
|
</HEADER>
|
9 |
|
|
<BODY>
|
10 |
|
|
<CONFIGURATION>
|
11 |
|
|
<IMPORTED/>
|
12 |
|
|
<SCRIPT>
|
13 |
44586
|
alessia.ba
|
<TITLE>crossref2oaf</TITLE>
|
14 |
40203
|
claudio.at
|
<CODE>
|
15 |
44586
|
alessia.ba
|
<![CDATA[
|
16 |
48330
|
miriam.bag
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
17 |
45253
|
alessia.ba
|
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dc="http://purl.org/dc/elements/1.1/"
|
18 |
|
|
xmlns:dr="http://www.driver-repository.eu/namespace/dr"
|
19 |
44586
|
alessia.ba
|
xmlns:dri="http://www.driver-repository.eu/namespace/dri"
|
20 |
|
|
xmlns:oaf="http://namespace.openaire.eu/oaf" xmlns:date="http://exslt.org/dates-and-times"
|
21 |
45253
|
alessia.ba
|
extension-element-prefixes="date" exclude-result-prefixes="xs" version="2.0">
|
22 |
26600
|
sandro.lab
|
|
23 |
44586
|
alessia.ba
|
<xsl:output omit-xml-declaration="yes" indent="yes"/>
|
24 |
|
|
<xsl:param name="varOfficialName"/>
|
25 |
|
|
<xsl:param name="varDataSourceId"/>
|
26 |
26600
|
sandro.lab
|
|
27 |
44599
|
alessia.ba
|
<xsl:template match="/">
|
28 |
48175
|
claudio.at
|
<xsl:if test="not(.//error)">
|
29 |
48325
|
miriam.bag
|
<record>
|
30 |
|
|
<header>
|
31 |
|
|
<xsl:copy-of select="//*[local-name() = 'header']/*" copy-namespaces="no"/>
|
32 |
|
|
<dr:dateOfTransformation>
|
33 |
|
|
<xsl:value-of select="date:date-time()"/>
|
34 |
|
|
</dr:dateOfTransformation>
|
35 |
|
|
</header>
|
36 |
|
|
<metadata>
|
37 |
|
|
<dc:language>eng</dc:language>
|
38 |
|
|
<oaf:accessrights>UNKNOWN</oaf:accessrights>
|
39 |
|
|
<oaf:hostedBy id="openaire____::1256f046-bf1f-4afc-8b47-d0b147148b18"
|
40 |
|
|
name="Unknown Repository"/>
|
41 |
|
|
<oaf:collectedFrom>
|
42 |
|
|
<xsl:attribute name="name">
|
43 |
|
|
<xsl:value-of select="$varOfficialName"/>
|
44 |
|
|
</xsl:attribute>
|
45 |
|
|
<xsl:attribute name="id">
|
46 |
|
|
<xsl:value-of select="$varDataSourceId"/>
|
47 |
|
|
</xsl:attribute>
|
48 |
|
|
</oaf:collectedFrom>
|
49 |
26600
|
sandro.lab
|
|
50 |
48325
|
miriam.bag
|
<xsl:apply-templates select=".//*"/>
|
51 |
|
|
</metadata>
|
52 |
|
|
<xsl:copy-of select="//*[local-name() = 'about']/*" copy-namespaces="no"/>
|
53 |
|
|
</record>
|
54 |
48175
|
claudio.at
|
</xsl:if>
|
55 |
|
|
|
56 |
44599
|
alessia.ba
|
</xsl:template>
|
57 |
40203
|
claudio.at
|
|
58 |
44586
|
alessia.ba
|
<xsl:template match="dc:relation">
|
59 |
45253
|
alessia.ba
|
<xsl:variable name="projectId"
|
60 |
|
|
select="substring-after(., 'info:eu-repo/grantAgreement/EC/H2020/')"/>
|
61 |
|
|
<oaf:projectid>
|
62 |
|
|
<xsl:value-of select="concat('corda__h2020::', $projectId)"/>
|
63 |
|
|
</oaf:projectid>
|
64 |
44586
|
alessia.ba
|
</xsl:template>
|
65 |
40203
|
claudio.at
|
|
66 |
48325
|
miriam.bag
|
<xsl:template
|
67 |
|
|
match="
|
68 |
|
|
journal_article/titles/title |
|
69 |
|
|
conference_paper/titles/title |
|
70 |
|
|
book/content_item/titles/title |
|
71 |
|
|
posted_content/titles/title">
|
72 |
45253
|
alessia.ba
|
<dc:title>
|
73 |
|
|
<xsl:value-of select="normalize-space(.)"/>
|
74 |
|
|
</dc:title>
|
75 |
|
|
<!-- TODO: handle subtititles if needed -->
|
76 |
44586
|
alessia.ba
|
</xsl:template>
|
77 |
40203
|
claudio.at
|
|
78 |
48329
|
miriam.bag
|
<xsl:template match="book/book_metadata | book/book_series_metadata">
|
79 |
48325
|
miriam.bag
|
|
80 |
|
|
<xsl:if test="not(../content_item)">
|
81 |
|
|
<dc:title>
|
82 |
48329
|
miriam.bag
|
<xsl:value-of select="normalize-space(./titles/title)"/>
|
83 |
48325
|
miriam.bag
|
</dc:title>
|
84 |
|
|
<dc:date>
|
85 |
|
|
<xsl:variable name="d">
|
86 |
|
|
<xsl:value-of
|
87 |
|
|
select="string-join((./publication_date/year, ./publication_date/month, ./publication_date/day), '-')"
|
88 |
|
|
/>
|
89 |
|
|
</xsl:variable>
|
90 |
|
|
<xsl:value-of select="$d"/>
|
91 |
|
|
</dc:date>
|
92 |
|
|
<dc:type>
|
93 |
|
|
<xsl:value-of select="string('info:eu-repo/semantics/book')"/>
|
94 |
|
|
</dc:type>
|
95 |
48330
|
miriam.bag
|
<xsl:if test="./series_metadata">
|
96 |
|
|
<dc:source>
|
97 |
|
|
<xsl:value-of select="./series_metadata/*/title"/>
|
98 |
|
|
</dc:source>
|
99 |
|
|
</xsl:if>
|
100 |
48329
|
miriam.bag
|
<xsl:for-each select="./isbn">
|
101 |
|
|
<xsl:choose>
|
102 |
|
|
<xsl:when test=".[@media_type = 'electronic']"> <dc:source>
|
103 |
48325
|
miriam.bag
|
<xsl:value-of
|
104 |
48329
|
miriam.bag
|
select="concat(string('eisbn: '), normalize-space(.))"
|
105 |
48325
|
miriam.bag
|
/>
|
106 |
48329
|
miriam.bag
|
</dc:source></xsl:when>
|
107 |
|
|
<xsl:when test=".[@media_type = 'print' or not(@media_type)]">
|
108 |
|
|
<dc:source>
|
109 |
48325
|
miriam.bag
|
<xsl:value-of
|
110 |
48329
|
miriam.bag
|
select="concat(string('isbn: '), normalize-space(.))"
|
111 |
48325
|
miriam.bag
|
/>
|
112 |
|
|
</dc:source>
|
113 |
48329
|
miriam.bag
|
</xsl:when>
|
114 |
|
|
</xsl:choose>
|
115 |
48325
|
miriam.bag
|
|
116 |
48329
|
miriam.bag
|
</xsl:for-each>
|
117 |
|
|
<xsl:for-each select="./issn">
|
118 |
|
|
<xsl:choose>
|
119 |
|
|
<xsl:when test=".[@media_type = 'electronic']">
|
120 |
|
|
<dc:source>
|
121 |
|
|
<xsl:value-of
|
122 |
|
|
select="concat(string('eissn: '), normalize-space(.))"
|
123 |
|
|
/>
|
124 |
|
|
</dc:source>
|
125 |
|
|
</xsl:when>
|
126 |
|
|
<xsl:when test=".[@media_type = 'print' or not(@media_type)]">
|
127 |
|
|
<dc:source>
|
128 |
|
|
<xsl:value-of
|
129 |
|
|
select="concat(string('issn: '), normalize-space(./series_metadata/issn[@media_type = 'print' or not(@media_type)]))"
|
130 |
|
|
/>
|
131 |
|
|
</dc:source>
|
132 |
|
|
</xsl:when>
|
133 |
|
|
</xsl:choose>
|
134 |
48325
|
miriam.bag
|
|
135 |
|
|
|
136 |
48329
|
miriam.bag
|
</xsl:for-each>
|
137 |
48175
|
claudio.at
|
|
138 |
48325
|
miriam.bag
|
<dr:CobjCategory>0002</dr:CobjCategory>
|
139 |
48175
|
claudio.at
|
</xsl:if>
|
140 |
48329
|
miriam.bag
|
|
141 |
|
|
<xsl:if test="./publisher">
|
142 |
48175
|
claudio.at
|
<dc:publisher>
|
143 |
|
|
<xsl:value-of select="./publisher/publisher_name"/>
|
144 |
|
|
</dc:publisher>
|
145 |
|
|
</xsl:if>
|
146 |
48325
|
miriam.bag
|
|
147 |
|
|
|
148 |
48329
|
miriam.bag
|
</xsl:template>
|
149 |
|
|
<xsl:template
|
150 |
48325
|
miriam.bag
|
match="
|
151 |
|
|
journal_article/contributors/person_name[./@contributor_role = 'author'] |
|
152 |
|
|
conference_paper/contributors/person_name[./@contributor_role = 'author'] |
|
153 |
|
|
content_item/contributors/person_name[./@contributor_role = 'author'] |
|
154 |
|
|
posted_content/contributors/person_name[./@contributor_role = 'author']">
|
155 |
44586
|
alessia.ba
|
<dc:creator>
|
156 |
|
|
<xsl:if test="string-length(./ORCID)">
|
157 |
|
|
<xsl:attribute name="nameIdentifierScheme">ORCID</xsl:attribute>
|
158 |
|
|
<xsl:attribute name="schemeURI">http://orcid.org/</xsl:attribute>
|
159 |
45253
|
alessia.ba
|
<xsl:attribute name="nameIdentifier">
|
160 |
|
|
<xsl:value-of select="substring-after(./ORCID, 'http://orcid.org/')"/>
|
161 |
|
|
</xsl:attribute>
|
162 |
44586
|
alessia.ba
|
</xsl:if>
|
163 |
|
|
<xsl:value-of select="concat(./surname, ', ', ./given_name)"/>
|
164 |
|
|
</dc:creator>
|
165 |
|
|
</xsl:template>
|
166 |
40203
|
claudio.at
|
|
167 |
48325
|
miriam.bag
|
<xsl:template
|
168 |
|
|
match="
|
169 |
|
|
journal_article/publication_date |
|
170 |
|
|
conference_paper/publication_date |
|
171 |
|
|
content_item/publication_date">
|
172 |
45253
|
alessia.ba
|
<xsl:variable name="d">
|
173 |
|
|
<xsl:value-of select="string-join((./year, ./month, ./day), '-')"/>
|
174 |
|
|
</xsl:variable>
|
175 |
|
|
<dc:date>
|
176 |
|
|
<xsl:value-of select="$d"/>
|
177 |
|
|
</dc:date>
|
178 |
48325
|
miriam.bag
|
<!-- <oaf:dateAccepted>
|
179 |
45253
|
alessia.ba
|
<xsl:value-of select="$d"/>
|
180 |
48175
|
claudio.at
|
</oaf:dateAccepted> -->
|
181 |
44586
|
alessia.ba
|
</xsl:template>
|
182 |
|
|
|
183 |
48325
|
miriam.bag
|
<xsl:template
|
184 |
|
|
match="
|
185 |
|
|
posted_content/posted_date |
|
186 |
|
|
posted_content/acceptance_date">
|
187 |
48175
|
claudio.at
|
<xsl:variable name="d">
|
188 |
|
|
<xsl:value-of select="string-join((./year, ./month, ./day), '-')"/>
|
189 |
|
|
</xsl:variable>
|
190 |
|
|
<dc:date>
|
191 |
|
|
<xsl:value-of select="$d"/>
|
192 |
|
|
</dc:date>
|
193 |
|
|
<!-- <oaf:dateAccepted>
|
194 |
|
|
<xsl:value-of select="$d"/>
|
195 |
|
|
</oaf:dateAccepted> -->
|
196 |
|
|
</xsl:template>
|
197 |
45253
|
alessia.ba
|
<xsl:template match="dri:recordIdentifier">
|
198 |
|
|
<dc:identifier>
|
199 |
|
|
<xsl:value-of select="concat('http://dx.doi.org/', .)"/>
|
200 |
|
|
</dc:identifier>
|
201 |
|
|
<oaf:identifier identifierType="doi">
|
202 |
|
|
<xsl:value-of select="."/>
|
203 |
|
|
</oaf:identifier>
|
204 |
|
|
</xsl:template>
|
205 |
|
|
|
206 |
|
|
<xsl:template match="conference_paper">
|
207 |
|
|
<dc:type>
|
208 |
48175
|
claudio.at
|
<xsl:value-of select="string('info:eu-repo/semantics/conferenceObject')"/>
|
209 |
|
|
</dc:type>
|
210 |
|
|
<dc:type>
|
211 |
45253
|
alessia.ba
|
<xsl:value-of select="string('conference paper')"/>
|
212 |
|
|
</dc:type>
|
213 |
|
|
<!-- conference_paper: only source -->
|
214 |
|
|
<dc:source>
|
215 |
|
|
<xsl:value-of select="normalize-space(../proceedings_metadata/proceedings_title)"/>
|
216 |
|
|
</dc:source>
|
217 |
|
|
<dr:CobjCategory>0004</dr:CobjCategory>
|
218 |
|
|
<!-- TODO: ISBN? Other proceedings info? -->
|
219 |
|
|
</xsl:template>
|
220 |
|
|
|
221 |
|
|
<xsl:template match="journal_article">
|
222 |
|
|
<dc:type>
|
223 |
48175
|
claudio.at
|
<xsl:value-of select="string('info:eu-repo/semantics/article')"/>
|
224 |
|
|
</dc:type>
|
225 |
|
|
<dc:type>
|
226 |
45253
|
alessia.ba
|
<xsl:value-of select="string('journal article')"/>
|
227 |
|
|
</dc:type>
|
228 |
|
|
<dc:source>
|
229 |
|
|
<xsl:value-of select="normalize-space(../journal_metadata/full_title)"/>
|
230 |
|
|
</dc:source>
|
231 |
|
|
<dr:CobjCategory>0001</dr:CobjCategory>
|
232 |
|
|
<oaf:journal eissn="{../journal_metadata/issn[@media_type='electronic']}"
|
233 |
|
|
issn="{../journal_metadata/issn[@media_type='print' or not(@media_type)]}"
|
234 |
|
|
iss="{../journal_issue/issue}" vol="{../journal_issue/journal_volume/volume}"
|
235 |
|
|
sp="{./pages/first_page}" ep="{./pages/last_page}">
|
236 |
|
|
<xsl:value-of select="normalize-space(../journal_metadata/full_title)"/>
|
237 |
|
|
</oaf:journal>
|
238 |
|
|
</xsl:template>
|
239 |
|
|
|
240 |
48175
|
claudio.at
|
<xsl:template match="content_item">
|
241 |
|
|
<dc:type>
|
242 |
|
|
<xsl:value-of select="string('info:eu-repo/semantics/bookPart')"/>
|
243 |
|
|
</dc:type>
|
244 |
|
|
<dc:type>
|
245 |
|
|
<xsl:value-of select="./@component_type"/>
|
246 |
|
|
</dc:type>
|
247 |
48325
|
miriam.bag
|
<xsl:choose>
|
248 |
|
|
<xsl:when test="../book_series_metadata">
|
249 |
|
|
<dc:source>
|
250 |
|
|
<xsl:value-of select="concat(normalize-space(../book_series_metadata/series_metadata/*/title), ' - ', normalize-space(../book_series_metadata/titles/title))"/>
|
251 |
|
|
</dc:source>
|
252 |
|
|
</xsl:when>
|
253 |
|
|
<xsl:when test="../book_metadata">
|
254 |
|
|
<dc:source>
|
255 |
|
|
<xsl:value-of select="normalize-space(../book_metadata/*/title)"/>
|
256 |
|
|
</dc:source>
|
257 |
|
|
</xsl:when>
|
258 |
|
|
</xsl:choose>
|
259 |
|
|
|
260 |
|
|
<xsl:for-each select="..//issn ">
|
261 |
|
|
<xsl:choose>
|
262 |
|
|
<xsl:when test=".[@media_type = 'electronic']">
|
263 |
|
|
<dc:source>
|
264 |
|
|
<xsl:value-of select="concat(string('eissn: '), normalize-space(.))"/>
|
265 |
|
|
</dc:source>
|
266 |
|
|
</xsl:when>
|
267 |
|
|
<xsl:when test=".[@media_type = 'print' or not(@media_type)]">
|
268 |
|
|
<dc:source>
|
269 |
|
|
<xsl:value-of select="concat(string('issn: '), normalize-space(.))"/>
|
270 |
|
|
</dc:source>
|
271 |
|
|
</xsl:when>
|
272 |
|
|
</xsl:choose>
|
273 |
|
|
</xsl:for-each>
|
274 |
|
|
<xsl:for-each select="..//isbn ">
|
275 |
|
|
<xsl:choose>
|
276 |
|
|
<xsl:when test=".[@media_type = 'electronic']">
|
277 |
|
|
<dc:source>
|
278 |
|
|
<xsl:value-of select="concat(string('eisbn: '), normalize-space(.))"/>
|
279 |
|
|
</dc:source>
|
280 |
|
|
</xsl:when>
|
281 |
|
|
<xsl:when test=".[@media_type = 'print' or not(@media_type)]">
|
282 |
|
|
<dc:source>
|
283 |
|
|
<xsl:value-of select="concat(string('isbn: '), normalize-space(.))" />
|
284 |
|
|
</dc:source>
|
285 |
|
|
</xsl:when>
|
286 |
|
|
</xsl:choose>
|
287 |
|
|
</xsl:for-each>
|
288 |
|
|
|
289 |
|
|
|
290 |
|
|
|
291 |
48175
|
claudio.at
|
<dr:CobjCategory>0013</dr:CobjCategory>
|
292 |
|
|
|
293 |
|
|
</xsl:template>
|
294 |
|
|
|
295 |
48325
|
miriam.bag
|
<!-- <xsl:template match="book_series_metadata">
|
296 |
48175
|
claudio.at
|
<xsl:if test="not(../content_item)">
|
297 |
|
|
<dc:type>
|
298 |
|
|
<xsl:value-of select="string('info:eu-repo/semantics/book')"/>
|
299 |
|
|
</dc:type>
|
300 |
|
|
<dc:source>
|
301 |
48325
|
miriam.bag
|
<xsl:value-of
|
302 |
|
|
select="concat(normalize-space(../book_series_metadata/series_metadata/*/title), ' - ', normalize-space(../book_series_metadata/titles/title))"
|
303 |
|
|
/>
|
304 |
48175
|
claudio.at
|
</dc:source>
|
305 |
|
|
<dr:CobjCategory>0002</dr:CobjCategory>
|
306 |
|
|
</xsl:if>
|
307 |
|
|
</xsl:template>
|
308 |
|
|
|
309 |
48325
|
miriam.bag
|
<xsl:template match="book/book_metadata">
|
310 |
|
|
<xsl:if test="not(../content_item)">
|
311 |
|
|
<dc:type>
|
312 |
|
|
<xsl:value-of select="string('info:eu-repo/semantics/book')"/>
|
313 |
|
|
</dc:type>
|
314 |
|
|
<dc:source>
|
315 |
|
|
<xsl:value-of
|
316 |
|
|
select="concat(string('eisbn: '), normalize-space(./isbn[@media_type = 'electronic']))"
|
317 |
|
|
/>
|
318 |
|
|
</dc:source>
|
319 |
|
|
<dc:source>
|
320 |
|
|
<xsl:value-of
|
321 |
|
|
select="concat(string('isbn: '), normalize-space(./isbn[@media_type = 'print' or not(@media_type)]))"
|
322 |
|
|
/>
|
323 |
|
|
</dc:source>
|
324 |
|
|
<dr:CobjCategory>0002</dr:CobjCategory>
|
325 |
|
|
</xsl:if>
|
326 |
|
|
|
327 |
|
|
|
328 |
|
|
</xsl:template>-->
|
329 |
|
|
|
330 |
48175
|
claudio.at
|
<xsl:template match="posted_content">
|
331 |
|
|
<xsl:variable name="type">
|
332 |
|
|
<xsl:value-of select="./@type"/>
|
333 |
|
|
</xsl:variable>
|
334 |
|
|
<xsl:choose>
|
335 |
|
|
<xsl:when test="normalize-space($type) = 'preprint'">
|
336 |
|
|
<dc:type>
|
337 |
|
|
<xsl:value-of select="string('info:eu-repo/semantics/preprint')"/>
|
338 |
|
|
</dc:type>
|
339 |
|
|
<dr:CobjCategory>0016</dr:CobjCategory>
|
340 |
44599
|
alessia.ba
|
</xsl:when>
|
341 |
48175
|
claudio.at
|
<xsl:when test="normalize-space($type) = 'working_paper'">
|
342 |
|
|
<dc:type>
|
343 |
|
|
<xsl:value-of select="string('info:eu-repo/semantics/workingPaper')"/>
|
344 |
|
|
</dc:type>
|
345 |
44599
|
alessia.ba
|
</xsl:when>
|
346 |
48175
|
claudio.at
|
<xsl:when test="normalize-space($type) = 'report'">
|
347 |
|
|
<dc:type>
|
348 |
|
|
<xsl:value-of select="string('info:eu-repo/semantics/report')"/>
|
349 |
|
|
</dc:type>
|
350 |
44599
|
alessia.ba
|
</xsl:when>
|
351 |
45253
|
alessia.ba
|
<xsl:otherwise>
|
352 |
48175
|
claudio.at
|
<dc:type>
|
353 |
|
|
<xsl:value-of select="string('info:eu-repo/semantics/other')"/>
|
354 |
|
|
</dc:type>
|
355 |
|
|
|
356 |
45253
|
alessia.ba
|
</xsl:otherwise>
|
357 |
44586
|
alessia.ba
|
|
358 |
48175
|
claudio.at
|
</xsl:choose>
|
359 |
48325
|
miriam.bag
|
<dc:source>
|
360 |
|
|
<xsl:value-of
|
361 |
|
|
select="concat(normalize-space(.//institution_name), ' - ', normalize-space(./item_number))"
|
362 |
|
|
/>
|
363 |
|
|
</dc:source>
|
364 |
48175
|
claudio.at
|
<xsl:if test="not(normalize-space($type) = 'preprint')">
|
365 |
48325
|
miriam.bag
|
<dr:CobjCategory>0020</dr:CobjCategory>
|
366 |
|
|
</xsl:if>
|
367 |
48175
|
claudio.at
|
|
368 |
|
|
</xsl:template>
|
369 |
|
|
<!-- Extend with new templates for additional types of publication -->
|
370 |
|
|
|
371 |
|
|
|
372 |
44586
|
alessia.ba
|
<xsl:template match="* | @*"/>
|
373 |
|
|
|
374 |
|
|
</xsl:stylesheet>
|
375 |
48325
|
miriam.bag
|
|
376 |
45253
|
alessia.ba
|
]]>
|
377 |
40203
|
claudio.at
|
</CODE>
|
378 |
|
|
</SCRIPT>
|
379 |
|
|
</CONFIGURATION>
|
380 |
|
|
<STATUS/>
|
381 |
|
|
<SECURITY_PARAMETERS>SECURITY_PARAMETERS</SECURITY_PARAMETERS>
|
382 |
|
|
</BODY>
|
383 |
|
|
</RESOURCE_PROFILE>
|