1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
3
|
xmlns:xs="http://www.w3.org/2001/XMLSchema" 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:oaf="http://namespace.openaire.eu/oaf" xmlns:fn="http://www.w3.org/2005/xpath-functions"
|
6
|
exclude-result-prefixes="xs" version="1.0">
|
7
|
|
8
|
<xsl:param name="parentDatasourceId" />
|
9
|
<xsl:param name="namespacePrefix" />
|
10
|
|
11
|
<xsl:template match="/">
|
12
|
|
13
|
<xsl:variable name="funderId" select="string('taraexp_____::tara')" />
|
14
|
|
15
|
<record xmlns:dr="http://www.driver-repository.eu/namespace/dr"
|
16
|
xmlns:dri="http://www.driver-repository.eu/namespace/dri" xmlns:dc="http://purl.org/dc/elements/1.1/"
|
17
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oaf="http://namespace.openaire.eu/oaf"
|
18
|
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/">
|
19
|
|
20
|
<xsl:copy-of select=".//*[local-name()='header']" />
|
21
|
|
22
|
<metadata>
|
23
|
<ROWS>
|
24
|
<xsl:variable name="projectId" select="concat($namespacePrefix, '::', normalize-space(.//column[@name='PROJECT ID']))" />
|
25
|
<xsl:variable name="startDate" select=".//column[@name='START DATE']" />
|
26
|
<xsl:variable name="endDate" select=".//column[@name='END DATE']" />
|
27
|
|
28
|
<ROW table="projects">
|
29
|
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="$projectId" /></FIELD>
|
30
|
<FIELD name="id"><xsl:value-of select="$projectId" /></FIELD>
|
31
|
<FIELD name="code"><xsl:value-of select=".//column[@name='PROJECT ID']" /></FIELD>
|
32
|
<FIELD name="title"><xsl:value-of select=".//column[@name='PROJECT TITLE']" /></FIELD>
|
33
|
<FIELD name="startdate" type="date" format="yyyy"><xsl:value-of select="$startDate" /></FIELD>
|
34
|
<FIELD name="enddate" type="date" format="yyyy"><xsl:value-of select="$endDate" /></FIELD>
|
35
|
<FIELD name="collectedfrom"><xsl:value-of select="$parentDatasourceId" /></FIELD>
|
36
|
<FIELD name="provenanceactionclass">sysimport:crosswalk:entityregistry</FIELD>
|
37
|
</ROW>
|
38
|
|
39
|
<ROW table="project_fundingpath">
|
40
|
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="concat($funderId, '@@', $projectId)" /></FIELD>
|
41
|
<FIELD name="funding"><xsl:value-of select="$funderId" /></FIELD>
|
42
|
<FIELD name="project"><xsl:value-of select="$projectId" /></FIELD>
|
43
|
<FIELD name="startdate" type="date" format="yyyy"><xsl:value-of select="$startDate" /></FIELD>
|
44
|
<FIELD name="enddate" type="date" format="yyyy"><xsl:value-of select="$endDate" /></FIELD>
|
45
|
</ROW>
|
46
|
|
47
|
</ROWS>
|
48
|
</metadata>
|
49
|
</record>
|
50
|
</xsl:template>
|
51
|
|
52
|
</xsl:stylesheet>
|