1 |
26600
|
sandro.lab
|
<?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="projectId" select="dnet:oafSplitId('project', //FIELD[@name = 'project'])" />
|
13 |
|
|
<xsl:variable name="contactpersonId" select="dnet:oafSplitId('person', //FIELD[@name = 'contactperson'])" />
|
14 |
|
|
|
15 |
|
|
<ROWS>
|
16 |
|
|
<xsl:if test="string-length($projectId) > 0 and string-length($contactpersonId) > 0">
|
17 |
|
|
|
18 |
|
|
<xsl:variable name="projectcontactperson"
|
19 |
28822
|
claudio.at
|
select="dnet:oafRel('projectPerson', $projectId, $contactpersonId, //FIELD[not(@isNull)], 'hasContact', 'dnet:project_person_relations')"/>
|
20 |
26600
|
sandro.lab
|
<xsl:variable name="contactpersonproject"
|
21 |
28822
|
claudio.at
|
select="dnet:oafRel('projectPerson', $contactpersonId, $projectId, //FIELD[not(@isNull)], 'isContact', 'dnet:project_person_relations')"/>
|
22 |
26600
|
sandro.lab
|
|
23 |
28822
|
claudio.at
|
<ROW key="{$projectId}" columnFamily="projectPerson_contactPerson_hasContact">
|
24 |
26600
|
sandro.lab
|
<QUALIFIER name="{$contactpersonId}" type="base64"><xsl:value-of select="$projectcontactperson"/></QUALIFIER>
|
25 |
|
|
</ROW>
|
26 |
28822
|
claudio.at
|
<ROW key="{$contactpersonId}" columnFamily="projectPerson_contactPerson_isContact">
|
27 |
26600
|
sandro.lab
|
<QUALIFIER name="{$projectId}" type="base64"><xsl:value-of select="$contactpersonproject"/></QUALIFIER>
|
28 |
|
|
</ROW>
|
29 |
|
|
</xsl:if>
|
30 |
|
|
</ROWS>
|
31 |
|
|
|
32 |
|
|
</xsl:template>
|
33 |
|
|
|
34 |
|
|
</xsl:stylesheet>
|