Revision 61320
Added by Michele Artini almost 3 years ago
pmf2oaidc.xml | ||
---|---|---|
1 | 1 |
<RESOURCE_PROFILE> |
2 |
<HEADER> |
|
3 |
<RESOURCE_IDENTIFIER |
|
4 |
value="23ecba9f-f152-498e-b639-2ac8022865be_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU=" /> |
|
5 |
<RESOURCE_TYPE value="TransformationRuleDSResourceType" /> |
|
6 |
<RESOURCE_KIND value="TransformationRuleDSResources" /> |
|
7 |
<RESOURCE_URI value="" /> |
|
8 |
<DATE_OF_CREATION value="2019-09-06T12:45:47+00:00" /> |
|
9 |
</HEADER> |
|
10 |
<BODY> |
|
11 |
<CONFIGURATION> |
|
12 |
<SOURCE_METADATA_FORMAT interpretation="final" |
|
13 |
layout="oai" name="native" /> |
|
14 |
<SINK_METADATA_FORMAT name="oai_dc" /> |
|
15 |
<IMPORTED /> |
|
16 |
<SCRIPT> |
|
17 |
<TITLE>native to OAI_DC</TITLE> |
|
18 |
<CODE> |
|
19 |
<xsl:stylesheet version="2.0" |
|
20 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
21 |
xmlns:dnet="eu.dnetlib.data.utils.XsltFunctions" |
|
22 |
xmlns:oai="http://www.openarchives.org/OAI/2.0/" |
|
23 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
24 |
|
|
25 |
exclude-result-prefixes="xsl dnet oai"> |
|
26 |
|
|
27 |
<xsl:output method="xml" encoding="UTF-8" |
|
28 |
omit-xml-declaration="yes" /> |
|
29 |
|
|
30 |
<xsl:template match="/"> |
|
31 |
|
|
32 |
<xsl:for-each select="//record"> |
|
33 |
<oai_dc:dc |
|
34 |
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" |
|
35 |
xmlns:dc="http://purl.org/dc/elements/1.1/" |
|
36 |
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd"> |
|
37 |
|
|
38 |
<xsl:variable name="bestRights" select="./bestRights" /> |
|
39 |
<xsl:variable name="type" select="./type" /> |
|
40 |
|
|
41 |
<dc:title> |
|
42 |
<xsl:value-of select="./title" /> |
|
43 |
</dc:title> |
|
44 |
<xsl:for-each select="./creators/creator"> |
|
45 |
<dc:creator> |
|
46 |
<xsl:value-of select="." /> |
|
47 |
</dc:creator> |
|
48 |
</xsl:for-each> |
|
49 |
<xsl:for-each select="./contributors/contributor"> |
|
50 |
<dc:contributor> |
|
51 |
<xsl:value-of select="." /> |
|
52 |
</dc:contributor> |
|
53 |
</xsl:for-each> |
|
54 |
<dc:publisher> |
|
55 |
<xsl:value-of select="./publisher" /> |
|
56 |
</dc:publisher> |
|
57 |
<dc:description> |
|
58 |
<xsl:value-of select="./abstract" /> |
|
59 |
</dc:description> |
|
60 |
<xsl:for-each select="./source"> |
|
61 |
<dc:source> |
|
62 |
<xsl:value-of select="." /> |
|
63 |
</dc:source> |
|
64 |
</xsl:for-each> |
|
65 |
<xsl:for-each select="./subjects/subject"> |
|
66 |
<dc:subject> |
|
67 |
<xsl:value-of select="." /> |
|
68 |
</dc:subject> |
|
69 |
</xsl:for-each> |
|
70 |
<dc:date> |
|
71 |
<xsl:value-of select="./date" /> |
|
72 |
</dc:date> |
|
73 |
<dc:language> |
|
74 |
<xsl:value-of select="./language" /> |
|
75 |
</dc:language> |
|
76 |
|
|
77 |
<dc:type> |
|
78 |
<xsl:choose> |
|
79 |
<xsl:when test="$type = 'Conference article'">http://purl.org/coar/resource_type/c_5794</xsl:when> |
|
80 |
<xsl:when test="$type = 'Journal article'">http://purl.org/coar/resource_type/c_6501</xsl:when> |
|
81 |
<xsl:when test="$type = 'Report'">http://purl.org/coar/resource_type/c_93fc</xsl:when> |
|
82 |
<xsl:when test="$type = 'Contribution to journal'">http://purl.org/coar/resource_type/c_3e5a</xsl:when> |
|
83 |
<xsl:when test="$type = 'Contribution to conference'">http://purl.org/coar/resource_type/c_c94f</xsl:when> |
|
84 |
<xsl:when test="$type = 'Book'">http://purl.org/coar/resource_type/c_2f33</xsl:when> |
|
85 |
<xsl:when test="$type = 'Contribution to book'">http://purl.org/coar/resource_type/c_3248</xsl:when> |
|
86 |
<xsl:when test="$type = 'Part of book or chapter of book'">http://purl.org/coar/resource_type/c_3248</xsl:when> |
|
87 |
<xsl:when test="$type = 'Master thesis'">http://purl.org/coar/resource_type/c_bdcc</xsl:when> |
|
88 |
<xsl:when test="$type = 'Bachelor thesis'">http://purl.org/coar/resource_type/c_7a1f</xsl:when> |
|
89 |
<xsl:when test="$type = 'Doctoral thesis'">http://purl.org/coar/resource_type/c_db06</xsl:when> |
|
90 |
<xsl:when test="$type = 'Patent'">http://purl.org/coar/resource_type/c_15cd</xsl:when> |
|
91 |
<xsl:when test="$type = 'Software'">http://purl.org/coar/resource_type/c_5ce6</xsl:when> |
|
92 |
<xsl:when test="$type = 'Dataset'">http://purl.org/coar/resource_type/c_ddb1</xsl:when> |
|
93 |
<xsl:when test="$type = 'Other'">http://purl.org/coar/resource_type/c_1843</xsl:when> |
|
94 |
<xsl:otherwise>http://purl.org/coar/resource_type/c_1843</xsl:otherwise> |
|
95 |
</xsl:choose> |
|
96 |
</dc:type> |
|
97 |
<dc:type> |
|
98 |
<xsl:choose> |
|
99 |
<xsl:when test="$type = 'Conference article'">info:eu-repo/semantics/article</xsl:when> |
|
100 |
<xsl:when test="$type = 'Journal article'">info:eu-repo/semantics/article</xsl:when> |
|
101 |
<xsl:when test="$type = 'Report'">info:eu-repo/semantics/report</xsl:when> |
|
102 |
<xsl:when test="$type = 'Contribution to journal'">info:eu-repo/semantics/contributionToPeriodical</xsl:when> |
|
103 |
<xsl:when test="$type = 'Contribution to conference'">info:eu-repo/semantics/conferenceObject</xsl:when> |
|
104 |
<xsl:when test="$type = 'Book'">info:eu-repo/semantics/book</xsl:when> |
|
105 |
<xsl:when test="$type = 'Contribution to book'">info:eu-repo/semantics/bookPart</xsl:when> |
|
106 |
<xsl:when test="$type = 'Part of book or chapter of book'">info:eu-repo/semantics/bookPart</xsl:when> |
|
107 |
<xsl:when test="$type = 'Master thesis'">info:eu-repo/semantics/masterThesis</xsl:when> |
|
108 |
<xsl:when test="$type = 'Bachelor thesis'">info:eu-repo/semantics/bachelorThesis</xsl:when> |
|
109 |
<xsl:when test="$type = 'Doctoral thesis'">info:eu-repo/semantics/doctoralThesis</xsl:when> |
|
110 |
<xsl:when test="$type = 'Patent'">info:eu-repo/semantics/patent</xsl:when> |
|
111 |
<xsl:when test="$type = 'Software'">info:eu-repo/semantics/other</xsl:when> |
|
112 |
<xsl:when test="$type = 'Dataset'">info:eu-repo/semantics/other</xsl:when> |
|
113 |
<xsl:when test="$type = 'Other'">info:eu-repo/semantics/other</xsl:when> |
|
114 |
<xsl:otherwise>info:eu-repo/semantics/other</xsl:otherwise> |
|
115 |
</xsl:choose> |
|
116 |
</dc:type> |
|
117 |
<dc:type> |
|
118 |
<xsl:value-of select="$type" /> |
|
119 |
</dc:type> |
|
120 |
<dc:rights> |
|
121 |
<xsl:choose> |
|
122 |
<xsl:when test="$bestRights = 'Closed Access'">info:eu-repo/semantics/closedAccess</xsl:when> |
|
123 |
<xsl:when test="$bestRights = 'Open Access'">info:eu-repo/semantics/openAccess</xsl:when> |
|
124 |
<xsl:when test="$bestRights = 'Restricted'">info:eu-repo/semantics/restrictedAccess</xsl:when> |
|
125 |
<xsl:otherwise>info:eu-repo/semantics/restrictedAccess</xsl:otherwise> <!-- IT SHOULD BE UNKNOWN --> |
|
126 |
</xsl:choose> |
|
127 |
</dc:rights> |
|
128 |
<dc:identifier> |
|
129 |
<xsl:value-of select="concat('https://openportal.isti.cnr.it/doc?id=people______::', dnet:md5(./identifier))" /> |
|
130 |
</dc:identifier> |
|
131 |
<!-- <dc:identifier> |
|
2 |
<HEADER> |
|
3 |
<RESOURCE_IDENTIFIER value="23ecba9f-f152-498e-b639-2ac8022865be_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/> |
|
4 |
<RESOURCE_TYPE value="TransformationRuleDSResourceType"/> |
|
5 |
<RESOURCE_KIND value="TransformationRuleDSResources"/> |
|
6 |
<RESOURCE_URI value=""/> |
|
7 |
<DATE_OF_CREATION value="2021-07-05T08:29:37+02:00"/> |
|
8 |
</HEADER> |
|
9 |
<BODY> |
|
10 |
<CONFIGURATION> |
|
11 |
<SOURCE_METADATA_FORMAT interpretation="final" layout="oai" name="native"/> |
|
12 |
<SINK_METADATA_FORMAT name="oai_dc"/> |
|
13 |
<IMPORTED/> |
|
14 |
<SCRIPT> |
|
15 |
<TITLE>native to OAI_DC</TITLE> |
|
16 |
<CODE> |
|
17 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dnet="eu.dnetlib.data.utils.XsltFunctions" xmlns:oai="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" exclude-result-prefixes="xsl dnet oai" version="2.0"> |
|
18 |
<xsl:output encoding="UTF-8" method="xml" omit-xml-declaration="yes"/> |
|
19 |
<xsl:template match="/"> |
|
20 |
<xsl:for-each select="//record"> |
|
21 |
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd"> |
|
22 |
<xsl:variable name="bestRights" select="./bestRights"/> |
|
23 |
<xsl:variable name="type" select="./type"/> |
|
24 |
<dc:title> |
|
25 |
<xsl:value-of select="./title"/> |
|
26 |
</dc:title> |
|
27 |
<xsl:for-each select="./creators/creator"> |
|
28 |
<dc:creator> |
|
29 |
<xsl:value-of select="."/> |
|
30 |
</dc:creator> |
|
31 |
</xsl:for-each> |
|
32 |
<xsl:for-each select="./contributors/contributor"> |
|
33 |
<dc:contributor> |
|
34 |
<xsl:value-of select="."/> |
|
35 |
</dc:contributor> |
|
36 |
</xsl:for-each> |
|
37 |
<dc:publisher> |
|
38 |
<xsl:value-of select="./publisher"/> |
|
39 |
</dc:publisher> |
|
40 |
<dc:description> |
|
41 |
<xsl:value-of select="./abstract"/> |
|
42 |
</dc:description> |
|
43 |
<xsl:for-each select="./source"> |
|
44 |
<dc:source> |
|
45 |
<xsl:value-of select="."/> |
|
46 |
</dc:source> |
|
47 |
</xsl:for-each> |
|
48 |
<xsl:for-each select="./subjects/subject"> |
|
49 |
<dc:subject> |
|
50 |
<xsl:value-of select="."/> |
|
51 |
</dc:subject> |
|
52 |
</xsl:for-each> |
|
53 |
<dc:date> |
|
54 |
<xsl:value-of select="./date"/> |
|
55 |
</dc:date> |
|
56 |
<dc:language> |
|
57 |
<xsl:value-of select="./language"/> |
|
58 |
</dc:language> |
|
59 |
<dc:type> |
|
60 |
<xsl:choose> |
|
61 |
<xsl:when test="$type = 'Conference article'">http://purl.org/coar/resource_type/c_5794</xsl:when> |
|
62 |
<xsl:when test="$type = 'Journal article'">http://purl.org/coar/resource_type/c_6501</xsl:when> |
|
63 |
<xsl:when test="$type = 'Report'">http://purl.org/coar/resource_type/c_93fc</xsl:when> |
|
64 |
<xsl:when test="$type = 'Contribution to journal'">http://purl.org/coar/resource_type/c_3e5a</xsl:when> |
|
65 |
<xsl:when test="$type = 'Contribution to conference'">http://purl.org/coar/resource_type/c_c94f</xsl:when> |
|
66 |
<xsl:when test="$type = 'Book'">http://purl.org/coar/resource_type/c_2f33</xsl:when> |
|
67 |
<xsl:when test="$type = 'Contribution to book'">http://purl.org/coar/resource_type/c_3248</xsl:when> |
|
68 |
<xsl:when test="$type = 'Master thesis'">http://purl.org/coar/resource_type/c_bdcc</xsl:when> |
|
69 |
<xsl:when test="$type = 'Bachelor thesis'">http://purl.org/coar/resource_type/c_7a1f</xsl:when> |
|
70 |
<xsl:when test="$type = 'Doctoral thesis'">http://purl.org/coar/resource_type/c_db06</xsl:when> |
|
71 |
<xsl:when test="$type = 'Patent'">http://purl.org/coar/resource_type/c_15cd</xsl:when> |
|
72 |
<xsl:when test="$type = 'Software'">http://purl.org/coar/resource_type/c_5ce6</xsl:when> |
|
73 |
<xsl:when test="$type = 'Dataset'">http://purl.org/coar/resource_type/c_ddb1</xsl:when> |
|
74 |
<xsl:when test="$type = 'Other'">http://purl.org/coar/resource_type/c_1843</xsl:when> |
|
75 |
<xsl:otherwise>http://purl.org/coar/resource_type/c_1843</xsl:otherwise> |
|
76 |
</xsl:choose> |
|
77 |
</dc:type> |
|
78 |
<dc:type> |
|
79 |
<xsl:choose> |
|
80 |
<xsl:when test="$type = 'Conference article'">info:eu-repo/semantics/article</xsl:when> |
|
81 |
<xsl:when test="$type = 'Journal article'">info:eu-repo/semantics/article</xsl:when> |
|
82 |
<xsl:when test="$type = 'Report'">info:eu-repo/semantics/report</xsl:when> |
|
83 |
<xsl:when test="$type = 'Contribution to journal'">info:eu-repo/semantics/contributionToPeriodical</xsl:when> |
|
84 |
<xsl:when test="$type = 'Contribution to conference'">info:eu-repo/semantics/conferenceObject</xsl:when> |
|
85 |
<xsl:when test="$type = 'Book'">info:eu-repo/semantics/book</xsl:when> |
|
86 |
<xsl:when test="$type = 'Contribution to book'">info:eu-repo/semantics/bookPart</xsl:when> |
|
87 |
<xsl:when test="$type = 'Master thesis'">info:eu-repo/semantics/masterThesis</xsl:when> |
|
88 |
<xsl:when test="$type = 'Bachelor thesis'">info:eu-repo/semantics/bachelorThesis</xsl:when> |
|
89 |
<xsl:when test="$type = 'Doctoral thesis'">info:eu-repo/semantics/doctoralThesis</xsl:when> |
|
90 |
<xsl:when test="$type = 'Patent'">info:eu-repo/semantics/patent</xsl:when> |
|
91 |
<xsl:when test="$type = 'Software'">info:eu-repo/semantics/other</xsl:when> |
|
92 |
<xsl:when test="$type = 'Dataset'">info:eu-repo/semantics/other</xsl:when> |
|
93 |
<xsl:when test="$type = 'Other'">info:eu-repo/semantics/other</xsl:when> |
|
94 |
<xsl:otherwise>info:eu-repo/semantics/other</xsl:otherwise> |
|
95 |
</xsl:choose> |
|
96 |
</dc:type> |
|
97 |
<dc:type> |
|
98 |
<xsl:value-of select="$type"/> |
|
99 |
</dc:type> |
|
100 |
<dc:rights> |
|
101 |
<xsl:choose> |
|
102 |
<xsl:when test="$bestRights = 'Closed Access'">info:eu-repo/semantics/closedAccess</xsl:when> |
|
103 |
<xsl:when test="$bestRights = 'Open Access'">info:eu-repo/semantics/openAccess</xsl:when> |
|
104 |
<xsl:when test="$bestRights = 'Restricted'">info:eu-repo/semantics/restrictedAccess</xsl:when> |
|
105 |
<xsl:otherwise>info:eu-repo/semantics/restrictedAccess</xsl:otherwise><!-- IT SHOULD BE UNKNOWN --> |
|
106 |
</xsl:choose> |
|
107 |
</dc:rights> |
|
108 |
<dc:identifier> |
|
109 |
<xsl:value-of select="concat('https://openportal.isti.cnr.it/doc?id=people______::', dnet:md5(./identifier))"/> |
|
110 |
</dc:identifier><!-- <dc:identifier> |
|
132 | 111 |
<xsl:value-of select="concat('people:',./identifier)" /> |
133 | 112 |
</dc:identifier> |
134 | 113 |
<xsl:for-each select="./urls/url[@rights = $bestRights]"> |
... | ... | |
136 | 115 |
<xsl:value-of select="." /> |
137 | 116 |
</dc:identifier> |
138 | 117 |
</xsl:for-each> --> |
139 |
<xsl:for-each select="./dois/doi"> |
|
140 |
<dc:identifier> |
|
141 |
<xsl:value-of select="concat('info:doi:',.)" /> |
|
142 |
</dc:identifier> |
|
143 |
</xsl:for-each> |
|
144 |
<xsl:for-each select="./projects/project"> |
|
145 |
<dc:relation> |
|
146 |
<xsl:value-of select="concat('info:eu-repo/grantAgreement/',./funder,'/',./program,'/',./code,'/',./jurisdiction,'/',./name,'/',./acronym)" /> |
|
147 |
</dc:relation> |
|
148 |
</xsl:for-each> |
|
149 |
</oai_dc:dc> |
|
150 |
</xsl:for-each> |
|
151 |
</xsl:template> |
|
152 |
</xsl:stylesheet> |
|
153 |
</CODE> |
|
154 |
</SCRIPT> |
|
155 |
</CONFIGURATION> |
|
156 |
<STATUS /> |
|
157 |
<SECURITY_PARAMETERS>SECURITY_PARAMETERS</SECURITY_PARAMETERS> |
|
158 |
</BODY> |
|
159 |
</RESOURCE_PROFILE> |
|
118 |
<xsl:for-each select="./dois/doi"> |
|
119 |
<dc:identifier> |
|
120 |
<xsl:value-of select="concat('info:doi:',.)"/> |
|
121 |
</dc:identifier> |
|
122 |
</xsl:for-each> |
|
123 |
<xsl:for-each select="./projects/project"> |
|
124 |
<dc:relation> |
|
125 |
<xsl:value-of select="concat('info:eu-repo/grantAgreement/',./funder,'/',./program,'/',./code,'/',./jurisdiction,'/',./name,'/',./acronym)"/> |
|
126 |
</dc:relation> |
|
127 |
</xsl:for-each> |
|
128 |
</oai_dc:dc> |
|
129 |
</xsl:for-each> |
|
130 |
</xsl:template> |
|
131 |
</xsl:stylesheet> |
|
132 |
</CODE> |
|
133 |
</SCRIPT> |
|
134 |
</CONFIGURATION> |
|
135 |
<STATUS/> |
|
136 |
<SECURITY_PARAMETERS>SECURITY_PARAMETERS</SECURITY_PARAMETERS> |
|
137 |
</BODY> |
|
138 |
</RESOURCE_PROFILE> |
Also available in: Unified diff
bookpart