Project

General

Profile

1
<RESOURCE_PROFILE>
2
    <HEADER>
3
        <RESOURCE_IDENTIFIER value="2bc17dbe-93a9-4a4d-bd61-9831f1efdd0c_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
4
        <RESOURCE_TYPE value="TransformationRuleDSResourceType"/>
5
        <RESOURCE_KIND value="TransformationRuleDSResources"/>
6
        <RESOURCE_URI value=""/>
7
        <DATE_OF_CREATION value="2018-11-22T16:58:58+00:00"/>
8
    </HEADER>
9
    <BODY>
10
        <CONFIGURATION>
11
            <IMPORTED/>
12
            <SCRIPT>
13
                <TITLE>crossref2oaf</TITLE>
14
                <CODE>&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
15
    xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dc="http://purl.org/dc/elements/1.1/"
16
    xmlns:dr="http://www.driver-repository.eu/namespace/dr"
17
    xmlns:dri="http://www.driver-repository.eu/namespace/dri"
18
    xmlns:oaf="http://namespace.openaire.eu/oaf" xmlns:date="http://exslt.org/dates-and-times"
19
    xmlns:TransformationFunction="eu.dnetlib.data.collective.transformation.core.xsl.ext.TransformationFunctionProxy"
20
    extension-element-prefixes="date TransformationFunction" 
21
    exclude-result-prefixes="xs TransformationFunction" version="2.0"&gt;
22
    
23
    &lt;xsl:output omit-xml-declaration="yes" indent="yes"/&gt;
24
    &lt;xsl:param name="varOfficialName"/&gt;
25
    &lt;xsl:param name="varDataSourceId"/&gt;
26
    &lt;xsl:variable name="tf" select="TransformationFunction:getInstance()"/&gt;
27
    
28
    &lt;xsl:template name="terminate"&gt;
29
        &lt;xsl:message terminate="yes"&gt;
30
            record is not compliant, transformation is interrupted.
31
        &lt;/xsl:message&gt;
32
    &lt;/xsl:template&gt;
33

    
34
    &lt;xsl:template match="/"&gt;
35
        &lt;xsl:if test="not(.//error)"&gt;
36
        &lt;record&gt;
37
            &lt;header&gt;
38
                &lt;xsl:copy-of select="//*[local-name() = 'header']/*" copy-namespaces="no"/&gt;
39
                &lt;dr:dateOfTransformation&gt;
40
                    &lt;xsl:value-of select="date:date-time()"/&gt;
41
                &lt;/dr:dateOfTransformation&gt;
42
            &lt;/header&gt;
43
            &lt;metadata&gt;
44

    
45
&lt;!-- dropping records without titles --&gt;
46
&lt;!--
47
&lt;xsl:if test="not(//(journal_article, conference_paper, book/content_item, posted_content, report-paper/report-paper_metadata, dissertation, database/dataset, sa_component/component_list/component)/titles/title[string-length(normalize-space(.))&gt; 0]) and not(//*[local-name()='conference_paper']/*[local-name()='titles']/*[local-name()='title'][string-length(normalize-space(.))&gt; 0])"&gt;
48
--&gt;
49
&lt;xsl:if test="not(//(journal_article, conference_paper, book/content_item, book[not(./content_item)]/book_series_metadata/series_metadata, book[not(./content_item)]/book_metadata, posted_content, report-paper/report-paper_metadata, dissertation, database/dataset, sa_component/component_list/component)/titles/title[string-length(normalize-space(.))&gt; 0])"&gt;
50
                                                         &lt;xsl:call-template name="terminate"/&gt;
51
&lt;/xsl:if&gt;
52

    
53
&lt;!-- ToDo: find items without cobjcategory --&gt;
54

    
55
                &lt;dc:language&gt;eng&lt;/dc:language&gt;
56
                &lt;xsl:call-template name="accessrights"/&gt;
57
                &lt;oaf:hostedBy id="openaire____::1256f046-bf1f-4afc-8b47-d0b147148b18"
58
                    name="Unknown Repository"/&gt;
59
                &lt;oaf:collectedFrom&gt;
60
                    &lt;xsl:attribute name="name"&gt;
61
                        &lt;xsl:value-of select="$varOfficialName"/&gt;
62
                    &lt;/xsl:attribute&gt;
63
                    &lt;xsl:attribute name="id"&gt;
64
                        &lt;xsl:value-of select="$varDataSourceId"/&gt;
65
                    &lt;/xsl:attribute&gt;
66
                &lt;/oaf:collectedFrom&gt;
67
                
68
                &lt;xsl:apply-templates select=".//*"/&gt;
69
            &lt;/metadata&gt;
70
            &lt;xsl:copy-of select="//*[local-name() = 'about']/*" copy-namespaces="no"/&gt;
71
        &lt;/record&gt;
72
        &lt;/xsl:if&gt;
73
        
74
    &lt;/xsl:template&gt;
75

    
76
&lt;!--    
77
    &lt;xsl:template match="dc:relation"&gt;
78
        &lt;xsl:variable name="projectId"
79
            select="substring-after(., 'info:eu-repo/grantAgreement/EC/H2020/')"/&gt;
80
        &lt;oaf:projectid&gt;
81
            &lt;xsl:value-of select="concat('corda__h2020::', $projectId)"/&gt;
82
        &lt;/oaf:projectid&gt;
83
    &lt;/xsl:template&gt;
84
--&gt; 
85

    
86
&lt;!-- funding --&gt;    
87
&lt;xsl:template match="*[local-name()='relation'][starts-with(., 'info:eu-repo/grantAgreement/')] | assertion[./@name='fundgroup']"&gt;
88

    
89
&lt;xsl:variable name="varFP7" select="'corda_______::'"/&gt;
90
&lt;xsl:variable name="varH2020" select="'corda__h2020::'"/&gt;
91
&lt;xsl:variable name="varAKA" select="'aka_________::'"/&gt;     &lt;!-- tbd, no statements yet --&gt;
92
&lt;xsl:variable name="varAFF" select="'aff_________::'"/&gt;
93
&lt;xsl:variable name="varARC" select="'arc_________::'"/&gt;
94
&lt;xsl:variable name="varCONICYT" select="'conicytf____::'"/&gt;
95
&lt;xsl:variable name="varDFG" select="'dfgf________::'"/&gt;
96
&lt;xsl:variable name="varFCT" select="'fct_________::'"/&gt;
97
&lt;xsl:variable name="varFWF" select="'fwf_________::'"/&gt;
98
&lt;xsl:variable name="varHRZZ" select="'irb_hr______::'"/&gt;
99
&lt;xsl:variable name="varMESTD" select="'mestd_______::'"/&gt;
100
&lt;xsl:variable name="varMIUR" select="'miur________::'"/&gt;     &lt;!-- tbd, no statements yet --&gt;
101
&lt;xsl:variable name="varMZOS" select="'irb_hr______::'"/&gt;
102
&lt;xsl:variable name="varNHMRC" select="'nhmrc_______::'"/&gt;
103
&lt;xsl:variable name="varNIH" select="'nih_________::'"/&gt;
104
&lt;xsl:variable name="varNSF" select="'nsf_________::'"/&gt;
105
&lt;xsl:variable name="varNWO" select="'nwo_________::'"/&gt;
106
&lt;xsl:variable name="varRCUK" select="'rcuk________::'"/&gt;
107
&lt;xsl:variable name="varSFI" select="'sfi_________::'"/&gt;
108
&lt;xsl:variable name="varSGOV" select="'sgov________::'"/&gt;
109
&lt;xsl:variable name="varSNSF" select="'snsf________::'"/&gt;
110
&lt;xsl:variable name="varTARA" select="'taraexp_____::'"/&gt;
111
&lt;xsl:variable name="varTUBITAK" select="'tubitakf____::'"/&gt;
112
&lt;xsl:variable name="varWT" select="'wt__________::'"/&gt;
113

    
114
&lt;!-- EU H2020 --&gt;
115
&lt;xsl:for-each select=".[local-name()='relation'][starts-with(., 'info:eu-repo/grantAgreement/EC/H2020')]"&gt;
116
        &lt;xsl:variable name="projectId"       select="substring-after(., 'info:eu-repo/grantAgreement/EC/H2020/')"/&gt;
117
        &lt;oaf:projectid&gt;     &lt;xsl:value-of select="concat($varH2020, $projectId)"/&gt;       &lt;/oaf:projectid&gt;
118
&lt;/xsl:for-each&gt;
119

    
120
&lt;!-- EU FP7 --&gt;
121
&lt;xsl:for-each select=".[local-name()='assertion' and ./@name='fundgroup'][.//assertion[./@name='funder_identifier' and ends-with(., '10.13039/100011102')] or ./assertion[./@name='funder_name' and (contains(., 'Seventh Framework Program') or contains(., 'FP7'))]]/assertion[./@name='award_number']"&gt;
122
        &lt;xsl:variable name="projectId"       select="."/&gt;
123
        &lt;oaf:projectid&gt;     &lt;xsl:value-of select="concat($varFP7, $projectId)"/&gt;       &lt;/oaf:projectid&gt;
124
&lt;/xsl:for-each&gt;
125

    
126
&lt;!-- AFF --&gt;
127
&lt;xsl:for-each select=".[local-name()='assertion' and ./@name='fundgroup'][.//assertion[./@name='funder_identifier' and ends-with(., '10.13039/501100002341')] or ./assertion[./@name='funder_name' and (contains(., 'Suomen Akatemia') or contains(., 'Academy of Finland'))]]/assertion[./@name='award_number']"&gt;
128
        &lt;xsl:variable name="projectId"       select="."/&gt;
129
        &lt;oaf:projectid&gt;     &lt;xsl:value-of select="concat($varAFF, $projectId)"/&gt;       &lt;/oaf:projectid&gt;
130
&lt;/xsl:for-each&gt;
131

    
132
&lt;!-- ARC --&gt;
133
&lt;xsl:for-each select=".[local-name()='assertion' and ./@name='fundgroup'][.//assertion[./@name='funder_identifier' and ends-with(., '10.13039/501100000923')] or ./assertion[./@name='funder_name' and contains(., 'Australian Research Council')]]/assertion[./@name='award_number']"&gt;
134
        &lt;xsl:variable name="projectId"       select="."/&gt;
135
        &lt;oaf:projectid&gt;     &lt;xsl:value-of select="concat($varARC, $projectId)"/&gt;       &lt;/oaf:projectid&gt;
136
&lt;/xsl:for-each&gt;
137

    
138
&lt;!-- CONICYT --&gt;
139
&lt;xsl:for-each select=".[local-name()='assertion' and ./@name='fundgroup'][.//assertion[./@name='funder_identifier' and ends-with(., '10.13039/501100002848')] or ./assertion[./@name='funder_name' and (contains(., 'Comisión Nacional de Investigación Científica y Tecnológica') or contains(., 'CONICYT'))]]/assertion[./@name='award_number']"&gt;
140
        &lt;xsl:variable name="projectId"       select="."/&gt;
141
        &lt;oaf:projectid&gt;     &lt;xsl:value-of select="concat($varCONICYT, $projectId)"/&gt;       &lt;/oaf:projectid&gt;
142
&lt;/xsl:for-each&gt;
143

    
144
&lt;!-- DFG --&gt;
145
&lt;xsl:for-each select=".[local-name()='assertion' and ./@name='fundgroup'][.//assertion[./@name='funder_identifier' and ends-with(., '10.13039/501100001659')] or ./assertion[./@name='funder_name' and (contains(., 'Deutsche Forschungsgemeinschaft') or contains(., 'DFG'))]]/assertion[./@name='award_number']"&gt;
146
        &lt;xsl:variable name="projectId"       select="."/&gt;
147
        &lt;oaf:projectid&gt;     &lt;xsl:value-of select="concat($varDFG, $projectId)"/&gt;       &lt;/oaf:projectid&gt;
148
&lt;/xsl:for-each&gt;
149

    
150
&lt;!-- RCUK --&gt;
151
&lt;xsl:for-each select=".[local-name()='assertion' and ./@name='fundgroup'][.//assertion[./@name='funder_identifier' and ends-with(., '10.13039/501100000690')] or ./assertion[./@name='funder_name' and (contains(., 'Research Councils UK') or contains(., 'RCUK'))]]/assertion[./@name='award_number']"&gt;
152
        &lt;xsl:variable name="projectId"       select="."/&gt;
153
        &lt;oaf:projectid&gt;     &lt;xsl:value-of select="concat($varRCUK, $projectId)"/&gt;       &lt;/oaf:projectid&gt;
154
&lt;/xsl:for-each&gt;
155

    
156
&lt;!-- SGOV --&gt;
157
&lt;xsl:for-each select=".[local-name()='assertion' and ./@name='fundgroup'][./assertion[./@name='funder_name' and (contains(., 'Gobierno de Espana') or contains(., 'Ministry of Economy and Competitiveness') or contains(., 'Ministerio de Economía y Competitividad'))]]/assertion[./@name='award_number']"&gt;
158
        &lt;xsl:variable name="projectId"       select="."/&gt;
159
        &lt;oaf:projectid&gt;     &lt;xsl:value-of select="concat($varSGOV, $projectId)"/&gt;       &lt;/oaf:projectid&gt;
160
&lt;/xsl:for-each&gt;
161

    
162
&lt;!-- SNSF --&gt;
163
&lt;xsl:for-each select=".[local-name()='assertion' and ./@name='fundgroup'][.//assertion[./@name='funder_identifier' and ends-with(., '10.13039/501100001711')] or ./assertion[./@name='funder_name' and (contains(., 'Swiss National Science Foundation') or contains(., 'Schweizerischer Nationalfonds zur Förderung der Wissenschaftlichen Forschung'))]]/assertion[./@name='award_number']"&gt;
164
        &lt;xsl:variable name="projectId"       select="."/&gt;
165
        &lt;oaf:projectid&gt;     &lt;xsl:value-of select="concat($varSNSF, $projectId)"/&gt;       &lt;/oaf:projectid&gt;
166
&lt;/xsl:for-each&gt;
167

    
168
&lt;!-- TUBITAK --&gt;
169
&lt;xsl:for-each select=".[local-name()='assertion' and ./@name='fundgroup'][.//assertion[./@name='funder_identifier' and ends-with(., '10.13039/501100004410')] or ./assertion[./@name='funder_name' and (contains(., 'Turkish National Science and Research Council') or (contains(., 'Türkiye Bilimsel ve Teknolojik Ara') and contains(., 'rma Kurumu')))]]/assertion[./@name='award_number']"&gt;
170
        &lt;xsl:variable name="projectId"       select="."/&gt;
171
        &lt;oaf:projectid&gt;     &lt;xsl:value-of select="concat($varTUBITAK, $projectId)"/&gt;       &lt;/oaf:projectid&gt;
172
&lt;/xsl:for-each&gt;
173
       
174
&lt;/xsl:template&gt;
175
    
176
    &lt;xsl:template match="
177
            journal_article/titles/title |
178
            conference_paper/titles/title |
179
            book/content_item/titles/title |
180
            posted_content/titles/title |
181
            report-paper/report-paper_metadata/titles/title |
182
            dissertation/titles/title |
183
            database/dataset/titles/title |
184
            sa_component/component_list/component/titles/title"&gt;
185

    
186
        &lt;dc:title&gt;
187
            &lt;xsl:value-of select="normalize-space(.)"/&gt;
188
        &lt;/dc:title&gt;
189
       &lt;xsl:if test="../subtitle[string-length(.) > 0]"&gt;
190
        &lt;dc:title&gt;
191
            &lt;xsl:value-of select="normalize-space(../subtitle)"/&gt;
192
        &lt;/dc:title&gt;
193
       &lt;/xsl:if&gt;
194
        &lt;!-- TODO: handle subtititles if needed --&gt;
195
    &lt;/xsl:template&gt;
196
    
197
    &lt;xsl:template match="book/book_series_metadata"&gt;
198
        &lt;xsl:if test="not(../content_item)"&gt;
199
            &lt;dc:title&gt;
200
                &lt;xsl:value-of select="concat(normalize-space(./series_metadata/*/title),' ' , normalize-space(./titles/title))"/&gt;
201
            &lt;/dc:title&gt;
202
       &lt;xsl:if test="./titles/subtitle[string-length(.) > 0]"&gt;
203
        &lt;dc:title&gt;
204
            &lt;xsl:value-of select="normalize-space(./titles/subtitle[string-length(.) > 0])"/&gt;
205
        &lt;/dc:title&gt;
206
       &lt;/xsl:if&gt;
207
            &lt;xsl:variable name="varType" select="string('info:eu-repo/semantics/book')"/&gt;
208
            &lt;dc:type&gt;
209
                &lt;xsl:value-of select="$varType"/&gt;
210
            &lt;/dc:type&gt;
211
&lt;xsl:variable name='varCobjCategory' select="TransformationFunction:convertString($tf, $varType, 'TextTypologies')" /&gt;
212
&lt;xsl:variable name='varSuperType' select="TransformationFunction:convertString($tf, $varCobjCategory, 'SuperTypes')" /&gt;
213
&lt;dr:CobjCategory&gt;
214
          &lt;xsl:attribute name="type" select="$varSuperType"/&gt;
215
          &lt;xsl:value-of select="$varCobjCategory" /&gt;
216
&lt;/dr:CobjCategory&gt;
217
            &lt;dc:date&gt;
218
                &lt;xsl:variable name="d"&gt;
219
                    &lt;xsl:value-of select="string-join((./publication_date/year, ./publication_date/month, ./publication_date/day), '-')"/&gt;
220
                &lt;/xsl:variable&gt;
221
                &lt;xsl:value-of select="$d"/&gt;
222
            &lt;/dc:date&gt;
223
        &lt;/xsl:if&gt;
224
        &lt;xsl:if test=".//publisher"&gt;
225
            &lt;dc:publisher&gt;
226
                &lt;xsl:value-of select="./publisher/publisher_name"/&gt;
227
            &lt;/dc:publisher&gt;
228
        &lt;/xsl:if&gt;
229
    &lt;/xsl:template&gt;
230

    
231
    &lt;xsl:template match="journal_article/contributors/person_name[./@contributor_role = 'author'] | 
232
                         conference_paper/contributors/person_name[./@contributor_role = 'author'] |
233
                         content_item/contributors/person_name[./@contributor_role = 'author'] |
234
                         posted_content/contributors/person_name[./@contributor_role = 'author']"&gt;
235
        &lt;dc:creator&gt;
236
            &lt;xsl:if test="string-length(./ORCID)"&gt;
237
                &lt;xsl:attribute name="nameIdentifierScheme"&gt;ORCID&lt;/xsl:attribute&gt;
238
                &lt;xsl:attribute name="schemeURI"&gt;http://orcid.org/&lt;/xsl:attribute&gt;
239
                &lt;xsl:attribute name="nameIdentifier"&gt;
240
                    &lt;xsl:value-of select="substring-after(./ORCID, 'http://orcid.org/')"/&gt;
241
                &lt;/xsl:attribute&gt;
242
            &lt;/xsl:if&gt;
243
            &lt;xsl:value-of select="concat(./surname, ', ', ./given_name)"/&gt;
244
        &lt;/dc:creator&gt;
245
    &lt;/xsl:template&gt;
246
    
247
    &lt;xsl:template match="
248
                         journal_article/publication_date | 
249
                         conference_paper/publication_date |
250
                         content_item/publication_date |
251
                         dissertation/approval_date |
252
                         report-paper_metadata/publication_date"&gt;
253
        &lt;xsl:variable name="d"&gt;
254
            &lt;xsl:value-of select="string-join((./year, ./month, ./day), '-')"/&gt;
255
        &lt;/xsl:variable&gt;
256
        &lt;xsl:variable name="dAcc"&gt;
257
             &lt;xsl:value-of select="string-join((./year, substring(substring(concat('0',normalize-space(./month),'1'),string-length(normalize-space(./month))),1,2), substring(substring(concat('0',normalize-space(./day),'1'),string-length(normalize-space(./day))),1,2)), '-')"/&gt;
258
        &lt;/xsl:variable&gt;
259

    
260
        &lt;dc:date&gt;
261
            &lt;xsl:value-of select="$d"/&gt;
262
        &lt;/dc:date&gt;
263
      &lt;!--  &lt;oaf:dateAccepted&gt;
264
            &lt;xsl:value-of select="$d"/&gt;
265
        &lt;/oaf:dateAccepted&gt; --&gt;
266
      &lt;oaf:dateAccepted&gt;
267
                &lt;xsl:value-of select="$dAcc"/&gt;
268
      &lt;/oaf:dateAccepted&gt;
269

    
270
    &lt;/xsl:template&gt;
271
    
272
    &lt;xsl:template match="posted_content/posted_date | 
273
        posted_content/acceptance_date"&gt;
274
        &lt;xsl:variable name="d"&gt;
275
            &lt;xsl:value-of select="string-join((./year, ./month, ./day), '-')"/&gt;
276
        &lt;/xsl:variable&gt;
277
        &lt;dc:date&gt;
278
            &lt;xsl:value-of select="$d"/&gt;
279
        &lt;/dc:date&gt;
280
        &lt;!--  &lt;oaf:dateAccepted&gt;
281
            &lt;xsl:value-of select="$d"/&gt;
282
        &lt;/oaf:dateAccepted&gt; --&gt;
283
    &lt;/xsl:template&gt; 
284
    &lt;xsl:template match="dri:recordIdentifier"&gt;
285
        &lt;dc:identifier&gt;
286
            &lt;xsl:value-of select="concat('http://dx.doi.org/', .)"/&gt;
287
        &lt;/dc:identifier&gt;
288
        &lt;oaf:identifier identifierType="doi"&gt;
289
            &lt;xsl:value-of select="."/&gt;
290
        &lt;/oaf:identifier&gt;
291
    &lt;/xsl:template&gt;
292
    
293
    &lt;xsl:template match="conference_paper"&gt;
294
            &lt;xsl:variable name="varType" select="string('info:eu-repo/semantics/conferenceObject')"/&gt;
295
        &lt;dc:type&gt;
296
            &lt;xsl:value-of select="$varType"/&gt;
297
        &lt;/dc:type&gt;
298
        &lt;dc:type&gt;
299
            &lt;xsl:value-of select="string('conference paper')"/&gt;
300
        &lt;/dc:type&gt;
301
        &lt;!-- conference_paper: only source --&gt;
302
        &lt;dc:source&gt;
303
            &lt;xsl:value-of select="normalize-space(../proceedings_metadata/proceedings_title)"/&gt;
304
        &lt;/dc:source&gt;
305
&lt;xsl:variable name='varCobjCategory' select="TransformationFunction:convertString($tf, $varType, 'TextTypologies')" /&gt;
306
&lt;xsl:variable name='varSuperType' select="TransformationFunction:convertString($tf, $varCobjCategory, 'SuperTypes')" /&gt;
307
&lt;dr:CobjCategory&gt;
308
          &lt;xsl:attribute name="type" select="$varSuperType"/&gt;
309
          &lt;xsl:value-of select="$varCobjCategory" /&gt;
310
&lt;/dr:CobjCategory&gt;
311
        &lt;!-- TODO: ISBN? Other proceedings info? --&gt;
312
    &lt;/xsl:template&gt;
313
    
314
    &lt;xsl:template match="journal_article"&gt;
315
            &lt;xsl:variable name="varType" select="string('info:eu-repo/semantics/article')"/&gt;
316
        &lt;dc:type&gt;
317
            &lt;xsl:value-of select="$varType"/&gt;
318
        &lt;/dc:type&gt;
319
        &lt;dc:type&gt;
320
            &lt;xsl:value-of select="string('journal article')"/&gt;
321
        &lt;/dc:type&gt;
322
&lt;xsl:variable name='varCobjCategory' select="TransformationFunction:convertString($tf, $varType, 'TextTypologies')" /&gt;
323
&lt;xsl:variable name='varSuperType' select="TransformationFunction:convertString($tf, $varCobjCategory, 'SuperTypes')" /&gt;
324
&lt;dr:CobjCategory&gt;
325
          &lt;xsl:attribute name="type" select="$varSuperType"/&gt;
326
          &lt;xsl:value-of select="$varCobjCategory" /&gt;
327
&lt;/dr:CobjCategory&gt;
328
        &lt;dc:source&gt;
329
            &lt;xsl:value-of select="normalize-space(../journal_metadata/full_title[0])"/&gt;
330
        &lt;/dc:source&gt;
331
        &lt;oaf:journal eissn="{../journal_metadata/issn[@media_type='electronic']}"
332
            issn="{../journal_metadata/issn[@media_type='print' or not(@media_type)]}"
333
            iss="{../journal_issue/issue}" vol="{../journal_issue/journal_volume/volume}"
334
            sp="{./pages/first_page}" ep="{./pages/last_page}"&gt;
335
            &lt;xsl:value-of select="normalize-space(../journal_metadata/full_title[0])"/&gt;
336
        &lt;/oaf:journal&gt;
337
    &lt;/xsl:template&gt;
338
    
339
    &lt;xsl:template match="content_item"&gt;
340
            &lt;xsl:variable name="varType" select="./@component_type"/&gt;
341
        &lt;dc:type&gt;
342
            &lt;xsl:value-of select="string('info:eu-repo/semantics/bookPart')"/&gt;
343
        &lt;/dc:type&gt;
344
        &lt;dc:type&gt;
345
            &lt;xsl:value-of select="$varType"/&gt;
346
        &lt;/dc:type&gt;
347
&lt;xsl:variable name='varCobjCategory' select="TransformationFunction:convertString($tf, $varType, 'TextTypologies')" /&gt;
348
&lt;xsl:variable name='varSuperType' select="TransformationFunction:convertString($tf, $varCobjCategory, 'SuperTypes')" /&gt;
349
&lt;dr:CobjCategory&gt;
350
          &lt;xsl:attribute name="type" select="$varSuperType"/&gt;
351
          &lt;xsl:value-of select="$varCobjCategory" /&gt;
352
&lt;/dr:CobjCategory&gt;
353
        &lt;dc:source&gt;
354
            &lt;xsl:value-of select="concat(normalize-space(../book_series_metadata/series_metadata/*/title),' - ' , normalize-space(../book_series_metadata/titles/title))"/&gt;
355
        &lt;/dc:source&gt;
356
        &lt;dc:source&gt;
357
            &lt;xsl:value-of select="concat(string('eissn: '),normalize-space(../book_series_metadata/*/issn[@media_type='electronic']))"/&gt;
358
        &lt;/dc:source&gt;
359
        &lt;dc:source&gt;
360
            &lt;xsl:value-of select="concat(string('issn: '),normalize-space(../book_series_metadata/*/issn[@media_type='print' or not(@media_type)]))"/&gt;
361
        &lt;/dc:source&gt;
362

    
363
        &lt;xsl:for-each select="../book_series_metadata/isbn[@media_type='electronic']"&gt;
364
       &lt;dc:source&gt;
365
            &lt;xsl:value-of select="concat(string('eisbn: '),normalize-space(.))"/&gt;
366
       &lt;/dc:source&gt;
367
&lt;/xsl:for-each&gt;
368

    
369
        &lt;dc:source&gt;
370
            &lt;xsl:value-of select="concat(string('isbn: '),normalize-space(../book_series_metadata/isbn[@media_type='print' or not(@media_type)]))"/&gt;
371
        &lt;/dc:source&gt;
372

    
373
    &lt;/xsl:template&gt;
374

    
375
 &lt;!--    
376
    &lt;xsl:template match="book_series_metadata"&gt;
377
        &lt;xsl:if test="not(../content_item)"&gt;
378
            &lt;dc:type&gt;
379
                &lt;xsl:value-of select="string('info:eu-repo/semantics/book')"/&gt;
380
            &lt;/dc:type&gt;
381
            &lt;dc:source&gt;
382
                &lt;xsl:value-of select="concat(normalize-space(../book_series_metadata/series_metadata/*/title),' - ' , normalize-space(../book_series_metadata/titles/title))"/&gt;
383
            &lt;/dc:source&gt;
384
            &lt;dr:CobjCategory&gt;0002&lt;/dr:CobjCategory&gt;
385
        &lt;/xsl:if&gt;
386
    &lt;/xsl:template&gt;
387
--&gt;
388
    
389
    &lt;xsl:template match="posted_content"&gt;
390
 &lt;!--
391
        &lt;xsl:variable name="type"&gt;
392
            &lt;xsl:value-of select="./@type"/&gt;
393
        &lt;/xsl:variable&gt;
394
        &lt;xsl:choose&gt;
395
            &lt;xsl:when test="normalize-space($type) = 'preprint'"&gt;
396
                &lt;dc:type&gt;
397
                    &lt;xsl:value-of select="string('info:eu-repo/semantics/preprint')"/&gt;
398
                &lt;/dc:type&gt;
399
                &lt;dr:CobjCategory&gt;0016&lt;/dr:CobjCategory&gt;
400
            &lt;/xsl:when&gt;
401
            &lt;xsl:when test="normalize-space($type) = 'working_paper'"&gt;
402
                &lt;dc:type&gt;
403
                    &lt;xsl:value-of select="string('info:eu-repo/semantics/workingPaper')"/&gt;
404
                &lt;/dc:type&gt;
405
            &lt;/xsl:when&gt;
406
            &lt;xsl:when test="normalize-space($type) = 'report'"&gt;
407
                &lt;dc:type&gt;
408
                    &lt;xsl:value-of select="string('info:eu-repo/semantics/report')"/&gt;
409
                &lt;/dc:type&gt;
410
            &lt;/xsl:when&gt;
411
            &lt;xsl:otherwise&gt;
412
                &lt;dc:type&gt;
413
                    &lt;xsl:value-of select="string('info:eu-repo/semantics/other')"/&gt;
414
                &lt;/dc:type&gt;
415
                
416
            &lt;/xsl:otherwise&gt;
417
               
418
        &lt;/xsl:choose&gt;
419
--&gt;
420
            &lt;xsl:variable name="varType" select="./@type[.='preprint']/'info:eu-repo/semantics/preprint', 
421
                                                                                     ./@type[.='working_paper']/'info:eu-repo/semantics/workingPaper',
422
                                                                                     ./@type[.='report']/'info:eu-repo/semantics/report',
423
                                                                                     ./@type[not(.=('preprint', 'working_paper', 'report'))]/'info:eu-repo/semantics/other'"/&gt;
424
                &lt;dc:type&gt;
425
                    &lt;xsl:value-of select="$varType"/&gt;
426
                &lt;/dc:type&gt;
427
&lt;xsl:variable name="varCobjCategory" select="TransformationFunction:convertString($tf, $varType, 'TextTypologies')" /&gt;
428
&lt;xsl:variable name="varSuperType" select="TransformationFunction:convertString($tf, $varCobjCategory, 'SuperTypes')" /&gt;
429
&lt;dr:CobjCategory&gt;
430
          &lt;xsl:attribute name="type" select="$varSuperType"/&gt;
431
          &lt;xsl:value-of select="$varCobjCategory" /&gt;
432
&lt;/dr:CobjCategory&gt;
433
            &lt;dc:source&gt;
434
                &lt;xsl:value-of select="concat(normalize-space(.//institution_name),' - ' , normalize-space(./item_number))"/&gt;
435
            &lt;/dc:source&gt;
436
 &lt;!--
437
        &lt;xsl:if test="not(normalize-space($type) = 'preprint')"&gt;
438
                 &lt;dr:CobjCategory&gt;0020&lt;/dr:CobjCategory&gt;
439
            &lt;/xsl:if&gt;
440
--&gt;
441
       
442
    &lt;/xsl:template&gt;
443

    
444
 &lt;!-- sa_components seem to be supplements, but unfortunately don't state, what pertain to (no second PID)  --&gt;
445
    &lt;xsl:template match="sa_component"&gt;
446
            &lt;xsl:variable name="varType" select="string('text')"/&gt;
447
        &lt;dc:type&gt;
448
            &lt;xsl:value-of select="$varType"/&gt;
449
        &lt;/dc:type&gt;
450
&lt;xsl:variable name="varCobjCategory" select="TransformationFunction:convertString($tf, $varType, 'TextTypologies')" /&gt;
451
&lt;xsl:variable name='varSuperType' select="TransformationFunction:convertString($tf, $varCobjCategory, 'SuperTypes')" /&gt;
452
&lt;dr:CobjCategory&gt;
453
          &lt;xsl:attribute name="type" select="$varSuperType"/&gt;
454
          &lt;xsl:value-of select="$varCobjCategory" /&gt;
455
&lt;/dr:CobjCategory&gt;
456
    &lt;/xsl:template&gt;
457

    
458
    &lt;xsl:template match="report-paper"&gt;
459
            &lt;xsl:variable name="varType" select="string('info:eu-repo/semantics/report')"/&gt;
460
        &lt;dc:type&gt;
461
            &lt;xsl:value-of select="$varType"/&gt;
462
        &lt;/dc:type&gt;
463
&lt;xsl:variable name="varCobjCategory" select="TransformationFunction:convertString($tf, $varType, 'TextTypologies')" /&gt;
464
&lt;xsl:variable name='varSuperType' select="TransformationFunction:convertString($tf, $varCobjCategory, 'SuperTypes')" /&gt;
465
&lt;dr:CobjCategory&gt;
466
          &lt;xsl:attribute name="type" select="$varSuperType"/&gt;
467
          &lt;xsl:value-of select="$varCobjCategory" /&gt;
468
&lt;/dr:CobjCategory&gt;
469
    &lt;/xsl:template&gt;
470

    
471
    &lt;xsl:template match="dissertation"&gt;
472
            &lt;xsl:variable name="varType" select="string('info:eu-repo/semantics/doctoralThesis')"/&gt;
473
        &lt;dc:type&gt;
474
            &lt;xsl:value-of select="$varType"/&gt;
475
        &lt;/dc:type&gt;
476
&lt;xsl:variable name="varCobjCategory" select="TransformationFunction:convertString($tf, $varType, 'TextTypologies')" /&gt;
477
&lt;xsl:variable name='varSuperType' select="TransformationFunction:convertString($tf, $varCobjCategory, 'SuperTypes')" /&gt;
478
&lt;dr:CobjCategory&gt;
479
          &lt;xsl:attribute name="type" select="$varSuperType"/&gt;
480
          &lt;xsl:value-of select="$varCobjCategory" /&gt;
481
&lt;/dr:CobjCategory&gt;
482
    &lt;/xsl:template&gt;
483

    
484
 &lt;!-- databases seem to be bibliographies  --&gt;
485
    &lt;xsl:template match="database"&gt;
486
            &lt;xsl:variable name="varType" select="string('bibliography')"/&gt;
487
        &lt;dc:type&gt;
488
            &lt;xsl:value-of select="$varType"/&gt;
489
        &lt;/dc:type&gt;
490
&lt;xsl:variable name="varCobjCategory" select="TransformationFunction:convertString($tf, $varType, 'TextTypologies')" /&gt;
491
&lt;xsl:variable name='varSuperType' select="TransformationFunction:convertString($tf, $varCobjCategory, 'SuperTypes')" /&gt;
492
&lt;dr:CobjCategory&gt;
493
          &lt;xsl:attribute name="type" select="$varSuperType"/&gt;
494
          &lt;xsl:value-of select="$varCobjCategory" /&gt;
495
&lt;/dr:CobjCategory&gt;
496
        &lt;dc:source&gt;
497
            &lt;xsl:value-of select="normalize-space(./database_metadata/titles/title)"/&gt;
498
        &lt;/dc:source&gt;
499
    &lt;/xsl:template&gt;
500

    
501
    &lt;!-- Extend with new templates for additional types of publication     --&gt;
502
  
503

    
504
&lt;!-- oaf:accessrights --&gt;
505
&lt;xsl:template name="accessrights"&gt;
506

    
507
       &lt;xsl:choose&gt;
508
              &lt;xsl:when test="//program[./@name = 'AccessIndicators']/(license_ref[./@applies_to = 'vor' or not(./@applies_to)][contains(., '://creativecommons.org/licenses/by')], free_to_read)"&gt;
509
                     &lt;xsl:variable name="varEmbargoEnd"&gt;
510
                            &lt;xsl:value-of select="max(//program[./@name = 'AccessIndicators']/(license_ref[./@applies_to = 'vor'][contains(., '://creativecommons.org/licenses/by')], free_to_read)/@start_date/string(.))"/&gt;
511
                     &lt;/xsl:variable&gt;
512
                     &lt;xsl:if test="xs:date( max(( string($varEmbargoEnd), '0001-01-01' ) ) ) gt current-date()"&gt;
513
                            &lt;oaf:accessrights&gt;
514
                                   &lt;xsl:value-of select="'EMBARGO'" /&gt;
515
                            &lt;/oaf:accessrights&gt;
516
                     &lt;/xsl:if&gt;
517
                     &lt;xsl:if test="$varEmbargoEnd and not((xs:date( max( (string($varEmbargoEnd), '0001-01-01') ) ) gt current-date()))"&gt;
518
                            &lt;oaf:accessrights&gt;
519
                                   &lt;xsl:value-of select="'OPEN'" /&gt;
520
                            &lt;/oaf:accessrights&gt;
521
                     &lt;/xsl:if&gt;
522
              &lt;/xsl:when&gt;
523
              &lt;xsl:otherwise&gt;
524
                     &lt;oaf:accessrights&gt;
525
                            &lt;xsl:value-of select="'UNKNOWN'"/&gt;
526
                     &lt;/oaf:accessrights&gt;
527
              &lt;/xsl:otherwise&gt;
528
       &lt;/xsl:choose&gt;
529

    
530
       &lt;xsl:for-each select="//program[./@name = 'AccessIndicators']/license_ref[not(./@applies_to = 'am') or not(./@applies_to)]"&gt;
531
              &lt;oaf:license&gt;
532
                     &lt;xsl:value-of select="." /&gt;
533
              &lt;/oaf:license&gt;
534
              &lt;xsl:if test="./@start_date"&gt;
535
                     &lt;dc:date&gt;
536
                            &lt;xsl:value-of select="concat('info:eu-repo/date/embargoEnd/', ./@start_date)"/&gt;
537
                     &lt;/dc:date&gt;
538
              &lt;/xsl:if&gt;
539
       &lt;/xsl:for-each&gt;
540

    
541
&lt;/xsl:template&gt;
542

    
543
    
544
    &lt;xsl:template match="* | @*"/&gt;
545
    
546
&lt;/xsl:stylesheet&gt;</CODE>
547
            </SCRIPT>
548
        </CONFIGURATION>
549
        <STATUS/>
550
        <SECURITY_PARAMETERS>SECURITY_PARAMETERS</SECURITY_PARAMETERS>
551
    </BODY>
552
</RESOURCE_PROFILE>
(4-4/83)