dnet50/modules/dnet-efg/trunk/src/main/resources/eu/dnetlib/bootstrap/profiles/transformationRule/efg2edm.xml @ 46120
1 |
<RESOURCE_PROFILE>
|
---|---|
2 |
<HEADER>
|
3 |
<RESOURCE_IDENTIFIER value="efg2edm_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/> |
4 |
<RESOURCE_TYPE value="TransformationRuleDSResourceType"/> |
5 |
<RESOURCE_KIND value="TransformationRuleDSResources"/> |
6 |
<RESOURCE_URI value=""/> |
7 |
<DATE_OF_CREATION value="2015-09-22T13:13:03+02:00"/> |
8 |
</HEADER>
|
9 |
<BODY>
|
10 |
<CONFIGURATION>
|
11 |
<IMPORTED/>
|
12 |
<SCRIPT>
|
13 |
<TITLE>Efg to EDM</TITLE> |
14 |
<CODE>
|
15 |
<![CDATA[<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
16 |
xmlns:efg="http://www.europeanfilmgateway.eu/efg" xmlns:dc="http://purl.org/dc/elements/1.1/"
|
17 |
xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
18 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri"
|
19 |
xmlns:edm="http://www.europeana.eu/schemas/edm/" xmlns:exslt="http://exslt.org/common"
|
20 |
version="1.0" exclude-result-prefixes="xsl exslt">
|
21 |
|
22 |
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> |
23 |
|
24 |
<xsl:variable name="small" select="'abcdefghijklmnopqrstuvwxyz'"/> |
25 |
<xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/> |
26 |
|
27 |
<xsl:template match="/"> |
28 |
<objectRecord>
|
29 |
<xsl:variable name="body"> |
30 |
<xsl:if
|
31 |
test=" |
32 |
(count(//efg:title) > 0 or count(//efg:description) > 0) and
|
33 |
(count(//efg:item/efg:isShownBy) > 0 or count(//efg:item/efg:isShownAt) > 0)"> |
34 |
<xsl:value-of select="'true'"/> |
35 |
</xsl:if>
|
36 |
</xsl:variable>
|
37 |
<xsl:variable name="keywords"> |
38 |
<xsl:if
|
39 |
test=" |
40 |
(count(//efg:avcreation//efg:keywords[
|
41 |
translate(normalize-space(@type), $upper, $small) = 'genre' or
|
42 |
translate(normalize-space(@type), $upper, $small) = 'lcsh' or
|
43 |
translate(normalize-space(@type), $upper, $small) = 'person' or
|
44 |
translate(normalize-space(@type), $upper, $small) = 'subject' or
|
45 |
translate(normalize-space(@type), $upper, $small) = 'place' or
|
46 |
translate(normalize-space(@type), $upper, $small) = 'project' or
|
47 |
translate(normalize-space(@type), $upper, $small) = 'n/a' or
|
48 |
translate(normalize-space(@type), $upper, $small) = 'form']) > 0 or
|
49 |
count(//efg:nonavcreation//efg:keywords) > 0)
|
50 |
or
|
51 |
(count(//efg:avManifestation/efg:coverage/efg:spatial) > 0 or
|
52 |
count(//efg:avcreation/efg:countryOfReference) > 0 or
|
53 |
count(//efg:nonAVManifestation/efg:coverage/efg:spatial) > 0 or
|
54 |
count(//efg:nonAVManifestation/efg:geographicScope) > 0)
|
55 |
or
|
56 |
(count(//efg:avManifestation/efg:coverage/efg:temporal) > 0 or
|
57 |
count(//efg:nonAVManifestation/efg:coverage/efg:temporal) > 0)
|
58 |
or
|
59 |
(count(//efg:nonAVManifestation/efg:specificType) > 0 or
|
60 |
count(//efg:nonAVManifestation/efg:item/efg:type) > 0)"> |
61 |
<xsl:value-of select="'true'"/> |
62 |
</xsl:if>
|
63 |
</xsl:variable>
|
64 |
<xsl:choose>
|
65 |
<xsl:when test="$body = 'true' and $keywords = 'true'"> |
66 |
<!--exslt:node-set($body)/*">-->
|
67 |
<oai:record xmlns:dri="http://www.driver-repository.eu/namespace/dri" |
68 |
xmlns:oai="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
69 |
<oai:header>
|
70 |
<dri:objIdentifier>
|
71 |
<xsl:value-of select=".//dri:objIdentifier"/> |
72 |
</dri:objIdentifier>
|
73 |
<dri:recordIdentifier>
|
74 |
<xsl:value-of select=".//dri:recordIdentifier"/> |
75 |
</dri:recordIdentifier>
|
76 |
<dri:repositoryId>
|
77 |
<xsl:value-of select=".//dri:repositoryId"/> |
78 |
</dri:repositoryId>
|
79 |
<dri:datasourceprefix>
|
80 |
<xsl:value-of select=".//dri:datasourceprefix"/> |
81 |
</dri:datasourceprefix>
|
82 |
<oai:identifier>
|
83 |
<xsl:value-of select=".//oai:identifier"/> |
84 |
</oai:identifier>
|
85 |
</oai:header>
|
86 |
<oai:metadata>
|
87 |
<xsl:apply-templates select=".//efg:efgEntity/efg:avcreation"/> |
88 |
<xsl:apply-templates select=".//efg:efgEntity/efg:nonavcreation"/> |
89 |
</oai:metadata>
|
90 |
</oai:record>
|
91 |
</xsl:when>
|
92 |
<xsl:otherwise>
|
93 |
|
94 |
<JUNK/>
|
95 |
</xsl:otherwise>
|
96 |
</xsl:choose>
|
97 |
</objectRecord>
|
98 |
</xsl:template>
|
99 |
|
100 |
<xsl:template match="identifier | dri:objIdentifier | dri:recordIdentifier" mode="header"> |
101 |
<xsl:param name="pos"/> |
102 |
<xsl:copy>
|
103 |
<xsl:value-of select="concat(text(), '-', $pos)"/> |
104 |
</xsl:copy>
|
105 |
</xsl:template>
|
106 |
|
107 |
<xsl:template match="*" mode="header"> |
108 |
<xsl:param name="pos"/> |
109 |
<xsl:copy-of select="."/> |
110 |
</xsl:template>
|
111 |
|
112 |
<xsl:template name="lang"> |
113 |
<xsl:if test="string-length(@lang) = 2"> |
114 |
<xsl:attribute name="xml:lang"> |
115 |
<xsl:value-of select="translate(@lang, $upper, $small)"/> |
116 |
</xsl:attribute>
|
117 |
</xsl:if>
|
118 |
|
119 |
</xsl:template>
|
120 |
|
121 |
<xsl:template name="rigths"> |
122 |
<xsl:param name="rightStatus"/> |
123 |
<xsl:choose>
|
124 |
<xsl:when test="$rightStatus = 'copyright protected' or |
125 |
$rightStatus = 'in copyright'"> |
126 |
<edm:rights>http://rightsstatements.org/vocab/InC/1.0/</edm:rights> |
127 |
</xsl:when>
|
128 |
<xsl:when test="$rightStatus = 'not copyright protected' or |
129 |
$rightStatus = 'public domain'"> |
130 |
<edm:rights>http://creativecommons.org/publicdomain/mark/1.0/</edm:rights> |
131 |
</xsl:when>
|
132 |
<xsl:when test="$rightStatus = 'orphan' or |
133 |
$rightStatus = 'in copyright - eu orphan work' or
|
134 |
$rightStatus = 'no known copyright / orphan work'"> |
135 |
<edm:rights>http://rightsstatements.org/vocab/InC-OW-EU/1.0/</edm:rights> |
136 |
</xsl:when>
|
137 |
<xsl:when test="$rightStatus = 'no copyright - non commercial use only'"> |
138 |
<edm:rights>http://rightsstatements.org/vocab/NoC-NC/1.0/</edm:rights> |
139 |
</xsl:when>
|
140 |
<xsl:when test="$rightStatus = 'copyright not evaluated'"> |
141 |
<edm:rights>http://rightsstatements.org/vocab/CNE/1.0/</edm:rights> |
142 |
</xsl:when>
|
143 |
<xsl:when test="$rightStatus='no copyright - other known legal restrictions'"> |
144 |
<edm:rights>http://rightsstatements.org/vocab/NoC-OKLR/1.0/</edm:rights> |
145 |
</xsl:when>
|
146 |
<xsl:when test="$rightStatus='in copyright - educational use permitted'"> |
147 |
<edm:rights>http://rightsstatements.org/vocab/InC-EDU/1.0/</edm:rights> |
148 |
</xsl:when>
|
149 |
<xsl:otherwise>
|
150 |
<edm:rights>http://rightsstatements.org/vocab/InC/1.0/</edm:rights> |
151 |
</xsl:otherwise>
|
152 |
</xsl:choose>
|
153 |
</xsl:template>
|
154 |
|
155 |
<xsl:template match="efg:avcreation | efg:nonavcreation"> |
156 |
<xsl:variable name="creationType" select="local-name(.)"/> |
157 |
|
158 |
<xsl:variable name="navct" |
159 |
select="efg:title/efg:relation[translate(normalize-space(.), $upper, $small) = 'main title']"/> |
160 |
<xsl:variable name="avct" |
161 |
select="efg:title/efg:relation[translate(normalize-space(.), $upper, $small) = 'original title']"/> |
162 |
|
163 |
<xsl:variable name="existnavct" select="count(//efg:nonavcreation/efg:title)"/> |
164 |
<xsl:variable name="existavct" select="count(//efg:avcreation/efg:title)"/> |
165 |
<xsl:variable name="lang" |
166 |
select="count(//efg:nonavcreation//efg:language) = 0 and efg:nonAVManifestation"/> |
167 |
<record>
|
168 |
<header>
|
169 |
<xsl:apply-templates select="/record/header/*" mode="header"> |
170 |
<xsl:with-param name="pos"> |
171 |
<xsl:value-of select="position()"/> |
172 |
</xsl:with-param>
|
173 |
</xsl:apply-templates>
|
174 |
</header>
|
175 |
<metadata>
|
176 |
<rdf:RDF xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
177 |
xmlns:dc="http://purl.org/dc/elements/1.1/" |
178 |
xmlns:edm="http://www.europeana.eu/schemas/edm/" |
179 |
xmlns:ore="http://www.openarchives.org/ore/terms/" |
180 |
xmlns:dcterms="http://purl.org/dc/terms/" |
181 |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
182 |
xsi:schemaLocation="http://www.w3.org/1999/02/22-rdf-syntax-ns# EDM-INTERNAL.xsd"> |
183 |
|
184 |
<xsl:variable name="efg_provider" select="//efg:provider"/> |
185 |
|
186 |
|
187 |
<ore:Aggregation>
|
188 |
<xsl:attribute name="rdf:about"> |
189 |
<!-- <xsl:value-of select="concat('AGGR::', $efg_provider, //efg:sourceID)"/>-->
|
190 |
<xsl:value-of select="efg:recordSource/efg:sourceID"/> |
191 |
</xsl:attribute>
|
192 |
|
193 |
<edm:aggregatedCHO>
|
194 |
<xsl:attribute name="rdf:resource"> |
195 |
<xsl:value-of select="efg:recordSource/efg:sourceID"/> |
196 |
</xsl:attribute>
|
197 |
</edm:aggregatedCHO>
|
198 |
|
199 |
|
200 |
|
201 |
<xsl:for-each select="//efg:avManifestation"> |
202 |
|
203 |
|
204 |
<xsl:if test="string-length(.//efg:isShownBy[1]) > 0"> |
205 |
<edm:isShownBy>
|
206 |
<xsl:value-of select=".//efg:isShownBy[1]"/> |
207 |
</edm:isShownBy>
|
208 |
</xsl:if>
|
209 |
|
210 |
<xsl:for-each select=".//efg:isShownBy"> |
211 |
<xsl:if test="position() > 1"> |
212 |
<edm:hasView>
|
213 |
<xsl:value-of select="."/> |
214 |
</edm:hasView>
|
215 |
</xsl:if>
|
216 |
|
217 |
</xsl:for-each>
|
218 |
|
219 |
<xsl:if test="string-length(.//efg:isShownAt[1]) > 0"> |
220 |
<edm:isShownAt>
|
221 |
<xsl:value-of select=".//efg:isShownAt[1]"/> |
222 |
</edm:isShownAt>
|
223 |
</xsl:if>
|
224 |
|
225 |
<xsl:for-each select="//efg:thumbnail"> |
226 |
<edm:object>
|
227 |
<xsl:value-of select="."/> |
228 |
</edm:object>
|
229 |
</xsl:for-each>
|
230 |
<xsl:call-template name="rigths"> |
231 |
<xsl:with-param name="rightStatus" select="efg:rightsStatus"/> |
232 |
</xsl:call-template>
|
233 |
</xsl:for-each>
|
234 |
|
235 |
|
236 |
<xsl:for-each select="//efg:nonAVManifestation"> |
237 |
|
238 |
<!-- <edm:aggregatedCHO>
|
239 |
<xsl:attribute name="rdf:resource">
|
240 |
<xsl:value-of select=".//efg:identifier"/>
|
241 |
</xsl:attribute>
|
242 |
</edm:aggregatedCHO>-->
|
243 |
|
244 |
<xsl:if test="string-length(//efg:isShownBy[1]) > 0"> |
245 |
<edm:isShownBy>
|
246 |
<xsl:value-of select="//efg:isShownBy[1]"/> |
247 |
</edm:isShownBy>
|
248 |
<!-- </xsl:for-each> -->
|
249 |
</xsl:if>
|
250 |
<xsl:for-each select="//efg:isShownBy[position() > 1]"> |
251 |
|
252 |
<edm:hasView>
|
253 |
<xsl:value-of select="."/> |
254 |
</edm:hasView>
|
255 |
</xsl:for-each>
|
256 |
<xsl:if test="string-length(//efg:isShownAt[1]) > 0"> |
257 |
<edm:isShownAt>
|
258 |
<xsl:value-of select="//efg:isShownAt[1]"/> |
259 |
</edm:isShownAt>
|
260 |
</xsl:if>
|
261 |
|
262 |
<xsl:choose>
|
263 |
<xsl:when test="//efg:thumbnail"> |
264 |
<xsl:for-each select="//efg:thumbnail"> |
265 |
<edm:object>
|
266 |
<xsl:value-of select="."/> |
267 |
</edm:object>
|
268 |
</xsl:for-each>
|
269 |
</xsl:when>
|
270 |
<xsl:otherwise>
|
271 |
<xsl:if test="//efg:isShownBy"> |
272 |
<edm:object>
|
273 |
<xsl:value-of select="//efg:isShownBy[1]"/> |
274 |
</edm:object>
|
275 |
</xsl:if>
|
276 |
|
277 |
</xsl:otherwise>
|
278 |
</xsl:choose>
|
279 |
<xsl:call-template name="rigths"> |
280 |
<xsl:with-param name="rightStatus" select="efg:rightsStatus"/> |
281 |
</xsl:call-template>
|
282 |
</xsl:for-each>
|
283 |
|
284 |
<xsl:if test=".//efg:rightsHolder"> |
285 |
<dc:rights>
|
286 |
<xsl:value-of select=".//efg:rightsHolder"/> |
287 |
</dc:rights>
|
288 |
</xsl:if>
|
289 |
|
290 |
<edm:dataProvider>
|
291 |
<xsl:value-of select="$efg_provider"/> |
292 |
</edm:dataProvider>
|
293 |
<edm:provider>EFG - The European Film Gateway</edm:provider> |
294 |
|
295 |
</ore:Aggregation>
|
296 |
|
297 |
<edm:ProvidedCHO>
|
298 |
<xsl:attribute name="rdf:about"> |
299 |
<xsl:value-of select="//efg:recordSource[1]/efg:sourceID"/> |
300 |
</xsl:attribute>
|
301 |
<xsl:for-each select="efg:recordSource/efg:sourceID"> |
302 |
<dc:identifier>
|
303 |
<xsl:value-of select="."/> |
304 |
</dc:identifier>
|
305 |
</xsl:for-each>
|
306 |
|
307 |
<!-- dc:language -->
|
308 |
<xsl:for-each select="//efg:language"> |
309 |
<dc:language>
|
310 |
<xsl:value-of select="."/> |
311 |
</dc:language>
|
312 |
</xsl:for-each>
|
313 |
<xsl:if test="$lang"> |
314 |
<dc:language>
|
315 |
<xsl:value-of select="'unknown'"/> |
316 |
</dc:language>
|
317 |
</xsl:if>
|
318 |
|
319 |
<!-- dc:contributor dc:creator dc:publisher -->
|
320 |
<xsl:for-each select="//efg:relPerson"> |
321 |
<xsl:variable name="person_type" |
322 |
select="translate(normalize-space(./efg:type), $upper, $small)"/> |
323 |
<xsl:choose>
|
324 |
<xsl:when
|
325 |
test=" |
326 |
$person_type = 'director of photography' or
|
327 |
$person_type = 'screenplay' or
|
328 |
$person_type = 'editor' or
|
329 |
$person_type = 'music composer'"> |
330 |
<dc:contributor>
|
331 |
<xsl:value-of select="./efg:name"/> |
332 |
</dc:contributor>
|
333 |
</xsl:when>
|
334 |
<xsl:when test="$person_type = 'director'"> |
335 |
<xsl:if test="$creationType = 'avcreation'"> |
336 |
<dc:creator>
|
337 |
<xsl:value-of select="./efg:name"/> |
338 |
</dc:creator>
|
339 |
</xsl:if>
|
340 |
|
341 |
</xsl:when>
|
342 |
<xsl:when test="$person_type = 'publisher'"> |
343 |
<xsl:if test="$creationType = 'nonavcreation'"> |
344 |
<dc:publisher>
|
345 |
<xsl:value-of select="./efg:name"/> |
346 |
</dc:publisher>
|
347 |
</xsl:if>
|
348 |
</xsl:when>
|
349 |
<xsl:when
|
350 |
test=" |
351 |
$person_type = 'creator' or
|
352 |
$person_type = 'designer' or
|
353 |
$person_type = 'photographer' or
|
354 |
$person_type = 'lithographer' or
|
355 |
$person_type = 'book designer' or
|
356 |
$person_type = 'author' or
|
357 |
$person_type = 'lyrics' or
|
358 |
$person_type = 'composer' or
|
359 |
$person_type = 'illustrator' or
|
360 |
$person_type = 'artist' or
|
361 |
$person_type = 'manufacturer' or
|
362 |
$person_type = 'attributed to' or
|
363 |
$person_type = 'stills photographer'"> |
364 |
<xsl:if test="$creationType = 'nonavcreation'"> |
365 |
<dc:creator>
|
366 |
<xsl:value-of select="./efg:name"/> |
367 |
</dc:creator>
|
368 |
</xsl:if>
|
369 |
|
370 |
</xsl:when>
|
371 |
</xsl:choose>
|
372 |
</xsl:for-each>
|
373 |
<xsl:for-each select="//efg:relCorporate"> |
374 |
<xsl:variable name="corporate_type" |
375 |
select="translate(normalize-space(./efg:type), $upper, $small)"/> |
376 |
<xsl:choose>
|
377 |
<xsl:when test="$corporate_type = 'production company'"> |
378 |
<xsl:if test="$creationType = 'avcreation'"> |
379 |
<dc:contributor>
|
380 |
<xsl:value-of select="./efg:name"/> |
381 |
</dc:contributor>
|
382 |
</xsl:if>
|
383 |
|
384 |
</xsl:when>
|
385 |
<xsl:when test="$corporate_type = 'publisher'"> |
386 |
<xsl:if test="$creationType = 'nonavcreation'"> |
387 |
<dc:publisher>
|
388 |
<xsl:value-of select="./efg:name"/> |
389 |
</dc:publisher>
|
390 |
</xsl:if>
|
391 |
|
392 |
</xsl:when>
|
393 |
</xsl:choose>
|
394 |
</xsl:for-each>
|
395 |
|
396 |
<!-- dc:description -->
|
397 |
<xsl:for-each select="//efg:description"> |
398 |
<dc:description>
|
399 |
<xsl:call-template name="lang"/> |
400 |
<xsl:value-of select="."/> |
401 |
</dc:description>
|
402 |
</xsl:for-each>
|
403 |
|
404 |
<!-- dc:format -->
|
405 |
<xsl:for-each
|
406 |
select="efg:nonAVManifestation/efg:digitalFormat[translate(normalize-space(@status), $upper, $small) = 'born digital']"> |
407 |
<dc:format>
|
408 |
<xsl:value-of select="."/> |
409 |
</dc:format>
|
410 |
</xsl:for-each>
|
411 |
<xsl:for-each
|
412 |
select="efg:avManifestation/efg:format/efg:digital/efg:originalStatus[translate(normalize-space(.), $upper, $small) = 'born digital']"> |
413 |
<dc:format>
|
414 |
<xsl:value-of select="efg:container"/> |
415 |
</dc:format>
|
416 |
</xsl:for-each>
|
417 |
|
418 |
<!-- dcterms:extent -->
|
419 |
<xsl:for-each select="//efg:physicalFormat"> |
420 |
<dcterms:extent>
|
421 |
<xsl:value-of select="."/> |
422 |
</dcterms:extent>
|
423 |
</xsl:for-each>
|
424 |
|
425 |
|
426 |
<!-- dcterms:subject, dc:type -->
|
427 |
<xsl:for-each select="//efg:avcreation//efg:keywords"> |
428 |
<xsl:variable name="keyword_type" |
429 |
select="translate(normalize-space(./@type), $upper, $small)"/> |
430 |
<xsl:choose>
|
431 |
<xsl:when
|
432 |
test=" |
433 |
$keyword_type = 'genre' or
|
434 |
$keyword_type = 'lcsh' or
|
435 |
$keyword_type = 'person' or
|
436 |
$keyword_type = 'subject' or
|
437 |
$keyword_type = 'place' or
|
438 |
$keyword_type = 'project' or
|
439 |
$keyword_type = 'n/a'"> |
440 |
<dcterms:subject>
|
441 |
<xsl:call-template name="lang"/> |
442 |
<xsl:value-of select="./efg:term"/> |
443 |
</dcterms:subject>
|
444 |
</xsl:when>
|
445 |
|
446 |
<xsl:when test="$keyword_type = 'form'"> |
447 |
<dc:type>
|
448 |
<xsl:attribute name="xml:lang"> |
449 |
<xsl:value-of select="translate(@lang, $upper, $small)" |
450 |
/>
|
451 |
</xsl:attribute>
|
452 |
<xsl:value-of select="./efg:term"/> |
453 |
</dc:type>
|
454 |
</xsl:when>
|
455 |
</xsl:choose>
|
456 |
</xsl:for-each>
|
457 |
<xsl:for-each select="//efg:nonavcreation//efg:keywords"> |
458 |
<dcterms:subject>
|
459 |
<xsl:call-template name="lang"/> |
460 |
<xsl:value-of select="./efg:term"/> |
461 |
</dcterms:subject>
|
462 |
</xsl:for-each>
|
463 |
|
464 |
<!-- dc:title dcterms:alternative -->
|
465 |
<xsl:for-each select="efg:title"> |
466 |
<xsl:variable name="title_rel" |
467 |
select="translate(normalize-space(./efg:relation), $upper, $small)"/> |
468 |
<xsl:choose>
|
469 |
<xsl:when
|
470 |
test="$title_rel = 'original title' and $creationType = 'avcreation'"> |
471 |
<dc:title>
|
472 |
<xsl:call-template name="lang"/> |
473 |
|
474 |
<xsl:value-of select="./efg:text"/> |
475 |
</dc:title>
|
476 |
</xsl:when>
|
477 |
<xsl:when
|
478 |
test="$title_rel = 'main title' and $creationType = 'nonavcreation'"> |
479 |
<dc:title>
|
480 |
<xsl:call-template name="lang"/> |
481 |
|
482 |
<xsl:value-of select="./efg:text"/> |
483 |
</dc:title>
|
484 |
</xsl:when>
|
485 |
<xsl:otherwise>
|
486 |
<dcterms:alternative>
|
487 |
<xsl:call-template name="lang"/> |
488 |
|
489 |
<xsl:value-of select="./efg:text"/> |
490 |
</dcterms:alternative>
|
491 |
</xsl:otherwise>
|
492 |
</xsl:choose>
|
493 |
</xsl:for-each>
|
494 |
<xsl:for-each select="efg:nonAVManifestation/efg:title"> |
495 |
<xsl:variable name="title_rel" |
496 |
select="translate(normalize-space(./efg:relation), $upper, $small)"/> |
497 |
<xsl:choose>
|
498 |
<!-- <xsl:when test="$title_rel = 'original title'">
|
499 |
<dc:title>
|
500 |
<xsl:call-template name="lang"/>
|
501 |
<xsl:value-of select="./efg:text"/>
|
502 |
</dc:title>
|
503 |
</xsl:when>-->
|
504 |
<xsl:when test="$title_rel = 'main title'"> |
505 |
<xsl:if test="string-length($navct) = 0"> |
506 |
<dc:title>
|
507 |
<xsl:call-template name="lang"/> |
508 |
|
509 |
<xsl:value-of select="./efg:text"/> |
510 |
</dc:title>
|
511 |
</xsl:if>
|
512 |
</xsl:when>
|
513 |
|
514 |
<xsl:otherwise>
|
515 |
<xsl:if test="$existnavct = 0"> |
516 |
<dcterms:alternative>
|
517 |
<xsl:call-template name="lang"/> |
518 |
|
519 |
<xsl:value-of select="./efg:text"/> |
520 |
</dcterms:alternative>
|
521 |
</xsl:if>
|
522 |
</xsl:otherwise>
|
523 |
</xsl:choose>
|
524 |
</xsl:for-each>
|
525 |
<xsl:for-each select="efg:avManifestation/efg:title"> |
526 |
<xsl:variable name="title_rel" |
527 |
select="translate(normalize-space(./efg:relation), $upper, $small)"/> |
528 |
<xsl:choose>
|
529 |
<xsl:when test="$title_rel = 'original title'"> |
530 |
<xsl:if test="string-length($avct) = 0"> |
531 |
<dc:title>
|
532 |
<xsl:call-template name="lang"/> |
533 |
|
534 |
<xsl:value-of select="./efg:text"/> |
535 |
</dc:title>
|
536 |
</xsl:if>
|
537 |
</xsl:when>
|
538 |
<!-- <xsl:when test="$title_rel = 'main title'">
|
539 |
<dc:title>
|
540 |
<xsl:call-template name="lang"/>
|
541 |
|
542 |
<xsl:value-of select="./efg:text"/>
|
543 |
</dc:title>
|
544 |
</xsl:when>-->
|
545 |
<xsl:otherwise>
|
546 |
<xsl:if test="$existavct = 0"> |
547 |
<dcterms:alternative>
|
548 |
<xsl:call-template name="lang"/> |
549 |
|
550 |
<xsl:value-of select="./efg:text"/> |
551 |
</dcterms:alternative>
|
552 |
</xsl:if>
|
553 |
</xsl:otherwise>
|
554 |
</xsl:choose>
|
555 |
</xsl:for-each>
|
556 |
|
557 |
<!-- dc:type -->
|
558 |
<xsl:for-each select="//efg:specificType"> |
559 |
<xsl:choose>
|
560 |
<xsl:when
|
561 |
test="count(normalize-space(.)) > 0 and normalize-space(.) != 'n/a'"> |
562 |
<dc:type>
|
563 |
<xsl:value-of select="."/> |
564 |
</dc:type>
|
565 |
</xsl:when>
|
566 |
<xsl:otherwise>
|
567 |
<dc:type>
|
568 |
<xsl:value-of
|
569 |
select="//efg:avManifestation/efg:item/efg:type"/> |
570 |
</dc:type>
|
571 |
</xsl:otherwise>
|
572 |
</xsl:choose>
|
573 |
</xsl:for-each>
|
574 |
|
575 |
<!-- cdterms:created -->
|
576 |
<xsl:for-each select="//efg:productionYear"> |
577 |
<dcterms:created>
|
578 |
<xsl:value-of select="."/> |
579 |
</dcterms:created>
|
580 |
</xsl:for-each>
|
581 |
<xsl:for-each select="//efg:nonAVManifestation/efg:dateCreated"> |
582 |
<dcterms:created>
|
583 |
<xsl:value-of select="."/> |
584 |
</dcterms:created>
|
585 |
</xsl:for-each>
|
586 |
|
587 |
<!-- dcterms:issued -->
|
588 |
<xsl:for-each
|
589 |
select="//efg:nonAVManifestation/efg:date[./efg:type = 'issued']"> |
590 |
<dcterms:issued>
|
591 |
<xsl:value-of select="."/> |
592 |
</dcterms:issued>
|
593 |
</xsl:for-each>
|
594 |
|
595 |
<!-- dcterms:spatial -->
|
596 |
<xsl:for-each select="efg:avManifestation/efg:coverage/efg:spatial"> |
597 |
<dcterms:spatial>
|
598 |
<xsl:value-of select="."/> |
599 |
</dcterms:spatial>
|
600 |
</xsl:for-each>
|
601 |
<xsl:for-each select="efg:nonAVManifestation/efg:geographicScope/efg:place"> |
602 |
<xsl:choose>
|
603 |
<xsl:when test="efg:code"> |
604 |
<dcterms:spatial>
|
605 |
<xsl:value-of select="."/> |
606 |
</dcterms:spatial>
|
607 |
</xsl:when>
|
608 |
<xsl:otherwise>
|
609 |
<xsl:if test="efg:place"> |
610 |
<dcterms:spatial>
|
611 |
<xsl:value-of select="."/> |
612 |
</dcterms:spatial>
|
613 |
</xsl:if>
|
614 |
</xsl:otherwise>
|
615 |
</xsl:choose>
|
616 |
</xsl:for-each>
|
617 |
<xsl:if
|
618 |
test="count(efg:nonAVManifestation/efg:geographicScope/efg:place) = 0 and $creationType = 'nonavcreation'"> |
619 |
<xsl:if test="efg:nonAVManifestation/efg:coverage/efg:spatial"> |
620 |
<dcterms:spatial>
|
621 |
<xsl:value-of
|
622 |
select="efg:nonAVManifestation/efg:coverage/efg:spatial"/> |
623 |
</dcterms:spatial>
|
624 |
</xsl:if>
|
625 |
</xsl:if>
|
626 |
|
627 |
<xsl:for-each select="efg:countryOfReference"> |
628 |
<dcterms:spatial>
|
629 |
<xsl:value-of select="."/> |
630 |
</dcterms:spatial>
|
631 |
</xsl:for-each>
|
632 |
|
633 |
<!-- dcterms:temporal -->
|
634 |
<xsl:for-each select="//efg:coverage/efg:temporal"> |
635 |
<dcterms:temporal>
|
636 |
<xsl:value-of select="."/> |
637 |
</dcterms:temporal>
|
638 |
</xsl:for-each>
|
639 |
|
640 |
<!-- edm:type -->
|
641 |
<xsl:for-each select="//efg:item/efg:type"> |
642 |
<edm:type>
|
643 |
<xsl:value-of select="."/> |
644 |
</edm:type>
|
645 |
</xsl:for-each>
|
646 |
|
647 |
<!-- dcterms:provenance -->
|
648 |
<xsl:for-each select="//efg:avManifestation//efg:provenance"> |
649 |
<dcterms:provenance>
|
650 |
<xsl:value-of select="."/> |
651 |
</dcterms:provenance>
|
652 |
</xsl:for-each>
|
653 |
</edm:ProvidedCHO>
|
654 |
|
655 |
<!-- Web Resources -->
|
656 |
<xsl:for-each select="//efg:avManifestation"> |
657 |
<xsl:for-each select=".//efg:isShownBy"> |
658 |
<xsl:if test=". != ''"> |
659 |
<edm:WebResource>
|
660 |
<xsl:attribute name="rdf:about"> |
661 |
<xsl:value-of select="."/> |
662 |
</xsl:attribute>
|
663 |
<xsl:if
|
664 |
test="../../efg:format/efg:digital/efg:originalStatus[translate(normalize-space(.), $upper, $small)]"> |
665 |
<dc:format>
|
666 |
<xsl:value-of
|
667 |
select="../../efg:format/efg:digital/efg:container" |
668 |
/>
|
669 |
</dc:format>
|
670 |
</xsl:if>
|
671 |
<xsl:for-each select="../../efg:duration"> |
672 |
<dcterms:extent>
|
673 |
<xsl:value-of select="."/> |
674 |
</dcterms:extent>
|
675 |
</xsl:for-each>
|
676 |
<xsl:call-template name="rigths"> |
677 |
<xsl:with-param name="rightStatus" |
678 |
select="translate(normalize-space(../../efg:rightsStatus), $upper, $small)" |
679 |
/>
|
680 |
</xsl:call-template>
|
681 |
|
682 |
</edm:WebResource>
|
683 |
</xsl:if>
|
684 |
</xsl:for-each>
|
685 |
|
686 |
</xsl:for-each>
|
687 |
<xsl:for-each select="//efg:nonAVManifestation"> |
688 |
<xsl:for-each select=".//efg:isShownBy"> |
689 |
<edm:WebResource>
|
690 |
<xsl:attribute name="rdf:about"> |
691 |
<xsl:value-of select="."/> |
692 |
</xsl:attribute>
|
693 |
<xsl:if
|
694 |
test="../../efg:digitalFormat[translate(normalize-space(@status), $upper, $small)]"> |
695 |
<dc:format>
|
696 |
<xsl:value-of select="../../efg:digitalFormat"/> |
697 |
</dc:format>
|
698 |
</xsl:if>
|
699 |
|
700 |
<xsl:call-template name="rigths"> |
701 |
<xsl:with-param name="rightStatus" |
702 |
select="translate(normalize-space(../../efg:rightsStatus), $upper, $small)" |
703 |
/>
|
704 |
</xsl:call-template>
|
705 |
|
706 |
</edm:WebResource>
|
707 |
</xsl:for-each>
|
708 |
|
709 |
</xsl:for-each>
|
710 |
|
711 |
|
712 |
</rdf:RDF>
|
713 |
</metadata>
|
714 |
</record>
|
715 |
</xsl:template>
|
716 |
|
717 |
|
718 |
<xsl:template name="distinct"> |
719 |
<xsl:param name="var"/> |
720 |
|
721 |
<xsl:variable name="svar"> |
722 |
<xsl:for-each select="exslt:node-set($var)/*"> |
723 |
<xsl:sort select="."/> |
724 |
<xsl:copy-of select="."/> |
725 |
</xsl:for-each>
|
726 |
</xsl:variable>
|
727 |
|
728 |
<xsl:for-each select="exslt:node-set($svar)/*"> |
729 |
<xsl:variable name="pos" select="position()"/> |
730 |
<xsl:if test="string(../child::*[$pos - 1]) != string(.)"> |
731 |
<xsl:copy-of select="."/> |
732 |
</xsl:if>
|
733 |
</xsl:for-each>
|
734 |
</xsl:template>
|
735 |
|
736 |
|
737 |
</xsl:stylesheet>
|
738 |
]]> |
739 |
</CODE>
|
740 |
</SCRIPT>
|
741 |
</CONFIGURATION>
|
742 |
<STATUS/>
|
743 |
<SECURITY_PARAMETERS/>
|
744 |
</BODY>
|
745 |
</RESOURCE_PROFILE>
|