1 |
52327
|
alessia.ba
|
<RESOURCE_PROFILE>
|
2 |
|
|
<HEADER>
|
3 |
52423
|
alessia.ba
|
<RESOURCE_IDENTIFIER value="5e0cef7e-2099-4a19-ad93-36c212486279_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
|
4 |
52327
|
alessia.ba
|
<RESOURCE_TYPE value="TransformationRuleDSResourceType"/>
|
5 |
|
|
<RESOURCE_KIND value="TransformationRuleDSResources"/>
|
6 |
|
|
<RESOURCE_URI value=""/>
|
7 |
|
|
<DATE_OF_CREATION value="2018-06-04T11:15:30+00:00"/>
|
8 |
|
|
</HEADER>
|
9 |
|
|
<BODY>
|
10 |
|
|
<CONFIGURATION>
|
11 |
|
|
<IMPORTED/>
|
12 |
|
|
<SCRIPT>
|
13 |
|
|
<TITLE>TUBITAK projects to DB</TITLE>
|
14 |
|
|
<CODE>
|
15 |
53143
|
alessia.ba
|
<![CDATA[
|
16 |
48193
|
alessia.ba
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
17 |
48738
|
miriam.bag
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
18 |
|
|
exclude-result-prefixes="xs" version="2.0">
|
19 |
26600
|
sandro.lab
|
|
20 |
52370
|
miriam.bag
|
<xsl:param name="varDataSourceId"/>
|
21 |
48738
|
miriam.bag
|
<xsl:variable name="namespacePrefix" select="xs:string('tubitakf____')"/>
|
22 |
48139
|
alessia.ba
|
<xsl:param name="quote">"</xsl:param>
|
23 |
26600
|
sandro.lab
|
|
24 |
48771
|
claudio.at
|
<xsl:variable name="funderID" select="concat('tubitakf____', '::tubitak')"/>
|
25 |
48139
|
alessia.ba
|
|
26 |
48738
|
miriam.bag
|
|
27 |
|
|
<xsl:variable name="stream" select="normalize-space(.//column[@name='FUNDING STREAM(S)'])"/>
|
28 |
48139
|
alessia.ba
|
<xsl:variable name="fundingID">
|
29 |
26600
|
sandro.lab
|
<xsl:choose>
|
30 |
48139
|
alessia.ba
|
<xsl:when test="string-length($stream) > 0">
|
31 |
|
|
<xsl:value-of select="concat($funderID, '::', $stream)"/>
|
32 |
26600
|
sandro.lab
|
</xsl:when>
|
33 |
|
|
<xsl:otherwise>
|
34 |
48139
|
alessia.ba
|
<xsl:value-of select="$funderID"/>
|
35 |
26600
|
sandro.lab
|
</xsl:otherwise>
|
36 |
|
|
</xsl:choose>
|
37 |
48743
|
miriam.bag
|
|
38 |
26600
|
sandro.lab
|
</xsl:variable>
|
39 |
|
|
|
40 |
48738
|
miriam.bag
|
<xsl:variable name="projectId" select="concat($namespacePrefix, '::', normalize-space(.//column[@name='PROJECT IDENTIFIER']))"/>
|
41 |
48139
|
alessia.ba
|
|
42 |
|
|
|
43 |
48738
|
miriam.bag
|
<xsl:variable name="startDate" select="translate(.//column[@name='START DATE'],'/\','--')"/>
|
44 |
|
|
<xsl:variable name="endDate" select="translate(.//column[@name='END DATE'],'/\','--')"/>
|
45 |
48139
|
alessia.ba
|
|
46 |
48738
|
miriam.bag
|
<xsl:variable name="dateFormat" select="string('dd-MM-yyyy')"/>
|
47 |
|
|
<xsl:variable name="projectTitle" select="normalize-space(.//column[@name='PROJECT TITLE or ACRONYM'])"/>
|
48 |
48139
|
alessia.ba
|
|
49 |
26600
|
sandro.lab
|
<xsl:template match="/">
|
50 |
48139
|
alessia.ba
|
<record>
|
51 |
26600
|
sandro.lab
|
|
52 |
48139
|
alessia.ba
|
<xsl:copy-of select=".//*[local-name()='header']"/>
|
53 |
|
|
<metadata>
|
54 |
|
|
<ROWS>
|
55 |
48738
|
miriam.bag
|
<xsl:if test="string-length($projectTitle) > 0 and string-length($projectId) > 0">
|
56 |
48139
|
alessia.ba
|
<ROW table="projects">
|
57 |
|
|
<FIELD name="_dnet_resource_identifier_">
|
58 |
48738
|
miriam.bag
|
<xsl:value-of select="$projectId"/>
|
59 |
48139
|
alessia.ba
|
</FIELD>
|
60 |
|
|
<FIELD name="id">
|
61 |
48738
|
miriam.bag
|
<xsl:value-of select="$projectId"/>
|
62 |
48139
|
alessia.ba
|
</FIELD>
|
63 |
|
|
<FIELD name="code">
|
64 |
48738
|
miriam.bag
|
<xsl:value-of select="normalize-space(.//column[@name='PROJECT IDENTIFIER'])"/>
|
65 |
48139
|
alessia.ba
|
</FIELD>
|
66 |
|
|
<FIELD name="startdate" type="date" format="{$dateFormat}">
|
67 |
|
|
<xsl:value-of select="$startDate"/>
|
68 |
|
|
</FIELD>
|
69 |
|
|
<FIELD name="enddate" type="date" format="{$dateFormat}">
|
70 |
|
|
<xsl:value-of select="$endDate"/>
|
71 |
|
|
</FIELD>
|
72 |
|
|
<FIELD name="title">
|
73 |
48738
|
miriam.bag
|
<xsl:value-of select="$projectTitle"/>
|
74 |
48139
|
alessia.ba
|
</FIELD>
|
75 |
|
|
|
76 |
48738
|
miriam.bag
|
|
77 |
48139
|
alessia.ba
|
<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD>
|
78 |
|
|
<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD>
|
79 |
|
|
<FIELD name="collectedfrom">
|
80 |
52372
|
miriam.bag
|
<xsl:value-of select="$varDataSourceId"/>
|
81 |
48139
|
alessia.ba
|
</FIELD>
|
82 |
|
|
|
83 |
48738
|
miriam.bag
|
<FIELD name="oa_mandate_for_publications" type="boolean">false</FIELD>
|
84 |
52337
|
miriam.bag
|
<FIELD name="lastupdate" type="date"><xsl:value-of select="current-dateTime()"/></FIELD>
|
85 |
48139
|
alessia.ba
|
</ROW>
|
86 |
|
|
</xsl:if>
|
87 |
48738
|
miriam.bag
|
<ROW table="project_fundingpath">
|
88 |
|
|
<FIELD name="_dnet_resource_identifier_">
|
89 |
|
|
<xsl:value-of select="concat($fundingID,'@@', $projectId)"/>
|
90 |
|
|
</FIELD>
|
91 |
|
|
<FIELD name="funding">
|
92 |
|
|
<xsl:value-of select="$fundingID"/>
|
93 |
|
|
</FIELD>
|
94 |
|
|
<FIELD name="project">
|
95 |
|
|
<xsl:value-of select="$projectId"/>
|
96 |
|
|
</FIELD>
|
97 |
|
|
<FIELD name="startdate" type="date" format="{$dateFormat}">
|
98 |
|
|
<xsl:value-of select="$startDate"/>
|
99 |
|
|
</FIELD>
|
100 |
|
|
<FIELD name="enddate" type="date" format="{$dateFormat}">
|
101 |
|
|
<xsl:value-of select="$endDate"/>
|
102 |
|
|
</FIELD>
|
103 |
|
|
</ROW>
|
104 |
|
|
|
105 |
|
|
|
106 |
48139
|
alessia.ba
|
</ROWS>
|
107 |
|
|
</metadata>
|
108 |
26600
|
sandro.lab
|
</record>
|
109 |
|
|
</xsl:template>
|
110 |
48771
|
claudio.at
|
</xsl:stylesheet>
|
111 |
53143
|
alessia.ba
|
]]>
|
112 |
52327
|
alessia.ba
|
</CODE>
|
113 |
|
|
</SCRIPT>
|
114 |
|
|
</CONFIGURATION>
|
115 |
|
|
<STATUS/>
|
116 |
|
|
<SECURITY_PARAMETERS>SECURITY_PARAMETERS</SECURITY_PARAMETERS>
|
117 |
|
|
</BODY>
|
118 |
|
|
</RESOURCE_PROFILE>
|