Project

General

Profile

1
<?xml version="1.0" encoding="UTF-8"?>
2
<xsl:stylesheet version="1.0"
3
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
	xmlns:datetime="http://exslt.org/dates-and-times" xmlns:exslt="http://exslt.org/common"
5
	xmlns:oai="http://www.openarchives.org/OAI/2.0/"
6
	xmlns:dnet="eu.dnetlib.data.transform.xml.DataciteToHbaseXsltFunctions"
7
	xmlns:oaf="http://namespace.openaire.eu/oaf"
8
	exclude-result-prefixes="xsl datetime exslt xsi dnet" xmlns:dri="http://www.driver-repository.eu/namespace/dri"
9
	xmlns:dr="http://www.driver-repository.eu/namespace/dr">
10

    
11

    
12

    
13
	<xsl:param name="repoId" />
14
	<xsl:param name="storeId" />
15
	<xsl:param name="namespacePrefix"/>
16
	<xsl:param name="dateOfCollection"/>
17

    
18
	<xsl:template match="oai:header">
19
		<xsl:variable name="dummy">
20
			<xsl:element name="dri:dummy"
21
				namespace="http://www.driver-repository.eu/namespace/dri" />
22
		</xsl:variable>
23
		<header>
24
<!--			<xsl:copy-of select="exslt:node-set($dummy)//namespace::*" />-->
25

    
26
			<dri:objIdentifier>
27
				<xsl:value-of select="$namespacePrefix" />::<xsl:value-of select="dnet:md5(./oai:identifier)" />
28
			</dri:objIdentifier>
29
<!-- 			<dri:objIdentifier> -->
30
<!-- 				<xsl:value-of select="$repoId" />::<xsl:value-of select="./oai:identifier" /> -->
31
<!-- 			</dri:objIdentifier> -->
32
			<dri:recordIdentifier>
33
<!-- 				<xsl:value-of select="$storeId" />:: --><xsl:value-of select="./oai:identifier" />
34
			</dri:recordIdentifier>
35
			<dri:dateOfCollection>
36
				<xsl:value-of select="$dateOfCollection" />
37
			</dri:dateOfCollection>
38
			<dr:dateOfCollection>
39
				<xsl:value-of select="$dateOfCollection" />
40
			</dr:dateOfCollection>
41
			<dri:repositoryId>
42
				<xsl:value-of select="$repoId" />
43
			</dri:repositoryId>
44
			<oaf:datasourceprefix><xsl:value-of select="$namespacePrefix" /></oaf:datasourceprefix>
45
			<xsl:apply-templates />
46
		</header>
47
	</xsl:template>
48

    
49
	<xsl:template match="oai:*">
50
		<xsl:element name="{local-name()}">
51
			<xsl:apply-templates select="@*|*|text()" />
52
		</xsl:element>
53
	</xsl:template>
54

    
55
	<xsl:template match="@*|*">
56
		<xsl:copy>
57
			<xsl:apply-templates select="@*|*|text()" />
58
		</xsl:copy>
59
	</xsl:template>
60

    
61
</xsl:stylesheet>
(2-2/3)