1 |
37863
|
alessia.ba
|
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
|
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dr="http://www.driver-repository.eu/namespace/dr"
|
3 |
|
|
xmlns:dri="http://www.driver-repository.eu/namespace/dri" xmlns:oaa="http://namespace.openaire.eu/oaa" xmlns:oaf="http://namespace.openaire.eu/oaf" xmlns:fn="http://www.w3.org/2005/xpath-functions"
|
4 |
|
|
xmlns:ands="http://ands.org.au/standards/rif-cs/registryObjects">
|
5 |
|
|
|
6 |
|
|
<xsl:output indent="yes"/>
|
7 |
|
|
|
8 |
|
|
<xsl:param name="parentDatasourceId" />
|
9 |
|
|
|
10 |
|
|
<xsl:template match="/">
|
11 |
|
|
<record xmlns:dr="http://www.driver-repository.eu/namespace/dr"
|
12 |
|
|
xmlns:dri="http://www.driver-repository.eu/namespace/dri"
|
13 |
|
|
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
14 |
|
|
xmlns:oaf="http://namespace.openaire.eu/oaf" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/">
|
15 |
|
|
|
16 |
|
|
<xsl:copy-of select=".//*[local-name()='header']"/>
|
17 |
|
|
|
18 |
|
|
<metadata>
|
19 |
|
|
<ROWS>
|
20 |
|
|
<xsl:for-each select="//ands:registryObject[@group='National Health and Medical Research Council']/ands:activity[@type='grant']">
|
21 |
|
|
<xsl:variable name="projectId" select="concat('nhmrc_______::', normalize-space(./ands:identifier[@type='nhmrc']))"/>
|
22 |
|
|
<xsl:variable name="fundingId" select="concat('nhmrc_______::NHMRC::', normalize-space(./ands:description[@type='fundingScheme']))"/>
|
23 |
|
|
|
24 |
|
|
<ROW table="projects">
|
25 |
|
|
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="$projectId" /></FIELD>
|
26 |
|
|
<FIELD name="id"><xsl:value-of select="$projectId" /></FIELD>
|
27 |
|
|
<FIELD name="code"><xsl:value-of select="normalize-space(.//ands:identifier[@type='nhmrc'])" /></FIELD>
|
28 |
|
|
<FIELD name="title"><xsl:value-of select="./ands:name[@type='primary']/ands:namePart" /></FIELD>
|
29 |
|
|
<FIELD name="websiteurl"><xsl:value-of select="./ands:identifier[@type='purl']"/></FIELD>
|
30 |
|
|
|
31 |
|
|
<xsl:for-each select="./ands:existenceDates/ands:startDate[@dateFormat='W3CDTF']">
|
32 |
|
|
<FIELD name="startdate" type="date" format="dd-MM-yyyy"><xsl:value-of select="concat('01-01-', normalize-space(.))" /></FIELD>
|
33 |
|
|
</xsl:for-each>
|
34 |
|
|
<xsl:for-each select="./ands:existenceDates/ands:endDate[@dateFormat='W3CDTF']">
|
35 |
|
|
<FIELD name="enddate" type="date" format="dd-MM-yyyy"><xsl:value-of select="concat('31-12-', normalize-space(.))" /></FIELD>
|
36 |
|
|
</xsl:for-each>
|
37 |
|
|
|
38 |
|
|
<xsl:variable name="keywords">
|
39 |
|
|
<xsl:for-each select="./ands:subject[@type='local']">
|
40 |
|
|
<xsl:if test="position() != 1">, </xsl:if>
|
41 |
|
|
<xsl:value-of select="."/>
|
42 |
|
|
</xsl:for-each>
|
43 |
|
|
</xsl:variable>
|
44 |
|
|
<FIELD name="keywords"><xsl:value-of select="normalize-space($keywords)" /></FIELD>
|
45 |
|
|
<FIELD name="collectedfrom"><xsl:value-of select="$parentDatasourceId" /></FIELD>
|
46 |
|
|
<FIELD name="provenanceActionClass">sysimport:crosswalk:entityregistry</FIELD>
|
47 |
|
|
<FIELD name="provenanceActionScheme">dnet:provenanceActions</FIELD>
|
48 |
|
|
</ROW>
|
49 |
|
|
|
50 |
|
|
<ROW table="project_fundingpath">
|
51 |
|
|
<FIELD name="_dnet_resource_identifier_"><xsl:value-of select="concat($fundingId, '@@', $projectId)" /></FIELD>
|
52 |
|
|
<FIELD name="funding"><xsl:value-of select="$fundingId" /></FIELD>
|
53 |
|
|
<FIELD name="project"><xsl:value-of select="$projectId" /></FIELD>
|
54 |
|
|
<xsl:for-each select="./ands:existenceDates/ands:startDate[@dateFormat='W3CDTF']">
|
55 |
|
|
<FIELD name="startdate" type="date" format="dd-MM-yyyy"><xsl:value-of select="concat('01-01-', normalize-space(.))" /></FIELD>
|
56 |
|
|
</xsl:for-each>
|
57 |
|
|
<xsl:for-each select="./ands:existenceDates/ands:endDate[@dateFormat='W3CDTF']">
|
58 |
|
|
<FIELD name="enddate" type="date" format="dd-MM-yyyy"><xsl:value-of select="concat('31-12-', normalize-space(.))" /></FIELD>
|
59 |
|
|
</xsl:for-each>
|
60 |
|
|
</ROW>
|
61 |
|
|
|
62 |
|
|
</xsl:for-each>
|
63 |
|
|
</ROWS>
|
64 |
|
|
</metadata>
|
65 |
|
|
</record>
|
66 |
|
|
</xsl:template>
|
67 |
|
|
</xsl:stylesheet>
|