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 = 'projectid']" />
|
13
|
<xsl:variable name="projectid" select="dnet:oafSplitId('project', $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="project" select="dnet:oafEntity('project', $projectid, $collectedfromid, $collectedfromname, $originalid, $dateofcollection, //FIELD[not(@isNull)])"/>
|
19
|
|
20
|
<ROWS>
|
21
|
<xsl:if test="string-length($projectid) > 0">
|
22
|
<ROW key="{$projectid}" columnFamily="project">
|
23
|
<QUALIFIER name="body" type="base64"><xsl:value-of select="$project"/></QUALIFIER>
|
24
|
</ROW>
|
25
|
</xsl:if>
|
26
|
</ROWS>
|
27
|
|
28
|
</xsl:template>
|
29
|
|
30
|
</xsl:stylesheet>
|