1 |
52327
|
alessia.ba
|
<RESOURCE_PROFILE>
|
2 |
|
|
<HEADER>
|
3 |
52416
|
alessia.ba
|
<RESOURCE_IDENTIFIER value="bc8d96f0-f35d-4791-8da9-7bc9b788b978_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>ARC to DB</TITLE>
|
14 |
|
|
<CODE>
|
15 |
53218
|
miriam.bag
|
<![CDATA[
|
16 |
52327
|
alessia.ba
|
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
17 |
48139
|
alessia.ba
|
xmlns:ands="http://ands.org.au/standards/rif-cs/registryObjects">
|
18 |
|
|
|
19 |
37863
|
alessia.ba
|
<xsl:output indent="yes"/>
|
20 |
48139
|
alessia.ba
|
|
21 |
57756
|
miriam.bag
|
<xsl:param name="varDataSourceId"/>
|
22 |
48139
|
alessia.ba
|
|
23 |
35420
|
michele.ar
|
<xsl:template match="/">
|
24 |
48960
|
claudio.at
|
<record>
|
25 |
35420
|
michele.ar
|
<xsl:copy-of select=".//*[local-name()='header']"/>
|
26 |
|
|
<metadata>
|
27 |
|
|
<ROWS>
|
28 |
37863
|
alessia.ba
|
<xsl:for-each select="//ands:registryObject[@group='Australian Research Council']/ands:activity[@type='grant']">
|
29 |
|
|
<xsl:variable name="projectId" select="concat('arc_________::', normalize-space(./ands:identifier[@type='arc']))"/>
|
30 |
41476
|
claudio.at
|
<xsl:variable name="fundingId">
|
31 |
|
|
<xsl:choose>
|
32 |
|
|
<xsl:when test="string-length(./ands:description[@type='fundingScheme']) > 0">
|
33 |
|
|
<xsl:value-of select="concat('arc_________::ARC::', normalize-space(./ands:description[@type='fundingScheme']))"/>
|
34 |
|
|
</xsl:when>
|
35 |
|
|
<xsl:otherwise>
|
36 |
|
|
<xsl:value-of select="string('arc_________::ARC')"/>
|
37 |
|
|
</xsl:otherwise>
|
38 |
|
|
</xsl:choose>
|
39 |
|
|
</xsl:variable>
|
40 |
|
|
|
41 |
37863
|
alessia.ba
|
<ROW table="projects">
|
42 |
48139
|
alessia.ba
|
<FIELD name="_dnet_resource_identifier_">
|
43 |
|
|
<xsl:value-of select="$projectId"/>
|
44 |
|
|
</FIELD>
|
45 |
|
|
<FIELD name="id">
|
46 |
|
|
<xsl:value-of select="$projectId"/>
|
47 |
|
|
</FIELD>
|
48 |
52335
|
alessia.ba
|
<FIELD name="lastupdate" type="date"><xsl:value-of select="current-dateTime()"/></FIELD>
|
49 |
48139
|
alessia.ba
|
<FIELD name="code">
|
50 |
|
|
<xsl:value-of select="normalize-space(.//ands:identifier[@type='arc'])"/>
|
51 |
|
|
</FIELD>
|
52 |
|
|
<FIELD name="title">
|
53 |
|
|
<xsl:value-of select="./ands:name[@type='primary']/ands:namePart"/>
|
54 |
|
|
</FIELD>
|
55 |
|
|
<FIELD name="websiteurl">
|
56 |
|
|
<xsl:value-of select="./ands:identifier[@type='purl']"/>
|
57 |
|
|
</FIELD>
|
58 |
|
|
|
59 |
37863
|
alessia.ba
|
<xsl:for-each select="./ands:existenceDates/ands:startDate[@dateFormat='W3CDTF']">
|
60 |
48139
|
alessia.ba
|
<FIELD name="startdate" type="date" format="dd-MM-yyyy">
|
61 |
|
|
<xsl:value-of select="concat('01-01-', normalize-space(.))"/>
|
62 |
|
|
</FIELD>
|
63 |
37863
|
alessia.ba
|
</xsl:for-each>
|
64 |
|
|
<xsl:for-each select="./ands:existenceDates/ands:endDate[@dateFormat='W3CDTF']">
|
65 |
48139
|
alessia.ba
|
<FIELD name="enddate" type="date" format="dd-MM-yyyy">
|
66 |
|
|
<xsl:value-of select="concat('31-12-', normalize-space(.))"/>
|
67 |
|
|
</FIELD>
|
68 |
37863
|
alessia.ba
|
</xsl:for-each>
|
69 |
48139
|
alessia.ba
|
|
70 |
37863
|
alessia.ba
|
<xsl:variable name="keywords">
|
71 |
|
|
<xsl:for-each select="./ands:subject[@type='local']">
|
72 |
48139
|
alessia.ba
|
<xsl:if test="position() != 1">,</xsl:if>
|
73 |
37863
|
alessia.ba
|
<xsl:value-of select="."/>
|
74 |
|
|
</xsl:for-each>
|
75 |
|
|
</xsl:variable>
|
76 |
48139
|
alessia.ba
|
<FIELD name="keywords">
|
77 |
|
|
<xsl:value-of select="normalize-space($keywords)"/>
|
78 |
|
|
</FIELD>
|
79 |
57276
|
miriam.bag
|
<FIELD name="summary">
|
80 |
|
|
<xsl:value-of select="//ands:description[@type='brief']"/>
|
81 |
|
|
</FIELD>
|
82 |
|
|
<xsl:if test="//ands:description[@type='fundingAmount']">
|
83 |
57756
|
miriam.bag
|
<xsl:variable name="fundedamount" select="translate(//ands:description[@type='fundingAmount'],'$,','')"/>
|
84 |
|
|
<xsl:if test="numeric($fundedamount)">
|
85 |
57276
|
miriam.bag
|
<FIELD name="fundedamount" type="float">
|
86 |
|
|
<xsl:value-of select="translate(//ands:description[@type='fundingAmount'],'$,','')"/>
|
87 |
|
|
</FIELD>
|
88 |
|
|
<FIELD name="currency">
|
89 |
|
|
<xsl:value-of select="string('AUD')"/>
|
90 |
|
|
</FIELD>
|
91 |
57756
|
miriam.bag
|
</xsl:if>
|
92 |
57276
|
miriam.bag
|
</xsl:if>
|
93 |
48139
|
alessia.ba
|
<FIELD name="collectedfrom">
|
94 |
57756
|
miriam.bag
|
<xsl:value-of select="$varDataSourceId"/>
|
95 |
48139
|
alessia.ba
|
</FIELD>
|
96 |
37863
|
alessia.ba
|
<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD>
|
97 |
|
|
<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD>
|
98 |
35420
|
michele.ar
|
</ROW>
|
99 |
48139
|
alessia.ba
|
|
100 |
35420
|
michele.ar
|
<ROW table="project_fundingpath">
|
101 |
48139
|
alessia.ba
|
<FIELD name="_dnet_resource_identifier_">
|
102 |
|
|
<xsl:value-of select="concat($fundingId, '@@', $projectId)"/>
|
103 |
|
|
</FIELD>
|
104 |
|
|
<FIELD name="funding">
|
105 |
|
|
<xsl:value-of select="$fundingId"/>
|
106 |
|
|
</FIELD>
|
107 |
|
|
<FIELD name="project">
|
108 |
|
|
<xsl:value-of select="$projectId"/>
|
109 |
|
|
</FIELD>
|
110 |
37863
|
alessia.ba
|
<xsl:for-each select="./ands:existenceDates/ands:startDate[@dateFormat='W3CDTF']">
|
111 |
48139
|
alessia.ba
|
<FIELD name="startdate" type="date" format="dd-MM-yyyy">
|
112 |
|
|
<xsl:value-of select="concat('01-01-', normalize-space(.))"/>
|
113 |
|
|
</FIELD>
|
114 |
37863
|
alessia.ba
|
</xsl:for-each>
|
115 |
|
|
<xsl:for-each select="./ands:existenceDates/ands:endDate[@dateFormat='W3CDTF']">
|
116 |
48139
|
alessia.ba
|
<FIELD name="enddate" type="date" format="dd-MM-yyyy">
|
117 |
|
|
<xsl:value-of select="concat('31-12-', normalize-space(.))"/>
|
118 |
|
|
</FIELD>
|
119 |
37863
|
alessia.ba
|
</xsl:for-each>
|
120 |
35420
|
michele.ar
|
</ROW>
|
121 |
48139
|
alessia.ba
|
|
122 |
35420
|
michele.ar
|
</xsl:for-each>
|
123 |
|
|
</ROWS>
|
124 |
|
|
</metadata>
|
125 |
|
|
</record>
|
126 |
|
|
</xsl:template>
|
127 |
|
|
</xsl:stylesheet>
|
128 |
53218
|
miriam.bag
|
]]>
|
129 |
52327
|
alessia.ba
|
</CODE>
|
130 |
|
|
</SCRIPT>
|
131 |
|
|
</CONFIGURATION>
|
132 |
|
|
<STATUS/>
|
133 |
|
|
<SECURITY_PARAMETERS>SECURITY_PARAMETERS</SECURITY_PARAMETERS>
|
134 |
|
|
</BODY>
|
135 |
|
|
</RESOURCE_PROFILE>
|