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:dc="http://purl.org/dc/elements/1.1/"
4
	xmlns:dr="http://www.driver-repository.eu/namespace/dr" xmlns:dri="http://www.driver-repository.eu/namespace/dri" 
5
	xmlns:oaa="http://namespace.openaire.eu/oaa" xmlns:oaf="http://namespace.openaire.eu/oaf"
6
	xmlns:dnet="eu.dnetlib.data.transform.xml.DNetDbToHbaseXsltFunctions">
7
	
8
	<xsl:output omit-xml-declaration="yes" indent="yes"/>
9

    
10
	<xsl:template match="/">
11

    
12
		<xsl:variable name="originalid" select="//FIELD[@name = 'datasourceid']" />
13
		<xsl:variable name="datasourceid" select="dnet:oafSplitId('datasource', $originalid)" />		
14
		<xsl:variable name="dateofcollection" select="//FIELD[@name = 'dateofcollection']" />
15
		<xsl:variable name="collectedfromid" select="dnet:oafSplitId('datasource', //FIELD[@name = 'collectedfromid'])" />
16
		<xsl:variable name="collectedfromname" select="//FIELD[@name = 'collectedfromname']" />
17
		
18
		<xsl:variable name="datasource" select="dnet:oafEntity('datasource', $datasourceid, $collectedfromid, $collectedfromname, $originalid, $dateofcollection, //FIELD[not(@isNull)])"/>
19
		
20
		<ROWS>
21
			<xsl:if test="string-length($datasourceid) &gt; 0">
22
				<ROW key="{$datasourceid}" columnFamily="datasource">
23
					<QUALIFIER name="body" type="base64"><xsl:value-of select="$datasource"/></QUALIFIER>
24
				</ROW>
25
			</xsl:if>
26
		</ROWS>
27
	
28
	</xsl:template>
29

    
30
</xsl:stylesheet>
(3-3/18)