1
|
|
2
|
<RESOURCE_PROFILE>
|
3
|
<HEADER>
|
4
|
<RESOURCE_IDENTIFIER value="45e26d5f-b98c-42fb-a05b-ba3ad1910d15_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
|
5
|
<RESOURCE_TYPE value="TransformationRuleDSResourceType"/>
|
6
|
<RESOURCE_KIND value="TransformationRuleDSResources"/>
|
7
|
<RESOURCE_URI value=""/>
|
8
|
<DATE_OF_CREATION value="2016-11-21T11:15:30+00:00"/>
|
9
|
</HEADER>
|
10
|
<BODY>
|
11
|
<CONFIGURATION>
|
12
|
<IMPORTED/>
|
13
|
<SCRIPT>
|
14
|
<TITLE>core_frontiers2oaf</TITLE>
|
15
|
<CODE>
|
16
|
<![CDATA[
|
17
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
18
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
19
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
20
|
xmlns:dr="http://www.driver-repository.eu/namespace/dr"
|
21
|
xmlns:dri="http://www.driver-repository.eu/namespace/dri"
|
22
|
xmlns:oaf="http://namespace.openaire.eu/oaf"
|
23
|
xmlns:date="http://exslt.org/dates-and-times"
|
24
|
extension-element-prefixes="date" exclude-result-prefixes="xs" version="2.0"
|
25
|
xmlns:prism="http://prismstandard.org/namespaces/basic/2.0/"
|
26
|
xmlns:xocs="http://www.elsevier.com/xml/xocs/dtd"
|
27
|
xmlns:dcterms="http://purl.org/dc/terms/">
|
28
|
|
29
|
<xsl:output omit-xml-declaration="yes" indent="yes"/>
|
30
|
<xsl:param name="varOfficialName"/>
|
31
|
<xsl:param name="varDataSourceId"/>
|
32
|
|
33
|
<xsl:variable name="issn">
|
34
|
<xsl:value-of select=".//prism:issn"/>
|
35
|
</xsl:variable>
|
36
|
|
37
|
<xsl:variable name="volume">
|
38
|
<xsl:value-of select=".//prism:volume"/>
|
39
|
</xsl:variable>
|
40
|
|
41
|
<xsl:variable name="iss">
|
42
|
<xsl:value-of select=".//prism:issueIdentifier"/>
|
43
|
</xsl:variable>
|
44
|
|
45
|
<xsl:variable name="sp">
|
46
|
<xsl:value-of select=".//prism:startingPage"/>
|
47
|
</xsl:variable>
|
48
|
|
49
|
<xsl:variable name="ep">
|
50
|
<xsl:value-of select=".//prism:endingPage"/>
|
51
|
</xsl:variable>
|
52
|
|
53
|
<xsl:variable name="pubName">
|
54
|
<xsl:value-of select=".//prism:publicationName"/>
|
55
|
</xsl:variable>
|
56
|
|
57
|
<xsl:template match="/">
|
58
|
<xsl:choose>
|
59
|
<xsl:when test=".//error or string-length(.//dc:title) = 0">
|
60
|
<xsl:call-template name="terminate"/>
|
61
|
</xsl:when>
|
62
|
<xsl:otherwise>
|
63
|
|
64
|
<record>
|
65
|
<header>
|
66
|
<xsl:copy-of select="//*[local-name() = 'header']/*" copy-namespaces="no"/>
|
67
|
<dr:dateOfTransformation>
|
68
|
<xsl:value-of select="date:date-time()"/>
|
69
|
</dr:dateOfTransformation>
|
70
|
</header>
|
71
|
<metadata>
|
72
|
<dc:language>eng</dc:language>
|
73
|
<oaf:accessrights>OPEN</oaf:accessrights>
|
74
|
<oaf:hostedBy id="openaire____::elsevier"
|
75
|
name="Elsevier"/>
|
76
|
<oaf:collectedFrom>
|
77
|
<xsl:attribute name="name">
|
78
|
<xsl:value-of select="$varOfficialName"/>
|
79
|
</xsl:attribute>
|
80
|
<xsl:attribute name="id">
|
81
|
<xsl:value-of select="$varDataSourceId"/>
|
82
|
</xsl:attribute>
|
83
|
</oaf:collectedFrom>
|
84
|
<xsl:apply-templates select=".//*"/>
|
85
|
|
86
|
</metadata>
|
87
|
<xsl:copy-of select="//*[local-name() = 'about']/*" copy-namespaces="no"/>
|
88
|
</record>
|
89
|
|
90
|
</xsl:otherwise>
|
91
|
</xsl:choose>
|
92
|
|
93
|
</xsl:template>
|
94
|
|
95
|
<xsl:template name="terminate">
|
96
|
<xsl:message terminate="yes">
|
97
|
record is not compliant, transformation is interrupted.
|
98
|
</xsl:message>
|
99
|
</xsl:template>
|
100
|
|
101
|
<xsl:template match="dcterms:subject">
|
102
|
<dc:subject>
|
103
|
<xsl:value-of select="."/>
|
104
|
</dc:subject>
|
105
|
</xsl:template>
|
106
|
<xsl:template match="xocs:oa-user-license">
|
107
|
<dc:rights>
|
108
|
<xsl:value-of select="."/>
|
109
|
</dc:rights>
|
110
|
</xsl:template>
|
111
|
|
112
|
<xsl:template match="prism:publisher">
|
113
|
<dc:publisher>
|
114
|
<xsl:value-of select="."/>
|
115
|
</dc:publisher>
|
116
|
</xsl:template>
|
117
|
|
118
|
<xsl:template match="dc:title">
|
119
|
<dc:title>
|
120
|
<xsl:value-of select="normalize-space(.)"/>
|
121
|
</dc:title>
|
122
|
</xsl:template>
|
123
|
|
124
|
<xsl:template match="dc:description">
|
125
|
<dc:description>
|
126
|
<xsl:value-of select="."/>
|
127
|
</dc:description>
|
128
|
</xsl:template>
|
129
|
|
130
|
<xsl:template match="dc:creator">
|
131
|
<dc:creator>
|
132
|
<xsl:value-of select="."/>
|
133
|
</dc:creator>
|
134
|
</xsl:template>
|
135
|
|
136
|
<xsl:template match="prism:coverDate">
|
137
|
<dc:date>
|
138
|
<xsl:value-of select="."/>
|
139
|
</dc:date>
|
140
|
</xsl:template>
|
141
|
|
142
|
<xsl:template match="prism:doi">
|
143
|
<dc:identifier>
|
144
|
<xsl:value-of select="concat('http://dx.doi.org/', .)"/>
|
145
|
</dc:identifier>
|
146
|
<oaf:identifier identifierType="doi">
|
147
|
<xsl:value-of select="."/>
|
148
|
</oaf:identifier>
|
149
|
</xsl:template>
|
150
|
|
151
|
<xsl:template match="prism:aggregationType">
|
152
|
<xsl:choose>
|
153
|
<xsl:when test=". = 'Journal'">
|
154
|
<dc:type>
|
155
|
<xsl:value-of select="string('info:eu-repo/semantics/article')"/>
|
156
|
</dc:type>
|
157
|
<dc:type>
|
158
|
<xsl:value-of select="string('journal article')"/>
|
159
|
</dc:type>
|
160
|
<dr:CobjCategory>0001</dr:CobjCategory>
|
161
|
|
162
|
<oaf:journal issn="{$issn}"
|
163
|
volq="{$volume}"
|
164
|
iss="{$iss}"
|
165
|
sp="{$sp}"
|
166
|
ep="{$ep}"
|
167
|
pissn="{$issn}">
|
168
|
<xsl:value-of select="$pubName"/>
|
169
|
</oaf:journal>
|
170
|
|
171
|
</xsl:when>
|
172
|
</xsl:choose>
|
173
|
</xsl:template>
|
174
|
|
175
|
|
176
|
|
177
|
|
178
|
|
179
|
<xsl:template match="* | @*"/>
|
180
|
|
181
|
</xsl:stylesheet>
|
182
|
]]>
|
183
|
</CODE>
|
184
|
</SCRIPT>
|
185
|
</CONFIGURATION>
|
186
|
<STATUS/>
|
187
|
<SECURITY_PARAMETERS>SECURITY_PARAMETERS</SECURITY_PARAMETERS>
|
188
|
</BODY>
|
189
|
</RESOURCE_PROFILE>
|