1 |
52327
|
alessia.ba
|
<RESOURCE_PROFILE>
|
2 |
|
|
<HEADER>
|
3 |
52416
|
alessia.ba
|
<RESOURCE_IDENTIFIER value="6455a552-0cf2-4011-b82e-258d485ab4ff_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>NWO to DB</TITLE>
|
14 |
|
|
<CODE>
|
15 |
53218
|
miriam.bag
|
<![CDATA[
|
16 |
35960
|
alessia.ba
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
17 |
48139
|
alessia.ba
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
18 |
42988
|
claudio.at
|
exclude-result-prefixes="xs" version="1.0">
|
19 |
32054
|
michele.ar
|
|
20 |
52370
|
miriam.bag
|
<xsl:param name="varDataSourceId"/>
|
21 |
|
|
<xsl:variable name="namespacePrefix" select="string('nwo_________')"/>
|
22 |
48139
|
alessia.ba
|
<xsl:param name="quote">"</xsl:param>
|
23 |
35960
|
alessia.ba
|
|
24 |
48139
|
alessia.ba
|
<xsl:template name="getJson">
|
25 |
|
|
<xsl:param name="varName"/>
|
26 |
|
|
<xsl:param name="value"/>
|
27 |
|
|
<xsl:value-of select="concat($quote, $varName, $quote, ':', $quote, $value, $quote)"/>
|
28 |
|
|
</xsl:template>
|
29 |
43615
|
alessia.ba
|
|
30 |
|
|
|
31 |
48139
|
alessia.ba
|
<xsl:template match="/">
|
32 |
39877
|
michele.ar
|
|
33 |
48139
|
alessia.ba
|
<xsl:variable name="prefix" select="string('nwo_________')"/>
|
34 |
39877
|
michele.ar
|
|
35 |
49668
|
alessia.ba
|
<record>
|
36 |
42988
|
claudio.at
|
|
37 |
48139
|
alessia.ba
|
<xsl:copy-of select=".//*[local-name()='header']"/>
|
38 |
42988
|
claudio.at
|
|
39 |
48139
|
alessia.ba
|
<metadata>
|
40 |
|
|
<ROWS>
|
41 |
|
|
<xsl:variable name="projectId" select="concat($namespacePrefix, '::', normalize-space(.//column[@name='ProjectID']))"/>
|
42 |
|
|
<xsl:variable name="startDate" select=".//column[@name='Werk startdat']"/>
|
43 |
|
|
<xsl:variable name="endDate" select=".//column[@name='Werk einddat']"/>
|
44 |
|
|
<xsl:variable name="dossiernr">
|
45 |
|
|
<xsl:call-template name="getJson">
|
46 |
|
|
<xsl:with-param name="varName">dossiernr</xsl:with-param>
|
47 |
|
|
<xsl:with-param name="value">
|
48 |
|
|
<xsl:value-of select=".//column[@name='Dossiernr']"/>
|
49 |
|
|
</xsl:with-param>
|
50 |
|
|
</xsl:call-template>
|
51 |
|
|
</xsl:variable>
|
52 |
|
|
<xsl:variable name="NWOgebied">
|
53 |
|
|
<xsl:call-template name="getJson">
|
54 |
|
|
<xsl:with-param name="varName">NWOgebied</xsl:with-param>
|
55 |
|
|
<xsl:with-param name="value">
|
56 |
|
|
<xsl:value-of select=".//column[@name='NWO gebied']"/>
|
57 |
|
|
</xsl:with-param>
|
58 |
|
|
</xsl:call-template>
|
59 |
|
|
</xsl:variable>
|
60 |
43615
|
alessia.ba
|
|
61 |
48139
|
alessia.ba
|
<xsl:variable name="jsonExtra">
|
62 |
|
|
<xsl:value-of select="concat('{', $dossiernr, ',', $NWOgebied, '}')"/>
|
63 |
|
|
</xsl:variable>
|
64 |
|
|
<ROW table="projects">
|
65 |
|
|
<FIELD name="_dnet_resource_identifier_">
|
66 |
|
|
<xsl:value-of select="$projectId"/>
|
67 |
|
|
</FIELD>
|
68 |
|
|
<FIELD name="id">
|
69 |
|
|
<xsl:value-of select="$projectId"/>
|
70 |
|
|
</FIELD>
|
71 |
|
|
<FIELD name="code">
|
72 |
|
|
<xsl:value-of select=".//column[@name='ProjectID']"/>
|
73 |
|
|
</FIELD>
|
74 |
|
|
<FIELD name="title">
|
75 |
|
|
<xsl:value-of select=".//column[@name='Proj titel']"/>
|
76 |
|
|
</FIELD>
|
77 |
|
|
<FIELD name="startdate" type="date" format="dd/MM/yyyy">
|
78 |
|
|
<xsl:value-of select="$startDate"/>
|
79 |
|
|
</FIELD>
|
80 |
|
|
<FIELD name="enddate" type="date" format="dd/MM/yyyy">
|
81 |
|
|
<xsl:value-of select="$endDate"/>
|
82 |
|
|
</FIELD>
|
83 |
|
|
<FIELD name="collectedfrom">
|
84 |
52372
|
miriam.bag
|
<xsl:value-of select="$varDataSourceId"/>
|
85 |
48139
|
alessia.ba
|
</FIELD>
|
86 |
49668
|
alessia.ba
|
<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD>
|
87 |
|
|
<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD>
|
88 |
48139
|
alessia.ba
|
<FIELD name="optional1">
|
89 |
|
|
<xsl:value-of select=".//column[@name='Dossiernr']"/>
|
90 |
|
|
</FIELD>
|
91 |
|
|
<FIELD name="optional2">
|
92 |
|
|
<xsl:value-of select=".//column[@name='NWO gebied']"/>
|
93 |
|
|
</FIELD>
|
94 |
|
|
<FIELD name="jsonextrainfo">
|
95 |
|
|
<xsl:value-of select="$jsonExtra"/>
|
96 |
|
|
</FIELD>
|
97 |
52337
|
miriam.bag
|
<FIELD name="lastupdate" type="date"><xsl:value-of select="current-dateTime()"/></FIELD>
|
98 |
48139
|
alessia.ba
|
</ROW>
|
99 |
42988
|
claudio.at
|
|
100 |
48139
|
alessia.ba
|
<xsl:variable name="funderId" select="concat($prefix, '::NWO')"/>
|
101 |
|
|
<ROW table="project_fundingpath">
|
102 |
|
|
<FIELD name="_dnet_resource_identifier_">
|
103 |
|
|
<xsl:value-of select="concat($funderId, '@@', $projectId)"/>
|
104 |
|
|
</FIELD>
|
105 |
|
|
<FIELD name="funding">
|
106 |
|
|
<xsl:value-of select="$funderId"/>
|
107 |
|
|
</FIELD>
|
108 |
|
|
<FIELD name="project">
|
109 |
|
|
<xsl:value-of select="$projectId"/>
|
110 |
|
|
</FIELD>
|
111 |
|
|
<FIELD name="startdate" type="date" format="dd/MM/yyyy">
|
112 |
|
|
<xsl:value-of select="$startDate"/>
|
113 |
|
|
</FIELD>
|
114 |
|
|
<FIELD name="enddate" type="date" format="dd/MM/yyyy">
|
115 |
|
|
<xsl:value-of select="$endDate"/>
|
116 |
|
|
</FIELD>
|
117 |
|
|
</ROW>
|
118 |
42988
|
claudio.at
|
|
119 |
48139
|
alessia.ba
|
</ROWS>
|
120 |
|
|
</metadata>
|
121 |
|
|
</record>
|
122 |
|
|
</xsl:template>
|
123 |
39877
|
michele.ar
|
|
124 |
32054
|
michele.ar
|
</xsl:stylesheet>
|
125 |
53218
|
miriam.bag
|
]]>
|
126 |
52327
|
alessia.ba
|
</CODE>
|
127 |
|
|
</SCRIPT>
|
128 |
|
|
</CONFIGURATION>
|
129 |
|
|
<STATUS/>
|
130 |
|
|
<SECURITY_PARAMETERS>SECURITY_PARAMETERS</SECURITY_PARAMETERS>
|
131 |
|
|
</BODY>
|
132 |
|
|
</RESOURCE_PROFILE>
|