1 |
55935
|
alessia.ba
|
<RESOURCE_PROFILE>
|
2 |
|
|
<HEADER>
|
3 |
55939
|
alessia.ba
|
<RESOURCE_IDENTIFIER value="fdbbfbd4-13b3-4192-88e5-62a36f45a5e8_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
|
4 |
55935
|
alessia.ba
|
<RESOURCE_TYPE value="TransformationRuleDSResourceType"/>
|
5 |
|
|
<RESOURCE_KIND value="TransformationRuleDSResources"/>
|
6 |
|
|
<RESOURCE_URI value=""/>
|
7 |
55939
|
alessia.ba
|
<DATE_OF_CREATION value="2019-05-31T07:57:37+00:00"/>
|
8 |
55935
|
alessia.ba
|
</HEADER>
|
9 |
|
|
<BODY>
|
10 |
|
|
<CONFIGURATION>
|
11 |
|
|
<IMPORTED/>
|
12 |
|
|
<SCRIPT>
|
13 |
55939
|
alessia.ba
|
<TITLE>xslt_cleaning_EGI</TITLE>
|
14 |
55935
|
alessia.ba
|
<CODE>
|
15 |
55939
|
alessia.ba
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
|
16 |
55935
|
alessia.ba
|
xmlns:oaf="http://namespace.openaire.eu/oaf"
|
17 |
|
|
xmlns:dr="http://www.driver-repository.eu/namespace/dr"
|
18 |
|
|
xmlns:TransformationFunction="eu.dnetlib.data.collective.transformation.core.xsl.ext.TransformationFunctionProxy"
|
19 |
|
|
extension-element-prefixes="TransformationFunction"
|
20 |
|
|
exclude-result-prefixes="TransformationFunction">
|
21 |
|
|
|
22 |
|
|
<xsl:param name="varOfficialName"/>
|
23 |
|
|
<xsl:param name="varDsType"/>
|
24 |
|
|
<xsl:param name="varDataSourceId"/>
|
25 |
|
|
|
26 |
|
|
<xsl:param name="varFP7" select="'corda_______::'"/>
|
27 |
|
|
<xsl:param name="varH2020" select="'corda__h2020::'"/>
|
28 |
|
|
<xsl:param name="varAKA" select="'aka_________::'"/>
|
29 |
|
|
<xsl:param name="varARC" select="'arc_________::'"/>
|
30 |
|
|
<xsl:param name="varCONICYT" select="'conicytf____::'"/>
|
31 |
|
|
<xsl:param name="varDFG" select="'dfgf________::'"/>
|
32 |
|
|
<xsl:param name="varFCT" select="'fct_________::'"/>
|
33 |
|
|
<xsl:param name="varFWF" select="'fwf_________::'"/>
|
34 |
|
|
<xsl:param name="varHRZZ" select="'irb_hr______::'"/>
|
35 |
|
|
<xsl:param name="varMESTD" select="'mestd_______::'"/>
|
36 |
|
|
<xsl:param name="varMZOS" select="'irb_hr______::'"/>
|
37 |
|
|
<xsl:param name="varNHMRC" select="'nhmrc_______::'"/>
|
38 |
|
|
<xsl:param name="varNIH" select="'nih_________::'"/>
|
39 |
|
|
<xsl:param name="varNSF" select="'nsf_________::'"/>
|
40 |
|
|
<xsl:param name="varNWO" select="'nwo_________::'"/>
|
41 |
|
|
<xsl:param name="varRCUK" select="'rcuk________::'"/>
|
42 |
|
|
<xsl:param name="varSFI" select="'sfi_________::'"/>
|
43 |
|
|
<xsl:param name="varSGOV" select="'sgov________::'"/>
|
44 |
|
|
<xsl:param name="varSNSF" select="'snsf________::'"/>
|
45 |
|
|
<xsl:param name="varTARA" select="'taraexp_____::'"/>
|
46 |
|
|
<xsl:param name="varTUBITAK" select="'tubitakf____::'"/>
|
47 |
|
|
<xsl:param name="varWT" select="'wt__________::'"/>
|
48 |
|
|
|
49 |
|
|
<!--
|
50 |
|
|
// HRZZ not found
|
51 |
|
|
// SGOV to be added, awaiting DOI from Pilar, found project ids not in CSV list?
|
52 |
|
|
// TARA to be added, awaiting DOI from André
|
53 |
|
|
-->
|
54 |
|
|
|
55 |
|
|
<xsl:param name="index" select="0"/>
|
56 |
|
|
<xsl:variable name="tf" select="TransformationFunction:getInstance()"/>
|
57 |
|
|
|
58 |
|
|
|
59 |
|
|
<xsl:template match="/">
|
60 |
|
|
<xsl:variable name="datasourcePrefix"
|
61 |
|
|
select="normalize-space(//oaf:datasourceprefix)"/>
|
62 |
|
|
<xsl:call-template name="validRecord"/>
|
63 |
|
|
</xsl:template>
|
64 |
|
|
|
65 |
|
|
<xsl:template name="terminate">
|
66 |
|
|
<xsl:message terminate="yes">
|
67 |
|
|
record is not compliant, transformation is interrupted.
|
68 |
|
|
</xsl:message>
|
69 |
|
|
</xsl:template>
|
70 |
|
|
|
71 |
|
|
<xsl:template name="validRecord">
|
72 |
|
|
<record>
|
73 |
|
|
<xsl:copy-of select="//*[local-name() = 'header']"/>
|
74 |
|
|
|
75 |
|
|
<metadata>
|
76 |
|
|
|
77 |
|
|
<xsl:apply-templates select="//*[local-name() = 'metadata']//*[local-name() = 'resource']"/>
|
78 |
|
|
|
79 |
|
|
<xsl:for-each select="//*[local-name() = 'resource']/*[local-name()='identifier'][@identifierType='Handle'][not(. = '123456789')]">
|
80 |
|
|
<oaf:identifier>
|
81 |
|
|
<xsl:attribute name="identifierType">
|
82 |
|
|
<xsl:value-of select="'handle'"/>
|
83 |
|
|
</xsl:attribute>
|
84 |
|
|
<xsl:value-of select="."/>
|
85 |
|
|
</oaf:identifier>
|
86 |
|
|
</xsl:for-each>
|
87 |
|
|
|
88 |
|
|
<xsl:for-each select="//*[local-name() = 'resource']/*[local-name()='identifier'][@identifierType='DOI']">
|
89 |
|
|
<oaf:identifier>
|
90 |
|
|
<xsl:attribute name="identifierType">
|
91 |
|
|
<xsl:value-of select="'doi'"/>
|
92 |
|
|
</xsl:attribute>
|
93 |
|
|
<xsl:if test="contains(., '://dx.doi.org/')">
|
94 |
|
|
<xsl:value-of select="substring-after(., '://dx.doi.org/')"/>
|
95 |
|
|
</xsl:if>
|
96 |
|
|
<xsl:if test="not(contains(., '://dx.doi.org/'))">
|
97 |
|
|
<xsl:value-of select="."/>
|
98 |
|
|
</xsl:if>
|
99 |
|
|
</oaf:identifier>
|
100 |
|
|
</xsl:for-each>
|
101 |
|
|
|
102 |
|
|
<xsl:choose>
|
103 |
|
|
<xsl:when test="//*[local-name()='resourceType'][lower-case(.)='article'] or lower-case(//*[local-name()='resourceType']/@resourceTypeGeneral)=('dataset', 'software', 'collection', 'film', 'sound', 'physicalobject', 'audiovisual', 'model', 'workflow', 'service', 'image') or (//*[local-name()='resourceType'][lower-case(./@resourceTypeGeneral)='other' and lower-case(.)=('study', 'egi virtual appliance')])">
|
104 |
55939
|
alessia.ba
|
<xsl:variable name='varCobjCategory' select="TransformationFunction:convertString($tf, distinct-values(//*[local-name()='resourceType']/@resourceTypeGeneral), 'TextTypologies')"/>
|
105 |
55935
|
alessia.ba
|
<dr:CobjCategory>
|
106 |
|
|
<xsl:attribute name="type" select="TransformationFunction:convertString($tf, $varCobjCategory, 'SuperTypes')"/>
|
107 |
|
|
<xsl:value-of select="$varCobjCategory"/>
|
108 |
|
|
</dr:CobjCategory>
|
109 |
55939
|
alessia.ba
|
<xsl:choose>
|
110 |
|
|
<xsl:when
|
111 |
|
|
test="//*[local-name() = 'rights' and ./@rightsURI = 'http://purl.org/coar/access_right/c_abf2']">
|
112 |
|
|
<xsl:choose>
|
113 |
|
|
<xsl:when test="$varCobjCategory = '0029'">
|
114 |
|
|
<oaf:accessrights>OPEN SOURCE</oaf:accessrights>
|
115 |
|
|
</xsl:when>
|
116 |
|
|
<xsl:otherwise>
|
117 |
|
|
<oaf:accessrights>OPEN</oaf:accessrights>
|
118 |
|
|
</xsl:otherwise>
|
119 |
|
|
</xsl:choose>
|
120 |
|
|
</xsl:when>
|
121 |
|
|
<xsl:when
|
122 |
|
|
test="//*[local-name() = 'rights' and ./@rightsURI = 'http://purl.org/coar/access_right/c_16ec']">
|
123 |
|
|
<oaf:accessrights>RESTRICTED</oaf:accessrights>
|
124 |
|
|
</xsl:when>
|
125 |
|
|
<xsl:when
|
126 |
|
|
test="//*[local-name() = 'rights' and ./@rightsURI = 'http://purl.org/coar/access_right/c_f1cf']">
|
127 |
|
|
<oaf:accessrights>EMBARGOED</oaf:accessrights>
|
128 |
|
|
</xsl:when>
|
129 |
|
|
<xsl:when
|
130 |
|
|
test="//*[local-name() = 'rights' and ./@rightsURI = 'http://purl.org/coar/access_right/c_14cb']">
|
131 |
|
|
<oaf:accessrights>CLOSED</oaf:accessrights>
|
132 |
|
|
</xsl:when>
|
133 |
|
|
<xsl:otherwise>
|
134 |
|
|
<oaf:accessrights>UNKNWON</oaf:accessrights>
|
135 |
|
|
</xsl:otherwise>
|
136 |
|
|
</xsl:choose>
|
137 |
55935
|
alessia.ba
|
</xsl:when>
|
138 |
|
|
<xsl:otherwise>
|
139 |
|
|
<xsl:call-template name="terminate"/>
|
140 |
|
|
</xsl:otherwise>
|
141 |
|
|
</xsl:choose>
|
142 |
|
|
|
143 |
|
|
<oaf:dateAccepted>
|
144 |
55940
|
alessia.ba
|
<xsl:value-of select="TransformationFunction:convertString($tf, normalize-space(//*[local-name()='date'][@dateType='Issued']), 'DateISO8601')"/>
|
145 |
55935
|
alessia.ba
|
</oaf:dateAccepted>
|
146 |
|
|
|
147 |
55939
|
alessia.ba
|
<!-- Access rights based on COAR vocabulary -->
|
148 |
|
|
<!--
|
149 |
|
|
http://purl.org/coar/access_right/c_14cb for metadata only access
|
150 |
|
|
http://purl.org/coar/access_right/c_f1cf for embargoed access
|
151 |
|
|
http://purl.org/coar/access_right/c_16ec for restricted access
|
152 |
|
|
http://purl.org/coar/access_right/c_abf2 for open access
|
153 |
|
|
-->
|
154 |
55935
|
alessia.ba
|
|
155 |
|
|
|
156 |
|
|
<xsl:for-each select="//*[local-name()='rights']/@rightsURI[starts-with(normalize-space(.), 'http') and matches(., '.*(/licenses|/publicdomain|unlicense.org/|/legal-and-data-protection-notices|/download/license|/open-government-licence).*')]">
|
157 |
|
|
<oaf:license>
|
158 |
|
|
<xsl:value-of select="."/>
|
159 |
|
|
</oaf:license>
|
160 |
|
|
</xsl:for-each>
|
161 |
|
|
|
162 |
|
|
<oaf:language>
|
163 |
|
|
<xsl:value-of select="TransformationFunction:convert($tf, //*[local-name()='language'], 'Languages')"/>
|
164 |
|
|
</oaf:language>
|
165 |
|
|
|
166 |
|
|
<oaf:hostedBy>
|
167 |
|
|
<xsl:attribute name="name">
|
168 |
|
|
<xsl:value-of select="$varOfficialName"/>
|
169 |
|
|
</xsl:attribute>
|
170 |
|
|
<xsl:attribute name="id">
|
171 |
|
|
<xsl:value-of select="$varDataSourceId"/>
|
172 |
|
|
</xsl:attribute>
|
173 |
|
|
</oaf:hostedBy>
|
174 |
|
|
<oaf:collectedFrom>
|
175 |
|
|
<xsl:attribute name="name">
|
176 |
|
|
<xsl:value-of select="$varOfficialName"/>
|
177 |
|
|
</xsl:attribute>
|
178 |
|
|
<xsl:attribute name="id">
|
179 |
|
|
<xsl:value-of select="$varDataSourceId"/>
|
180 |
|
|
</xsl:attribute>
|
181 |
|
|
</oaf:collectedFrom>
|
182 |
|
|
</metadata>
|
183 |
|
|
<xsl:copy-of select="//*[local-name() = 'about']"/>
|
184 |
|
|
</record>
|
185 |
|
|
</xsl:template>
|
186 |
|
|
|
187 |
|
|
<xsl:template match="node()|@*">
|
188 |
|
|
<xsl:copy>
|
189 |
|
|
<xsl:apply-templates select="node()|@*"/>
|
190 |
|
|
</xsl:copy>
|
191 |
|
|
</xsl:template>
|
192 |
|
|
|
193 |
|
|
<xsl:template match="//*[local-name() = 'metadata']//*[local-name() = 'resource']">
|
194 |
|
|
<xsl:copy>
|
195 |
|
|
<xsl:apply-templates select="node()|@*"/>
|
196 |
|
|
</xsl:copy>
|
197 |
|
|
</xsl:template>
|
198 |
|
|
|
199 |
|
|
|
200 |
|
|
<xsl:template match="//*[local-name() = 'resource']/*[local-name()='identifier']">
|
201 |
|
|
<!-- cut off DOI resolver prefix to just get the number part -->
|
202 |
|
|
<xsl:if test=".[@identifierType='DOI'][contains(., '://dx.doi.org/')]">
|
203 |
55939
|
alessia.ba
|
<xsl:element name="identifier">
|
204 |
55935
|
alessia.ba
|
<xsl:attribute name="identifierType">
|
205 |
|
|
<xsl:value-of select="'DOI'"/>
|
206 |
|
|
</xsl:attribute>
|
207 |
|
|
<xsl:value-of
|
208 |
|
|
select="substring-after(., '://dx.doi.org/')"/>
|
209 |
|
|
</xsl:element>
|
210 |
|
|
</xsl:if>
|
211 |
|
|
<xsl:copy-of select=".[not(contains(., '://dx.doi.org/'))]"/>
|
212 |
55939
|
alessia.ba
|
</xsl:template>
|
213 |
55935
|
alessia.ba
|
|
214 |
55939
|
alessia.ba
|
<xsl:template match="//*[local-name()='fundingReference']">
|
215 |
|
|
<!-- Funding -->
|
216 |
|
|
<!--
|
217 |
|
|
<fundingReference>
|
218 |
|
|
<funderName>name of the funder</funderName>
|
219 |
|
|
<funderIdentifier funderIdentifierType="ISNI">ISNI ID </funderIdentifier>
|
220 |
|
|
<awardNumber>award_number</awardNumber>
|
221 |
|
|
<awardTitle>On the applications of the fastFourier transform</awardTitle>
|
222 |
|
|
</fundingReference>
|
223 |
|
|
-->
|
224 |
55935
|
alessia.ba
|
<xsl:for-each select="//*[local-name()='fundingReference']">
|
225 |
|
|
<!-- FP7 -->
|
226 |
|
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100004963', '10.13039/100011199') and matches(./*[local-name()='awardNumber'], '.*(^|[^\d])\d\d\d\d\d\d($|[^\d]).*')">
|
227 |
|
|
<oaf:projectid>
|
228 |
|
|
<xsl:value-of select="concat($varFP7, replace(./*[local-name()='awardNumber'], '.*(^|[^\d])(\d\d\d\d\d\d)($|[^\d]).*', '$2'))"/>
|
229 |
|
|
</oaf:projectid>
|
230 |
|
|
</xsl:if>
|
231 |
|
|
<!-- H2020 -->
|
232 |
|
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/100010661') and matches(./*[local-name()='awardNumber'], '.*(^|[^\d])\d\d\d\d\d\d($|[^\d]).*')">
|
233 |
|
|
<oaf:projectid>
|
234 |
|
|
<xsl:value-of select="concat($varH2020, replace(./*[local-name()='awardNumber'], '.*(^|[^\d])(\d\d\d\d\d\d)($|[^\d]).*', '$2'))"/>
|
235 |
|
|
</oaf:projectid>
|
236 |
|
|
</xsl:if>
|
237 |
|
|
<!-- AKA -->
|
238 |
|
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100002341') or contains(./*[local-name()='funderName'], 'Suomen Akatemia') or contains(./*[local-name()='funderName'], 'Academy of Finland')">
|
239 |
|
|
<oaf:projectid>
|
240 |
|
|
<xsl:value-of select="concat($varAKA, ./*[local-name()='awardNumber'])"/>
|
241 |
|
|
</oaf:projectid>
|
242 |
|
|
</xsl:if>
|
243 |
|
|
<!-- ARC -->
|
244 |
|
|
<xsl:if test="(substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100000923') or contains(./*[local-name()='funderName'], 'Australian Research Council')) and matches(./*[local-name()='awardNumber'], '^\d{6}$')">
|
245 |
|
|
<oaf:projectid>
|
246 |
|
|
<xsl:value-of select="concat($varAKA, replace(./*[local-name()='awardNumber'], '.*(^\d{6}$).*', '$2'))"/>
|
247 |
|
|
</oaf:projectid>
|
248 |
|
|
</xsl:if>
|
249 |
|
|
<!-- CONICYT -->
|
250 |
|
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100002848') or contains(./*[local-name()='funderName'], 'Comisión Nacional de Investigación Científica y Tecnológica') or contains(./*[local-name()='funderName'], 'CONICYT')">
|
251 |
|
|
<oaf:projectid>
|
252 |
|
|
<xsl:value-of select="concat($varCONICYT, ./*[local-name()='awardNumber'])"/>
|
253 |
|
|
</oaf:projectid>
|
254 |
|
|
</xsl:if>
|
255 |
|
|
<!-- DFG -->
|
256 |
|
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100001659') or contains(./*[local-name()='funderName'], 'Deutsche Forschungsgemeinschaft') or contains(./*[local-name()='funderName'], 'DFG')">
|
257 |
|
|
<oaf:projectid>
|
258 |
|
|
<xsl:value-of select="concat($varDFG, ./*[local-name()='awardNumber'])"/>
|
259 |
|
|
</oaf:projectid>
|
260 |
|
|
</xsl:if>
|
261 |
|
|
<!-- FCT -->
|
262 |
|
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100001871') or contains(./*[local-name()='funderName'], 'Fundação para a Ciência e a Tecnologia')">
|
263 |
|
|
<oaf:projectid>
|
264 |
|
|
<xsl:value-of select="concat($varFCT, ./*[local-name()='awardNumber'])"/>
|
265 |
|
|
</oaf:projectid>
|
266 |
|
|
</xsl:if>
|
267 |
|
|
<!-- FWF -->
|
268 |
|
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100002428') or contains(./*[local-name()='funderName'], 'Fonds zur Förderung der Wissenschaftlichen Forschung') or contains(./*[local-name()='funderName'], 'Austrian Science Fund')">
|
269 |
|
|
<oaf:projectid>
|
270 |
|
|
<xsl:value-of select="concat($varFCT, ./*[local-name()='awardNumber'])"/>
|
271 |
|
|
</oaf:projectid>
|
272 |
|
|
</xsl:if>
|
273 |
|
|
<!-- MESTD -->
|
274 |
|
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100001871') or (contains(./*[local-name()='funderName'], 'Ministarstvo Prosvete, Nauke i Tehnolo') and contains(./*[local-name()='funderName'], 'kog Razvoja')) or contains(./*[local-name()='funderName'], 'MESTD')">
|
275 |
|
|
<oaf:projectid>
|
276 |
|
|
<xsl:value-of select="concat($varMESTD, ./*[local-name()='awardNumber'])"/>
|
277 |
|
|
</oaf:projectid>
|
278 |
|
|
</xsl:if>
|
279 |
|
|
<!-- MZOS -->
|
280 |
|
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100006588') or contains(./*[local-name()='funderName'], 'Ministarstvo Znanosti, Obrazovanja i Sporta') or contains(./*[local-name()='funderName'], 'Ministry of Science, Education and Sports')">
|
281 |
|
|
<oaf:projectid>
|
282 |
|
|
<xsl:value-of select="concat($varMZOS, ./*[local-name()='awardNumber'])"/>
|
283 |
|
|
</oaf:projectid>
|
284 |
|
|
</xsl:if>
|
285 |
|
|
<!-- NHMRC -->
|
286 |
|
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100000925') or contains(./*[local-name()='funderName'], 'National Health and Medical Research Council') or contains(./*[local-name()='funderName'], 'NHMRC')">
|
287 |
|
|
<oaf:projectid>
|
288 |
|
|
<xsl:value-of select="concat($varNHMRC, ./*[local-name()='awardNumber'])"/>
|
289 |
|
|
</oaf:projectid>
|
290 |
|
|
</xsl:if>
|
291 |
|
|
<!-- NIH -->
|
292 |
|
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/100000002') or contains(./*[local-name()='funderName'], 'National Institutes of Health')">
|
293 |
|
|
<oaf:projectid>
|
294 |
|
|
<xsl:value-of select="concat($varNIH, ./*[local-name()='awardNumber'])"/>
|
295 |
|
|
</oaf:projectid>
|
296 |
|
|
</xsl:if>
|
297 |
|
|
<!-- NSF -->
|
298 |
|
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org') = ('10.13039/100000001') or contains(./*[local-name()='funderName'], 'National Science Foundation')">
|
299 |
|
|
<oaf:projectid>
|
300 |
|
|
<xsl:value-of select="concat($varNSF, ./*[local-name()='awardNumber'])"/>
|
301 |
|
|
</oaf:projectid>
|
302 |
|
|
</xsl:if>
|
303 |
|
|
<!-- NWO -->
|
304 |
|
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100003246') or contains(./*[local-name()='funderName'], 'Netherlands Organisation for Scientific Research') or contains(./*[local-name()='funderName'], 'Nederlandse Organisatie voor Wetenschappelijk Onderzoek')">
|
305 |
|
|
<oaf:projectid>
|
306 |
|
|
<xsl:value-of select="concat($varNWO, ./*[local-name()='awardNumber'])"/>
|
307 |
|
|
</oaf:projectid>
|
308 |
|
|
</xsl:if>
|
309 |
|
|
<!-- RCUK -->
|
310 |
|
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100000690') or contains(./*[local-name()='funderName'], 'Research Councils UK') or contains(./*[local-name()='funderName'], 'RCUK')">
|
311 |
|
|
<oaf:projectid>
|
312 |
|
|
<xsl:value-of select="concat($varRCUK, ./*[local-name()='awardNumber'])"/>
|
313 |
|
|
</oaf:projectid>
|
314 |
|
|
</xsl:if>
|
315 |
|
|
<!-- SFI -->
|
316 |
|
|
<xsl:if test="(substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100001602') or contains(./*[local-name()='funderName'], 'Science Foundation Ireland')) and matches(./*[local-name()='awardNumber'], '.*([\dA-Za-z\.\-]+/)+[\dA-Za-z\.\-]+.*')">
|
317 |
|
|
<oaf:projectid>
|
318 |
|
|
<xsl:value-of select="concat($varSFI, replace(./*[local-name()='awardNumber'], '.*(^|\s)(([\dA-Za-z\.\-]+/)+[\dA-Za-z\.\-]+)($|\s).*', '$2'))"/>
|
319 |
|
|
</oaf:projectid>
|
320 |
|
|
</xsl:if>
|
321 |
|
|
<!-- SNSF -->
|
322 |
|
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100001711') or contains(./*[local-name()='funderName'], 'Swiss National Science Foundation') or contains(./*[local-name()='funderName'], 'Schweizerischer Nationalfonds zur Förderung der Wissenschaftlichen Forschung')">
|
323 |
|
|
<oaf:projectid>
|
324 |
|
|
<xsl:value-of select="concat($varSNSF, ./*[local-name()='awardNumber'])"/>
|
325 |
|
|
</oaf:projectid>
|
326 |
|
|
</xsl:if>
|
327 |
|
|
<!-- TUBITAK -->
|
328 |
|
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/501100004410') or contains(./*[local-name()='funderName'], 'Turkish National Science and Research Council') or (contains(./*[local-name()='funderName'], 'Türkiye Bilimsel ve Teknolojik Ara') and contains(./*[local-name()='funderName'], 'rma Kurumu'))">
|
329 |
|
|
<oaf:projectid>
|
330 |
|
|
<xsl:value-of select="concat($varTUBITAK, ./*[local-name()='awardNumber'])"/>
|
331 |
|
|
</oaf:projectid>
|
332 |
|
|
</xsl:if>
|
333 |
|
|
<!-- WT -->
|
334 |
|
|
<xsl:if test="substring-after(normalize-space(./*[local-name()='funderIdentifier']), 'doi.org/') = ('10.13039/100004440') or contains(./*[local-name()='funderName'], 'Wellcome Trust')">
|
335 |
|
|
<oaf:projectid>
|
336 |
|
|
<xsl:value-of select="concat($varWT, ./*[local-name()='awardNumber'])"/>
|
337 |
|
|
</oaf:projectid>
|
338 |
|
|
</xsl:if>
|
339 |
|
|
</xsl:for-each>
|
340 |
|
|
|
341 |
|
|
</xsl:template>
|
342 |
|
|
|
343 |
55941
|
alessia.ba
|
<xsl:template match="//*[local-name()='alternateIdentifiers']">
|
344 |
|
|
<alternateIdentifiers xmlns="http://datacite.org/schema/kernel-4">
|
345 |
|
|
<alternateIdentifier alternateIdentifierType="LandingPage"><xsl:value-of select="concat('http://hdl.handle.net/', //*[local-name()='identifier' and ./@identifierType='Handle']/text())"/></alternateIdentifier>
|
346 |
|
|
<xsl:apply-templates select="./*[local-name()='alternateIdentifier']"/>
|
347 |
|
|
</alternateIdentifiers>
|
348 |
|
|
</xsl:template>
|
349 |
|
|
|
350 |
|
|
|
351 |
|
|
<!-- #4570: EGI instance links should be the links to the EGI AppDB landing pages -->
|
352 |
|
|
<xsl:template match="//*[local-name()='alternateIdentifier' and ./@alternateIdentifierType='LandingPage']">
|
353 |
|
|
<alternateIdentifier alternateIdentifierType="URL"><xsl:value-of select="./text()"/></alternateIdentifier>
|
354 |
|
|
</xsl:template>
|
355 |
|
|
|
356 |
|
|
<xsl:template match="//*[local-name()='alternateIdentifier']">
|
357 |
|
|
<xsl:copy-of select="." />
|
358 |
|
|
</xsl:template>
|
359 |
|
|
|
360 |
55935
|
alessia.ba
|
</xsl:stylesheet>
|
361 |
|
|
</CODE>
|
362 |
|
|
</SCRIPT>
|
363 |
|
|
</CONFIGURATION>
|
364 |
|
|
<STATUS/>
|
365 |
|
|
<SECURITY_PARAMETERS/>
|
366 |
|
|
</BODY>
|
367 |
|
|
</RESOURCE_PROFILE>
|