Revision 55102
Added by Alessia Bardi about 5 years ago
modules/dnet-openaireplus-profiles/trunk/src/main/resources/eu/dnetlib/test/profiles/TransformationRuleDSResources/TransformationRuleDSResourceType/claims/claims_openaire_2_OAF.xml | ||
---|---|---|
103 | 103 |
</xsl:template> |
104 | 104 |
|
105 | 105 |
<!-- Titles (M): based on title/@classname <dc:title>main title:subtitle</dc:title> |
106 |
<dc:title>alternative title</dc:title> <dc:title>translated title</dc:title> |
|
107 |
We have only "main title" for now: let's keep it simple here... --> |
|
106 |
<dc:title>alternative title</dc:title> <dc:title>translated title</dc:title> |
|
107 |
We have only "main title" for now: let's keep it simple here... |
|
108 |
--> |
|
108 | 109 |
<xsl:template match="//oaf:result/title"> |
109 | 110 |
<dc:title> |
110 | 111 |
<xsl:value-of select="normalize-space(./text())"/> |
... | ... | |
149 | 150 |
</xsl:template> |
150 | 151 |
|
151 | 152 |
<!-- |
152 |
Subjects (M w A) <dc:subject>bag of words</dc:subject> |
|
153 |
If subject@classname != keywords, then we have a classification scheme to encode |
|
154 |
<dc:subject>info:eu-repo/classification/[scheme]/[value]</dc:subject> |
|
155 |
<dc:subject>info:eu-repo/classification/dcc/whatever</dc:subject> |
|
153 |
Subjects (M w A) |
|
154 |
<dc:subject classid="thescheme" classname="theschemeName">value<dc:subject> |
|
155 |
<dc:subject classid="dcc" classname="dcc">I am the value<dc:subject> |
|
156 | 156 |
--> |
157 |
<xsl:template match="//oaf:result/subject[@classname = 'keyword']">
|
|
158 |
<dc:subject> |
|
157 |
<xsl:template match="//oaf:result/subject[not(@inferred)]">
|
|
158 |
<dc:subject classid="{./@classid}" classname="{./@classname}">
|
|
159 | 159 |
<xsl:value-of select="normalize-space(./text())"/> |
160 | 160 |
</dc:subject> |
161 | 161 |
</xsl:template> |
162 |
<xsl:template match="//oaf:result/subject[not(@classname = 'keyword') and @classid != '']"> |
|
163 |
<dc:subject> |
|
164 |
<xsl:value-of |
|
165 |
select="concat('info:eu-repo/classification/', @classid, '/', normalize-space(./text()))" |
|
166 |
/> |
|
167 |
</dc:subject> |
|
168 |
</xsl:template> |
|
169 | 162 |
|
170 | 163 |
<!--description (M w A) from description --> |
171 | 164 |
<xsl:template match="//oaf:result/description/text()"> |
... | ... | |
235 | 228 |
<oaf:dateAccepted> |
236 | 229 |
<xsl:value-of select="//oaf:result/dateofacceptance/text()"/> |
237 | 230 |
</oaf:dateAccepted> |
238 |
<oaf:accessrights> |
|
239 |
<xsl:value-of select="//oaf:result/bestaccessright/@classid"/> |
|
240 |
</oaf:accessrights> |
|
231 |
<xsl:if test="//oaf:result/bestlicense/@classid"> |
|
232 |
<oaf:accessrights> |
|
233 |
<xsl:value-of select="//oaf:result/bestlicense/@classid"/> |
|
234 |
</oaf:accessrights> |
|
235 |
</xsl:if> |
|
236 |
<xsl:if test="//oaf:result/bestaccessright/@classid"> |
|
237 |
<oaf:accessrights> |
|
238 |
<xsl:value-of select="//oaf:result/bestaccessright/@classid"/> |
|
239 |
</oaf:accessrights> |
|
240 |
</xsl:if> |
|
241 | 241 |
<oaf:language> |
242 | 242 |
<xsl:value-of select="//oaf:result/language/@classid"/> |
243 | 243 |
</oaf:language> |
244 | 244 |
<oaf:embargoenddate> |
245 | 245 |
<xsl:value-of select="//oaf:result/embargoenddate/text()"/> |
246 | 246 |
</oaf:embargoenddate> |
247 |
<oaf:hostedby id="openaire____::1256f046-bf1f-4afc-8b47-d0b147148b18" |
|
248 |
name="Unknown Repository"/> |
|
247 |
<oaf:hostedby id="infrastruct_::openaire" name="OpenAIRE"/> |
|
249 | 248 |
<oaf:collectedfrom id="infrastruct_::openaire" name="OpenAIRE"/> |
250 | 249 |
<oaf:journal eissn="{//oaf:result/journal/@eissn}" ep="{//oaf:result/journal/@ep}" |
251 | 250 |
iss="{//oaf:result/journal/@issn}" issn="{//oaf:result/journal/@issn}" |
... | ... | |
259 | 258 |
<xsl:template match="text() | @*"/> |
260 | 259 |
|
261 | 260 |
</xsl:stylesheet> |
261 |
|
|
262 |
|
|
262 | 263 |
]]></CODE> |
263 | 264 |
</SCRIPT> |
264 | 265 |
</CONFIGURATION> |
Also available in: Unified diff
Map all non-inferred subjects and pass their classid and classname.
Info about access right is in bestaccesright but for retrocompatibility we should still support the old bestlicense.
Hostedby defaults to OpenAIRE instead of the UnknownRepository.