1 |
29214
|
jochen.sch
|
<RESOURCE_PROFILE>
|
2 |
|
|
<HEADER>
|
3 |
48213
|
alessia.ba
|
<RESOURCE_IDENTIFIER value="42569418-ac28-4e77-a38f-78b168def51a_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
|
4 |
29214
|
jochen.sch
|
<RESOURCE_TYPE value="TransformationRuleDSResourceType"/>
|
5 |
|
|
<RESOURCE_KIND value="TransformationRuleDSResources"/>
|
6 |
|
|
<RESOURCE_URI value=""/>
|
7 |
48213
|
alessia.ba
|
<DATE_OF_CREATION value="2017-06-30T17:01:32+02:00"/>
|
8 |
29214
|
jochen.sch
|
</HEADER>
|
9 |
|
|
<BODY>
|
10 |
|
|
<CONFIGURATION>
|
11 |
|
|
<IMPORTED/>
|
12 |
|
|
<SCRIPT>
|
13 |
48213
|
alessia.ba
|
<TITLE>claims_datacite_2_ODF</TITLE>
|
14 |
29214
|
jochen.sch
|
<CODE><![CDATA[
|
15 |
42824
|
alessia.ba
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
|
16 |
|
|
xmlns:oai="http://www.openarchives.org/OAI/2.0/" xmlns:oaf="http://namespace.openaire.eu/oaf"
|
17 |
|
|
xmlns:dri="http://www.driver-repository.eu/namespace/dri"
|
18 |
|
|
xmlns:dr="http://www.driver-repository.eu/namespace/dr"
|
19 |
|
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
20 |
|
|
xmlns:date="http://exslt.org/dates-and-times" extension-element-prefixes="date"
|
21 |
|
|
exclude-result-prefixes="xsl">
|
22 |
|
|
|
23 |
|
|
<xsl:output indent="yes"/>
|
24 |
|
|
|
25 |
48282
|
alessia.ba
|
<xsl:template match="/">
|
26 |
|
|
<xsl:choose>
|
27 |
|
|
<xsl:when test="string-length(//*[local-name() ='objIdentifier']) = 46 and matches(//*[local-name() ='objIdentifier'], '\w{12}')">
|
28 |
|
|
<xsl:call-template name="createRecord"/>
|
29 |
|
|
</xsl:when>
|
30 |
|
|
<xsl:otherwise>
|
31 |
|
|
<xsl:call-template name="skipRecord"/>
|
32 |
|
|
</xsl:otherwise>
|
33 |
|
|
</xsl:choose>
|
34 |
|
|
|
35 |
42824
|
alessia.ba
|
</xsl:template>
|
36 |
|
|
|
37 |
48282
|
alessia.ba
|
<xsl:template name="skipRecord">
|
38 |
|
|
<oai:record>
|
39 |
|
|
<oai:header>
|
40 |
|
|
<xsl:copy-of select="//*[local-name() = 'header']/dri:dateOfCollection"
|
41 |
|
|
copy-namespaces="no"/>
|
42 |
|
|
<xsl:copy-of select="//*[local-name() = 'header']/oaf:datasourceprefix"
|
43 |
|
|
copy-namespaces="no"/>
|
44 |
|
|
<dri:recordIdentifier>
|
45 |
|
|
<xsl:value-of select="//*[local-name() = 'header']/dri:objIdentifier"/>
|
46 |
|
|
</dri:recordIdentifier>
|
47 |
|
|
<dr:dateOfTransformation>
|
48 |
|
|
<xsl:value-of select="date:date-time()"/>
|
49 |
|
|
</dr:dateOfTransformation>
|
50 |
|
|
</oai:header>
|
51 |
|
|
<oai:metadata>
|
52 |
|
|
<xsl:copy-of select="//*[local-name() = 'metadata']/*"/>
|
53 |
|
|
</oai:metadata>
|
54 |
|
|
</oai:record>
|
55 |
|
|
</xsl:template>
|
56 |
|
|
|
57 |
42824
|
alessia.ba
|
<xsl:template name="createRecord">
|
58 |
|
|
<oai:record>
|
59 |
|
|
<oai:header>
|
60 |
48213
|
alessia.ba
|
<xsl:copy-of select="//*[local-name() = 'header']/dri:recordIdentifier" copy-namespaces="no"/>
|
61 |
|
|
<xsl:copy-of select="//*[local-name() = 'header']/dri:dateOfCollection" copy-namespaces="no"/>
|
62 |
|
|
<xsl:copy-of select="//*[local-name() = 'header']/oaf:datasourceprefix" copy-namespaces="no"/>
|
63 |
|
|
<dri:objIdentifier><xsl:value-of select="//*[local-name() = 'header']/*[local-name() ='objIdentifier']"/></dri:objIdentifier>
|
64 |
42824
|
alessia.ba
|
<dr:dateOfTransformation>
|
65 |
|
|
<xsl:value-of select="date:date-time()"/>
|
66 |
|
|
</dr:dateOfTransformation>
|
67 |
|
|
</oai:header>
|
68 |
|
|
<oai:metadata>
|
69 |
|
|
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
70 |
|
|
xsi:schemaLocation="http://datacite.org/schema/kernel-3 http://schema.datacite.org/meta/kernel-3/metadata.xsd"
|
71 |
|
|
xmlns="http://datacite.org/schema/kernel-3">
|
72 |
|
|
<identifier identifierType="URL">
|
73 |
48213
|
alessia.ba
|
<xsl:value-of select="//metadata/data/id"/>
|
74 |
42824
|
alessia.ba
|
</identifier>
|
75 |
|
|
<alternateIdentifiers>
|
76 |
48213
|
alessia.ba
|
<alternateIdentifier alternateIdentifierType="doi">
|
77 |
|
|
<xsl:value-of select="//metadata/data/attributes/doi"/>
|
78 |
42824
|
alessia.ba
|
</alternateIdentifier>
|
79 |
|
|
</alternateIdentifiers>
|
80 |
|
|
<creators>
|
81 |
48213
|
alessia.ba
|
<xsl:for-each select="//metadata/data/attributes/author">
|
82 |
42824
|
alessia.ba
|
<creator>
|
83 |
48213
|
alessia.ba
|
<creatorName><xsl:value-of select="concat(./family, ', ', ./given)"/></creatorName>
|
84 |
42824
|
alessia.ba
|
</creator>
|
85 |
|
|
</xsl:for-each>
|
86 |
|
|
</creators>
|
87 |
|
|
<titles>
|
88 |
48213
|
alessia.ba
|
<xsl:for-each select="//metadata/data/attributes/title">
|
89 |
42824
|
alessia.ba
|
<title><xsl:value-of select="./text()"/></title>
|
90 |
|
|
</xsl:for-each>
|
91 |
|
|
</titles>
|
92 |
48213
|
alessia.ba
|
<publisher><xsl:value-of select="//metadata/data/attributes/container-title"/></publisher>
|
93 |
42824
|
alessia.ba
|
<dates>
|
94 |
48213
|
alessia.ba
|
<date dateType="Accepted"><xsl:value-of select="//metadata/data/attributes/deposited"/></date>
|
95 |
42824
|
alessia.ba
|
</dates>
|
96 |
|
|
<resourceType resourceTypeGeneral="Dataset">dataset</resourceType>
|
97 |
|
|
<!-- No description for now -->
|
98 |
48213
|
alessia.ba
|
<descriptions>
|
99 |
|
|
<xsl:for-each select="//metadata/data/attributes/description">
|
100 |
|
|
<description descriptionType="Abstract"><xsl:value-of select="./text()"/></description>
|
101 |
|
|
</xsl:for-each>
|
102 |
|
|
</descriptions>
|
103 |
42824
|
alessia.ba
|
</resource>
|
104 |
48213
|
alessia.ba
|
<oaf:accessrights>
|
105 |
|
|
<xsl:choose>
|
106 |
|
|
<xsl:when test="//*[local-name() = 'metadata']/oaf:accessrights/text() != ''"><xsl:value-of select="//*[local-name() = 'metadata']/oaf:accessrights/text()"/></xsl:when>
|
107 |
|
|
<xsl:otherwise><xsl:value-of select="string('UNKNOWN')"/></xsl:otherwise>
|
108 |
|
|
</xsl:choose>
|
109 |
|
|
</oaf:accessrights>
|
110 |
|
|
<dr:CobjCategory>0021</dr:CobjCategory>
|
111 |
42824
|
alessia.ba
|
<xsl:copy-of select="//*[local-name() = 'metadata']/oaf:*" copy-namespaces="no"></xsl:copy-of>
|
112 |
|
|
</oai:metadata>
|
113 |
|
|
<xsl:copy-of select="//*[local-name() = 'about']" copy-namespaces="no"/>
|
114 |
|
|
</oai:record>
|
115 |
|
|
</xsl:template>
|
116 |
|
|
</xsl:stylesheet>
|
117 |
29214
|
jochen.sch
|
]]></CODE>
|
118 |
|
|
</SCRIPT>
|
119 |
|
|
</CONFIGURATION>
|
120 |
|
|
<STATUS/>
|
121 |
|
|
<SECURITY_PARAMETERS/>
|
122 |
|
|
</BODY>
|
123 |
|
|
</RESOURCE_PROFILE>
|