Project

General

Profile

1
<RESOURCE_PROFILE>
2
	<HEADER>
3
		<RESOURCE_IDENTIFIER value="ccc83054-0576-4b58-b3f5-dde3ceac3f54_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
4
		<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>MESTD to DB</TITLE>
14
				<CODE><![CDATA[
15
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
16

    
17
	<xsl:output indent="yes"/>
18

    
19
	<xsl:param name="varDataSourceId"/>
20

    
21
	<xsl:template match="/">
22
		<record>
23

    
24
			<xsl:copy-of select=".//*[local-name()='header']"/>
25

    
26
			<metadata>
27
				<ROWS>
28
					<xsl:variable name="projectId" select="concat('mestd_______::', normalize-space(.//column[./@name='PROJECT IDENTIFIER']))"/>
29
					<xsl:variable name="fundingId" select="concat('mestd_______::MESTD::', normalize-space(.//column[./@name='FUNDING STREAM(S)']))"/>
30

    
31
					<ROW table="projects">
32
						<FIELD name="_dnet_resource_identifier_">
33
							<xsl:value-of select="$projectId"/>
34
						</FIELD>
35
						<FIELD name="id">
36
							<xsl:value-of select="$projectId"/>
37
						</FIELD>
38
						<FIELD name="code">
39
							<xsl:value-of select="normalize-space(.//column[./@name='PROJECT IDENTIFIER'])"/>
40
						</FIELD>
41
						<FIELD name="title">
42
							<xsl:value-of select=".//column[./@name='PROJECT TITLE or ACRONYM']"/>
43
						</FIELD>
44
						<FIELD name="startdate" type="date" format="dd/MM/yyyy">
45
							<xsl:value-of select="//column[./@name='START DATE']"/>
46
						</FIELD>
47
						<FIELD name="enddate" type="date" format="dd/MM/yyyy">
48
							<xsl:value-of select="//column[./@name='END DATE']"/>
49
						</FIELD>
50
						<FIELD name="collectedfrom">
51
							<xsl:value-of select="$varDataSourceId"/>
52
						</FIELD>
53
						<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD>
54
						<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD>
55
						<FIELD name="lastupdate" type="date"><xsl:value-of select="current-dateTime()"/></FIELD>
56
					</ROW>
57

    
58
					<ROW table="project_fundingpath">
59
						<FIELD name="_dnet_resource_identifier_">
60
							<xsl:value-of select="concat($fundingId, '@@', $projectId)"/>
61
						</FIELD>
62
						<FIELD name="funding">
63
							<xsl:value-of select="$fundingId"/>
64
						</FIELD>
65
						<FIELD name="project">
66
							<xsl:value-of select="$projectId"/>
67
						</FIELD>
68
						<FIELD name="startdate" type="date" format="dd/MM/yyyy">
69
							<xsl:value-of select="//column[./@name='START DATE']"/>
70
						</FIELD>
71
						<FIELD name="enddate" type="date" format="dd/MM/yyyy">
72
							<xsl:value-of select="//column[./@name='END DATE']"/>
73
						</FIELD>
74
					</ROW>
75
				</ROWS>
76
			</metadata>
77
		</record>
78
	</xsl:template>
79
</xsl:stylesheet>
80
]]>
81
				</CODE>
82
			</SCRIPT>
83
		</CONFIGURATION>
84
		<STATUS/>
85
		<SECURITY_PARAMETERS>SECURITY_PARAMETERS</SECURITY_PARAMETERS>
86
	</BODY>
87
</RESOURCE_PROFILE>
(12-12/24)