1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/"
|
3
|
xmlns:oai="http://www.openarchives.org/OAI/2.0/"
|
4
|
xmlns:datetime="http://exslt.org/dates-and-times"
|
5
|
xmlns:dri="http://www.driver-repository.eu/namespace/dri"
|
6
|
xmlns:oaa="http://namespace.openaire.eu/oaa" xmlns:oaf="http://namespace.openaire.eu/oaf"
|
7
|
xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:dnet="eu.dnetlib.data.transform.xml.AbstractDNetXsltFunctions"
|
8
|
xmlns:stringUtils="org.apache.commons.lang.StringUtils"
|
9
|
version="1.0"
|
10
|
exclude-result-prefixes="xsl dc dnet oaa fn stringUtils datetime">
|
11
|
|
12
|
<xsl:param name="namespacePrefix"/>
|
13
|
<xsl:param name="dataSourceId"/>
|
14
|
<xsl:param name="dataprovider_id"/>
|
15
|
|
16
|
<xsl:template match="/">
|
17
|
<xsl:variable name="identifier">
|
18
|
<xsl:value-of
|
19
|
select="stringUtils:substringAfter(/*[local-name()='datasetsRecord']/*[local-name()='metadata']/*[local-name()='MetaData']/*[local-name()='citation']/*[local-name()='URI'],'doi:')"
|
20
|
/>
|
21
|
</xsl:variable>
|
22
|
<oai:record>
|
23
|
<oai:header>
|
24
|
<dri:objIdentifier>
|
25
|
<xsl:value-of select="concat($namespacePrefix,'::', dnet:md5($identifier))"/>
|
26
|
</dri:objIdentifier>
|
27
|
<dri:recordIdentifier>
|
28
|
<xsl:value-of select="$identifier"/>
|
29
|
</dri:recordIdentifier>
|
30
|
<dri:dateOfCollection>
|
31
|
<xsl:value-of select="datetime:dateTime()"/>
|
32
|
</dri:dateOfCollection>
|
33
|
<dri:repositoryId>
|
34
|
<xsl:value-of select="$dataSourceId"/>
|
35
|
</dri:repositoryId>
|
36
|
<oaf:datasourceprefix>
|
37
|
<xsl:value-of select="$namespacePrefix"/>
|
38
|
</oaf:datasourceprefix>
|
39
|
<dri:repositoryId>
|
40
|
<xsl:value-of select="$dataprovider_id"/>
|
41
|
</dri:repositoryId>
|
42
|
</oai:header>
|
43
|
<oai:metadata>
|
44
|
<xsl:copy-of select="."/>
|
45
|
</oai:metadata>
|
46
|
</oai:record>
|
47
|
|
48
|
</xsl:template>
|
49
|
</xsl:stylesheet>
|