1 |
57755
|
miriam.bag
|
<RESOURCE_PROFILE>
|
2 |
|
|
<HEADER>
|
3 |
|
|
<RESOURCE_IDENTIFIER value="5a4dd0b9-412c-4b67-a2df-c376070f680e_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>ANR to DB</TITLE>
|
14 |
|
|
<CODE>
|
15 |
|
|
<![CDATA[
|
16 |
|
|
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
17 |
|
|
xmlns:utils="eu.dnetlib.data.transform.xml.AbstractDNetXsltFunctions">
|
18 |
|
|
|
19 |
|
|
<xsl:param name="varDataSourceId"/>
|
20 |
|
|
<xsl:variable name="namespacePrefix" select="string('anr_________')"/>
|
21 |
|
|
|
22 |
|
|
<!--<xsl:variable name="dateFormat" select="string('dd-MM-yyyy')"/>-->
|
23 |
|
|
<xsl:variable name="funderID" select="concat($namespacePrefix, '::ANR')"/>
|
24 |
|
|
|
25 |
|
|
<!--<xsl:variable name="fundingId">
|
26 |
|
|
<xsl:value-of
|
27 |
|
|
select="concat($funderID, '::', translate(.//column[@name = 'FUNDING STREAM'], ' ', ''))"
|
28 |
|
|
/>
|
29 |
|
|
</xsl:variable>
|
30 |
|
|
-->
|
31 |
|
|
<xsl:variable name="fundingId">
|
32 |
|
|
<xsl:value-of select="$funderID"/>
|
33 |
|
|
</xsl:variable>
|
34 |
|
|
<xsl:variable name="quot">"</xsl:variable>
|
35 |
|
|
<xsl:variable name="Id">
|
36 |
|
|
<xsl:value-of select="normalize-space(.//column[@isID='true'])"/>
|
37 |
|
|
</xsl:variable>
|
38 |
|
|
<xsl:template match="/">
|
39 |
|
|
<record>
|
40 |
|
|
|
41 |
|
|
<xsl:copy-of select=".//*[local-name() = 'header']"/>
|
42 |
|
|
|
43 |
|
|
<metadata>
|
44 |
|
|
<ROWS>
|
45 |
|
|
<xsl:variable name="projectId"
|
46 |
|
|
select="concat($namespacePrefix, '::', $Id)"/>
|
47 |
|
|
<!-- <xsl:variable name="startDate"
|
48 |
|
|
select="replace(.//column[@name = 'PROJECT STARTING DATE'], '/', '-')"/>
|
49 |
|
|
<xsl:variable name="endDate"
|
50 |
|
|
select="replace(.//column[@name = 'PROJECT COMPLETION DATE'], '/', '-')"/>
|
51 |
|
|
-->
|
52 |
|
|
|
53 |
|
|
<ROW table="projects">
|
54 |
|
|
<FIELD name="_dnet_resource_identifier_">
|
55 |
|
|
<xsl:value-of select="$projectId"/>
|
56 |
|
|
</FIELD>
|
57 |
|
|
<FIELD name="id">
|
58 |
|
|
<xsl:value-of select="$projectId"/>
|
59 |
|
|
</FIELD>
|
60 |
|
|
<FIELD name="code">
|
61 |
|
|
<xsl:value-of
|
62 |
|
|
select="$Id"/>
|
63 |
|
|
</FIELD>
|
64 |
|
|
<FIELD name="title">
|
65 |
|
|
<xsl:value-of select=".//column[@name = 'TitreUk (SIM et autres sources complémentaires)'] | .//column[@name = 'Projet Nom Complet']"/>
|
66 |
|
|
</FIELD>
|
67 |
|
|
|
68 |
|
|
<FIELD name="acronym">
|
69 |
|
|
<xsl:value-of select=".//column[@name = 'Acronyme (SIM)'] | .//column[@name = 'Acronyme']"/>
|
70 |
|
|
</FIELD>
|
71 |
|
|
<!-- <FIELD name="startdate" type="date" format="{$dateFormat}">
|
72 |
|
|
<xsl:value-of select="$startDate"/>
|
73 |
|
|
</FIELD>
|
74 |
|
|
<FIELD name="enddate" type="date" format="{$dateFormat}">
|
75 |
|
|
<xsl:value-of select="$endDate"/>
|
76 |
|
|
</FIELD>-->
|
77 |
|
|
|
78 |
|
|
<FIELD name="collectedfrom">
|
79 |
|
|
<xsl:value-of select="$varDataSourceId"/>
|
80 |
|
|
</FIELD>
|
81 |
|
|
<FIELD name="provenanceactionclass"
|
82 |
|
|
>sysimport:crosswalk:entityregistry</FIELD>
|
83 |
|
|
<FIELD name="provenanceactionscheme">dnet:provenanceActions</FIELD>
|
84 |
|
|
<FIELD name="oa_mandate_for_publications" type="boolean">false</FIELD>
|
85 |
|
|
<FIELD name="lastupdate" type="date"><xsl:value-of select="current-dateTime()"/></FIELD>
|
86 |
|
|
</ROW>
|
87 |
|
|
<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 |
|
|
</ROWS>
|
106 |
|
|
</metadata>
|
107 |
|
|
</record>
|
108 |
|
|
</xsl:template>
|
109 |
|
|
</xsl:stylesheet>
|
110 |
|
|
]]>
|
111 |
|
|
</CODE>
|
112 |
|
|
</SCRIPT>
|
113 |
|
|
</CONFIGURATION>
|
114 |
|
|
<STATUS/>
|
115 |
|
|
<SECURITY_PARAMETERS>SECURITY_PARAMETERS</SECURITY_PARAMETERS>
|
116 |
|
|
</BODY>
|
117 |
|
|
</RESOURCE_PROFILE>
|