1 |
37863
|
alessia.ba
|
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
48139
|
alessia.ba
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
3 |
|
|
xmlns:ands="http://ands.org.au/standards/rif-cs/registryObjects">
|
4 |
|
|
|
5 |
37863
|
alessia.ba
|
<xsl:output indent="yes"/>
|
6 |
48139
|
alessia.ba
|
|
7 |
|
|
<xsl:param name="parentDatasourceId"/>
|
8 |
|
|
|
9 |
37863
|
alessia.ba
|
<xsl:template match="/">
|
10 |
48963
|
claudio.at
|
<record>
|
11 |
48139
|
alessia.ba
|
|
12 |
37863
|
alessia.ba
|
<xsl:copy-of select=".//*[local-name()='header']"/>
|
13 |
48139
|
alessia.ba
|
|
14 |
37863
|
alessia.ba
|
<metadata>
|
15 |
|
|
<ROWS>
|
16 |
|
|
<xsl:for-each select="//ands:registryObject[@group='National Health and Medical Research Council']/ands:activity[@type='grant']">
|
17 |
|
|
<xsl:variable name="projectId" select="concat('nhmrc_______::', normalize-space(./ands:identifier[@type='nhmrc']))"/>
|
18 |
41478
|
claudio.at
|
<xsl:variable name="fundingId">
|
19 |
|
|
<xsl:choose>
|
20 |
|
|
<xsl:when test="string-length(./ands:description[@type='fundingScheme']) > 0">
|
21 |
|
|
<xsl:value-of select="concat('nhmrc_______::NHMRC::', normalize-space(./ands:description[@type='fundingScheme']))"/>
|
22 |
|
|
</xsl:when>
|
23 |
|
|
<xsl:otherwise>
|
24 |
|
|
<xsl:value-of select="string('nhmrc_______::NHMRC')"/>
|
25 |
|
|
</xsl:otherwise>
|
26 |
|
|
</xsl:choose>
|
27 |
|
|
</xsl:variable>
|
28 |
48139
|
alessia.ba
|
|
29 |
37863
|
alessia.ba
|
<ROW table="projects">
|
30 |
48139
|
alessia.ba
|
<FIELD name="_dnet_resource_identifier_">
|
31 |
|
|
<xsl:value-of select="$projectId"/>
|
32 |
|
|
</FIELD>
|
33 |
|
|
<FIELD name="id">
|
34 |
|
|
<xsl:value-of select="$projectId"/>
|
35 |
|
|
</FIELD>
|
36 |
|
|
<FIELD name="code">
|
37 |
|
|
<xsl:value-of select="normalize-space(.//ands:identifier[@type='nhmrc'])"/>
|
38 |
|
|
</FIELD>
|
39 |
|
|
<FIELD name="title">
|
40 |
|
|
<xsl:value-of select="./ands:name[@type='primary']/ands:namePart"/>
|
41 |
|
|
</FIELD>
|
42 |
|
|
<FIELD name="websiteurl">
|
43 |
|
|
<xsl:value-of select="./ands:identifier[@type='purl']"/>
|
44 |
|
|
</FIELD>
|
45 |
|
|
|
46 |
37863
|
alessia.ba
|
<xsl:for-each select="./ands:existenceDates/ands:startDate[@dateFormat='W3CDTF']">
|
47 |
48139
|
alessia.ba
|
<FIELD name="startdate" type="date" format="dd-MM-yyyy">
|
48 |
|
|
<xsl:value-of select="concat('01-01-', normalize-space(.))"/>
|
49 |
|
|
</FIELD>
|
50 |
37863
|
alessia.ba
|
</xsl:for-each>
|
51 |
|
|
<xsl:for-each select="./ands:existenceDates/ands:endDate[@dateFormat='W3CDTF']">
|
52 |
48139
|
alessia.ba
|
<FIELD name="enddate" type="date" format="dd-MM-yyyy">
|
53 |
|
|
<xsl:value-of select="concat('31-12-', normalize-space(.))"/>
|
54 |
|
|
</FIELD>
|
55 |
37863
|
alessia.ba
|
</xsl:for-each>
|
56 |
48139
|
alessia.ba
|
|
57 |
37863
|
alessia.ba
|
<xsl:variable name="keywords">
|
58 |
|
|
<xsl:for-each select="./ands:subject[@type='local']">
|
59 |
48139
|
alessia.ba
|
<xsl:if test="position() != 1">,</xsl:if>
|
60 |
37863
|
alessia.ba
|
<xsl:value-of select="."/>
|
61 |
|
|
</xsl:for-each>
|
62 |
|
|
</xsl:variable>
|
63 |
48139
|
alessia.ba
|
<FIELD name="keywords">
|
64 |
|
|
<xsl:value-of select="normalize-space($keywords)"/>
|
65 |
|
|
</FIELD>
|
66 |
|
|
<FIELD name="collectedfrom">
|
67 |
|
|
<xsl:value-of select="$parentDatasourceId"/>
|
68 |
|
|
</FIELD>
|
69 |
37863
|
alessia.ba
|
<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD>
|
70 |
|
|
<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD>
|
71 |
|
|
</ROW>
|
72 |
48139
|
alessia.ba
|
|
73 |
37863
|
alessia.ba
|
<ROW table="project_fundingpath">
|
74 |
48139
|
alessia.ba
|
<FIELD name="_dnet_resource_identifier_">
|
75 |
|
|
<xsl:value-of select="concat($fundingId, '@@', $projectId)"/>
|
76 |
|
|
</FIELD>
|
77 |
|
|
<FIELD name="funding">
|
78 |
|
|
<xsl:value-of select="$fundingId"/>
|
79 |
|
|
</FIELD>
|
80 |
|
|
<FIELD name="project">
|
81 |
|
|
<xsl:value-of select="$projectId"/>
|
82 |
|
|
</FIELD>
|
83 |
37863
|
alessia.ba
|
<xsl:for-each select="./ands:existenceDates/ands:startDate[@dateFormat='W3CDTF']">
|
84 |
48139
|
alessia.ba
|
<FIELD name="startdate" type="date" format="dd-MM-yyyy">
|
85 |
|
|
<xsl:value-of select="concat('01-01-', normalize-space(.))"/>
|
86 |
|
|
</FIELD>
|
87 |
37863
|
alessia.ba
|
</xsl:for-each>
|
88 |
|
|
<xsl:for-each select="./ands:existenceDates/ands:endDate[@dateFormat='W3CDTF']">
|
89 |
48139
|
alessia.ba
|
<FIELD name="enddate" type="date" format="dd-MM-yyyy">
|
90 |
|
|
<xsl:value-of select="concat('31-12-', normalize-space(.))"/>
|
91 |
|
|
</FIELD>
|
92 |
37863
|
alessia.ba
|
</xsl:for-each>
|
93 |
|
|
</ROW>
|
94 |
48139
|
alessia.ba
|
|
95 |
37863
|
alessia.ba
|
</xsl:for-each>
|
96 |
|
|
</ROWS>
|
97 |
|
|
</metadata>
|
98 |
|
|
</record>
|
99 |
|
|
</xsl:template>
|
100 |
|
|
</xsl:stylesheet>
|