1 |
38509
|
michele.ar
|
<?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="prefix" select="string('sfi_________')" />
|
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 |
38537
|
michele.ar
|
<xsl:if test="normalize-space(.//column[@name='Project Identifier']) and normalize-space(.//column[@name='Project Title'])">
|
25 |
|
|
<xsl:variable name="projectId" select="concat($namespacePrefix, '::', normalize-space(.//column[@name='Project Identifier']))" />
|
26 |
38509
|
michele.ar
|
<xsl:variable name="startDate" select=".//column[@name='Start date']" />
|
27 |
|
|
<xsl:variable name="endDate" select=".//column[@name='End Date']" />
|
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 Identifier']" /></FIELD>
|
32 |
|
|
<FIELD name="title"><xsl:value-of select=".//column[@name='Project Title']" /></FIELD>
|
33 |
|
|
<FIELD name="startdate" type="date" format="dd/MM/yyyy"><xsl:value-of select="$startDate" /></FIELD>
|
34 |
|
|
<FIELD name="enddate" type="date" format="dd/MM/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 |
38537
|
michele.ar
|
|
39 |
|
|
<xsl:if test="normalize-space(.//column[@name='Programme'])">
|
40 |
38509
|
michele.ar
|
<xsl:variable name="funderId" select="concat($prefix, '::SFI')" />
|
41 |
38537
|
michele.ar
|
<xsl:variable name="fundingId" select="concat($funderId, '::', normalize-space(.//column[@name='Programme']))" />
|
42 |
38509
|
michele.ar
|
<ROW table="project_fundingpath">
|
43 |
|
|
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="concat($fundingId, '@@', $projectId)" /></FIELD>
|
44 |
|
|
<FIELD name="funding"><xsl:value-of select="$fundingId" /></FIELD>
|
45 |
|
|
<FIELD name="project"><xsl:value-of select="$projectId" /></FIELD>
|
46 |
|
|
<FIELD name="startdate" type="date" format="dd/MM/yyyy"><xsl:value-of select="$startDate" /></FIELD>
|
47 |
|
|
<FIELD name="enddate" type="date" format="dd/MM/yyyy"><xsl:value-of select="$endDate" /></FIELD>
|
48 |
|
|
</ROW>
|
49 |
|
|
</xsl:if>
|
50 |
|
|
|
51 |
38537
|
michele.ar
|
<xsl:if test="normalize-space(.//column[@name='Research Body'])">
|
52 |
|
|
<xsl:variable name="organizationId" select="concat($namespacePrefix, '::', normalize-space(.//column[@name='Research Body']))" />
|
53 |
38509
|
michele.ar
|
<ROW table="organizations">
|
54 |
|
|
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="$organizationId" /></FIELD>
|
55 |
|
|
<FIELD name="id"><xsl:value-of select="$organizationId" /></FIELD>
|
56 |
|
|
<FIELD name="legalname"><xsl:value-of select=".//column[@name='Research Body']" /></FIELD>
|
57 |
|
|
<FIELD name="countryclass">IE</FIELD>
|
58 |
|
|
<FIELD name="countryscheme">dnet:countries</FIELD>
|
59 |
|
|
<FIELD name="collectedfrom"><xsl:value-of select="$parentDatasourceId" /></FIELD>
|
60 |
|
|
<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD>
|
61 |
|
|
<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD>
|
62 |
|
|
</ROW>
|
63 |
|
|
<ROW table="project_organization">
|
64 |
|
|
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select='concat($projectId, "@@", $organizationId)' /></FIELD>
|
65 |
|
|
<FIELD name="project"><xsl:value-of select="$projectId" /></FIELD>
|
66 |
|
|
<FIELD name="resporganization"><xsl:value-of select="$organizationId" /></FIELD>
|
67 |
|
|
<FIELD name="participantnumber" type="int">1</FIELD>
|
68 |
|
|
<FIELD name="semanticclass">coordinator</FIELD>
|
69 |
|
|
<FIELD name="semanticscheme">dnet:project_organization_relations</FIELD>
|
70 |
|
|
</ROW>
|
71 |
|
|
</xsl:if>
|
72 |
|
|
</xsl:if>
|
73 |
|
|
</ROWS>
|
74 |
|
|
</metadata>
|
75 |
|
|
</record>
|
76 |
|
|
</xsl:template>
|
77 |
|
|
|
78 |
|
|
</xsl:stylesheet>
|