1 |
26600
|
sandro.lab
|
<RESOURCE_PROFILE>
|
2 |
42494
|
alessia.ba
|
<HEADER>
|
3 |
60350
|
alessia.ba
|
<RESOURCE_IDENTIFIER value="8ce2f97e-3b38-4a0f-ad2d-f27b87c8b044_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
|
4 |
42494
|
alessia.ba
|
<RESOURCE_TYPE value="TransformationRuleDSResourceType"/>
|
5 |
|
|
<RESOURCE_KIND value="TransformationRuleDSResources"/>
|
6 |
|
|
<RESOURCE_URI value=""/>
|
7 |
60350
|
alessia.ba
|
<DATE_OF_CREATION value="2021-01-28T08:33:04+00:00"/>
|
8 |
42494
|
alessia.ba
|
</HEADER>
|
9 |
|
|
<BODY>
|
10 |
|
|
<CONFIGURATION>
|
11 |
|
|
<IMPORTED/>
|
12 |
|
|
<SCRIPT>
|
13 |
60350
|
alessia.ba
|
<TITLE>xslt_dcat-euODP_2odf</TITLE>
|
14 |
42549
|
alessia.ba
|
<CODE>
|
15 |
60350
|
alessia.ba
|
|
16 |
|
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
17 |
|
|
xmlns:date="http://exslt.org/dates-and-times" xmlns:oaf="http://namespace.openaire.eu/oaf"
|
18 |
|
|
xmlns:oai="http://www.openarchives.org/OAI/2.0/" xmlns:dri="http://www.driver-repository.eu/namespace/dri"
|
19 |
|
|
xmlns:dr="http://www.driver-repository.eu/namespace/dr" exclude-result-prefixes="xsl"
|
20 |
|
|
extension-element-prefixes="date" version="2.0">
|
21 |
|
|
|
22 |
48816
|
alessia.ba
|
<xsl:output indent="yes"/>
|
23 |
|
|
<xsl:param name="varOfficialName"/>
|
24 |
|
|
<xsl:param name="varDataSourceId"/>
|
25 |
|
|
<xsl:param name="quote">"</xsl:param>
|
26 |
60350
|
alessia.ba
|
|
27 |
48816
|
alessia.ba
|
<xsl:template match="/">
|
28 |
|
|
<xsl:call-template name="createRecord"/>
|
29 |
|
|
</xsl:template>
|
30 |
60350
|
alessia.ba
|
|
31 |
48816
|
alessia.ba
|
<xsl:template name="createRecord">
|
32 |
60350
|
alessia.ba
|
<xsl:variable name="datasetURI" select="//*[local-name()='dataset']/*[local-name()='uri']"/>
|
33 |
48816
|
alessia.ba
|
<oai:record>
|
34 |
|
|
<oai:header>
|
35 |
|
|
<xsl:copy-of copy-namespaces="no" select="//*[local-name() = 'header']/*"/>
|
36 |
|
|
<dr:dateOfTransformation>
|
37 |
|
|
<xsl:value-of select="date:date-time()"/>
|
38 |
|
|
</dr:dateOfTransformation>
|
39 |
|
|
</oai:header>
|
40 |
|
|
<oai:metadata>
|
41 |
60350
|
alessia.ba
|
<datacite:resource xmlns:datacite="http://datacite.org/schema/kernel-4"
|
42 |
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
43 |
|
|
xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4/metadata.xsd">
|
44 |
|
|
<datacite:identifier identifierType="URL">
|
45 |
|
|
<xsl:value-of select="$datasetURI"/>
|
46 |
|
|
</datacite:identifier>
|
47 |
|
|
<datacite:creators/>
|
48 |
|
|
<datacite:titles>
|
49 |
|
|
<xsl:for-each select="//oai:metadata/*[local-name()='dataset']/*[local-name()='title_dcterms']">
|
50 |
|
|
<xsl:if test="(string-length(./value_or_uri) > 0)">
|
51 |
|
|
<datacite:title xml:lang="{./lang}">
|
52 |
|
|
<xsl:value-of select="./value_or_uri"/>
|
53 |
|
|
</datacite:title>
|
54 |
|
|
</xsl:if>
|
55 |
|
|
</xsl:for-each>
|
56 |
|
|
</datacite:titles>
|
57 |
|
|
<datacite:publisher>
|
58 |
|
|
<xsl:value-of select="tokenize(//oai:metadata/*[local-name()='dataset']/*[local-name()='publisher_dcterms']/*[local-name()='uri'], '/')[last()]"
|
59 |
|
|
/>
|
60 |
|
|
</datacite:publisher>
|
61 |
|
|
<datacite:publicationYear>
|
62 |
|
|
<xsl:value-of
|
63 |
|
|
select="tokenize(//oai:metadata/*[local-name()='dataset']/*[local-name()='issued_dcterms']/*[local-name()='value_or_uri'], '-')[1]"/>
|
64 |
|
|
</datacite:publicationYear>
|
65 |
|
|
<datacite:dates>
|
66 |
|
|
<datacite:date dateType="Issued">
|
67 |
|
|
<xsl:value-of select="//oai:metadata/*[local-name()='dataset']/*[local-name()='issued_dcterms']/*[local-name()='value_or_uri']"/>
|
68 |
|
|
</datacite:date>
|
69 |
|
|
</datacite:dates>
|
70 |
|
|
<datacite:resourceType resourceTypeGeneral="Dataset">Dataset</datacite:resourceType>
|
71 |
|
|
<datacite:descriptions>
|
72 |
|
|
<xsl:for-each select="//oai:metadata/*[local-name()='dataset']/*[local-name()='description_dcterms']">
|
73 |
|
|
<xsl:if test="string-length(./value_or_uri) > 0">
|
74 |
|
|
<datacite:description descriptionType="Abstract" xml:lang="{./lang}">
|
75 |
|
|
<xsl:value-of select="./value_or_uri"/>
|
76 |
|
|
</datacite:description>
|
77 |
|
|
</xsl:if>
|
78 |
|
|
</xsl:for-each>
|
79 |
|
|
</datacite:descriptions>
|
80 |
|
|
|
81 |
|
|
<datacite:subjects>
|
82 |
|
|
<xsl:for-each select="//oai:metadata/*[local-name()='dataset']/*[local-name()='keyword_dcat']/*[local-name()='value_or_uri']">
|
83 |
|
|
<datacite:subject>
|
84 |
58509
|
alessia.ba
|
<xsl:value-of select="."/>
|
85 |
60350
|
alessia.ba
|
</datacite:subject>
|
86 |
|
|
</xsl:for-each>
|
87 |
|
|
<xsl:for-each select="//oai:metadata/*[local-name()='dataset']/*[local-name()='theme_dcat']/*[local-name()='uri']">
|
88 |
|
|
<xsl:if
|
89 |
|
|
test="starts-with(., 'http://publications.europa.eu/resource/authority/data-theme')">
|
90 |
|
|
<datacite:subject classid="eu-data-theme" classname="EU Data Theme"
|
91 |
|
|
schemeid="dnet:subject_classification_typologies"
|
92 |
|
|
schemename="dnet:subject_classification_typologies">
|
93 |
|
|
<xsl:value-of select="."/>
|
94 |
|
|
</datacite:subject>
|
95 |
|
|
</xsl:if>
|
96 |
|
|
</xsl:for-each>
|
97 |
|
|
<xsl:for-each select="//oai:metadata/*[local-name()='dataset']/*[local-name()='subject_dcterms']/*[local-name()='uri']">
|
98 |
|
|
<xsl:if test="starts-with(., 'http://eurovoc.europa.eu/')">
|
99 |
|
|
<datacite:subject classid="eurovoc" classname="EuroVoc"
|
100 |
|
|
schemeid="dnet:subject_classification_typologies"
|
101 |
|
|
schemename="dnet:subject_classification_typologies">
|
102 |
|
|
<xsl:value-of select="."/>
|
103 |
|
|
</datacite:subject>
|
104 |
|
|
</xsl:if>
|
105 |
|
|
</xsl:for-each>
|
106 |
|
|
</datacite:subjects>
|
107 |
|
|
<datacite:formats>
|
108 |
|
|
<xsl:for-each select="//oai:metadata/*[local-name()='dataset']/*[local-name()='distribution_dcat']//*[local-name()='format_dcterms']/*[local-name()='uri']">
|
109 |
|
|
<datacite:format>
|
110 |
|
|
<xsl:value-of select="."/>
|
111 |
|
|
</datacite:format>
|
112 |
|
|
</xsl:for-each>
|
113 |
|
|
</datacite:formats>
|
114 |
58509
|
alessia.ba
|
|
115 |
60350
|
alessia.ba
|
<datacite:geoLocations>
|
116 |
|
|
<xsl:for-each select="//oai:metadata/*[local-name()='dataset']/*[local-name()='spatial_dcterms']/*[local-name()='uri']">
|
117 |
|
|
<datacite:geoLocation>
|
118 |
|
|
<datacite:geoLocationPlace><xsl:value-of select="."/></datacite:geoLocationPlace>
|
119 |
|
|
</datacite:geoLocation>
|
120 |
58509
|
alessia.ba
|
</xsl:for-each>
|
121 |
60350
|
alessia.ba
|
</datacite:geoLocations>
|
122 |
|
|
</datacite:resource>
|
123 |
60352
|
alessia.ba
|
<oaf:identifier identifierType="data.europa.eu"><xsl:value-of select="$datasetURI"/></oaf:identifier>
|
124 |
60350
|
alessia.ba
|
<oaf:country>EU</oaf:country>
|
125 |
55095
|
miriam.bag
|
<oaf:accessrights>OPEN</oaf:accessrights>
|
126 |
60350
|
alessia.ba
|
<dr:CobjCategory type="dataset">0021</dr:CobjCategory>
|
127 |
55095
|
miriam.bag
|
<oaf:dateAccepted>
|
128 |
60350
|
alessia.ba
|
<xsl:value-of select="//oai:metadata/*[local-name()='dataset']/*[local-name()='issued_dcterms']/*[local-name()='value_or_uri']"/>
|
129 |
58313
|
alessia.ba
|
</oaf:dateAccepted>
|
130 |
55095
|
miriam.bag
|
<oaf:hostedBy>
|
131 |
|
|
<xsl:attribute name="name">
|
132 |
|
|
<xsl:value-of select="$varOfficialName"/>
|
133 |
|
|
</xsl:attribute>
|
134 |
|
|
<xsl:attribute name="id">
|
135 |
|
|
<xsl:value-of select="$varDataSourceId"/>
|
136 |
|
|
</xsl:attribute>
|
137 |
|
|
</oaf:hostedBy>
|
138 |
|
|
<oaf:collectedFrom>
|
139 |
|
|
<xsl:attribute name="name">
|
140 |
|
|
<xsl:value-of select="$varOfficialName"/>
|
141 |
|
|
</xsl:attribute>
|
142 |
|
|
<xsl:attribute name="id">
|
143 |
|
|
<xsl:value-of select="$varDataSourceId"/>
|
144 |
|
|
</xsl:attribute>
|
145 |
|
|
</oaf:collectedFrom>
|
146 |
60350
|
alessia.ba
|
<xsl:for-each select="//oai:metadata/*[local-name()='dataset']/*[local-name()='distribution_dcat']//*[local-name()='license_dcterms']/*[local-name()='uri']">
|
147 |
|
|
<oaf:license><xsl:value-of select="tokenize(., '/')[last()]"/></oaf:license>
|
148 |
|
|
</xsl:for-each>
|
149 |
|
|
|
150 |
|
|
<xsl:for-each select="//oai:metadata/*[local-name()='dataset']/*[local-name()='language_dcterms']/*[local-name()='uri']">
|
151 |
|
|
<oaf:language>
|
152 |
|
|
<xsl:value-of
|
153 |
|
|
select="tokenize(., '/')[last()]"
|
154 |
|
|
/>
|
155 |
|
|
</oaf:language>
|
156 |
|
|
</xsl:for-each>
|
157 |
48816
|
alessia.ba
|
</oai:metadata>
|
158 |
|
|
<xsl:copy-of select="//*[local-name() = 'about']"/>
|
159 |
|
|
</oai:record>
|
160 |
|
|
</xsl:template>
|
161 |
|
|
</xsl:stylesheet>
|
162 |
60350
|
alessia.ba
|
|
163 |
48816
|
alessia.ba
|
</CODE>
|
164 |
42494
|
alessia.ba
|
</SCRIPT>
|
165 |
|
|
</CONFIGURATION>
|
166 |
|
|
<STATUS/>
|
167 |
|
|
<SECURITY_PARAMETERS/>
|
168 |
|
|
</BODY>
|
169 |
48816
|
alessia.ba
|
</RESOURCE_PROFILE>
|