Revision 51004
Added by Miriam Baglioni about 6 years ago
efg2edm.xml | ||
---|---|---|
12 | 12 |
<SCRIPT> |
13 | 13 |
<TITLE>Efg to EDM</TITLE> |
14 | 14 |
<CODE> |
15 |
<![CDATA[<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
15 |
<![CDATA[ |
|
16 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
16 | 17 |
xmlns:efg="http://www.europeanfilmgateway.eu/efg" xmlns:dc="http://purl.org/dc/elements/1.1/" |
17 | 18 |
xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xs="http://www.w3.org/2001/XMLSchema" |
18 | 19 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" |
19 | 20 |
xmlns:edm="http://www.europeana.eu/schemas/edm/" xmlns:exslt="http://exslt.org/common" |
20 |
version="1.0" exclude-result-prefixes="xsl exslt">
|
|
21 |
version="2.0" exclude-result-prefixes="xsl exslt">
|
|
21 | 22 |
|
22 | 23 |
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> |
23 | 24 |
|
... | ... | |
116 | 117 |
<xsl:value-of select="translate(@lang, $upper, $small)"/> |
117 | 118 |
</xsl:attribute> |
118 | 119 |
</xsl:if> |
120 |
</xsl:template> |
|
119 | 121 |
|
122 |
<xsl:template name="date"> |
|
123 |
<xsl:param name="value"/> |
|
124 |
<xsl:variable name="tmp"> |
|
125 |
<xsl:choose> |
|
126 |
<xsl:when test="substring(normalize-space($value),1,1) = '['"> |
|
127 |
<xsl:value-of select="substring(normalize-space($value),2,string-length(normalize-space($value))-2)"/> |
|
128 |
</xsl:when> |
|
129 |
<xsl:otherwise> |
|
130 |
<xsl:value-of select="normalize-space($value)"/> |
|
131 |
</xsl:otherwise> |
|
132 |
</xsl:choose> |
|
133 |
|
|
134 |
</xsl:variable> |
|
135 |
|
|
136 |
<xsl:variable name="seq" select="tokenize($tmp,'-')"/> |
|
137 |
<xsl:choose> |
|
138 |
<xsl:when test="$seq[2]='01' and $seq[3] = '01'"> |
|
139 |
<xsl:value-of select="$seq[1]"/> |
|
140 |
</xsl:when> |
|
141 |
<xsl:otherwise><xsl:value-of select="$tmp"/></xsl:otherwise> |
|
142 |
</xsl:choose> |
|
120 | 143 |
</xsl:template> |
121 | 144 |
|
122 | 145 |
<xsl:template name="rigths"> |
... | ... | |
165 | 188 |
<xsl:variable name="navct" |
166 | 189 |
select="efg:title/efg:relation[translate(normalize-space(.), $upper, $small) = 'main title']"/> |
167 | 190 |
<xsl:variable name="avct" |
168 |
select="efg:title/efg:relation[translate(normalize-space(.), $upper, $small) = 'original title']"/> |
|
191 |
select="efg:title/efg:relation[translate(normalize-space(.), $upper, $small) = 'archive title'] or efg:title/efg:relation[translate(normalize-space(.), $upper, $small) = 'original title']"/>
|
|
169 | 192 |
|
170 | 193 |
<xsl:variable name="existnavct" select="count(//efg:nonavcreation/efg:title)"/> |
171 | 194 |
<xsl:variable name="existavct" select="count(//efg:avcreation/efg:title)"/> |
... | ... | |
192 | 215 |
<xsl:variable name="identifier"> |
193 | 216 |
<xsl:choose> |
194 | 217 |
<xsl:when test="$creationType = 'avcreation'"> |
195 |
<xsl:value-of select="efg:avManifestation/efg:identifier"/>
|
|
218 |
<xsl:value-of select="normalize-space(efg:avManifestation/efg:identifier)"/>
|
|
196 | 219 |
</xsl:when> |
197 | 220 |
<xsl:otherwise> |
198 |
<xsl:value-of select="efg:nonAVManifestation/efg:identifier"/>
|
|
221 |
<xsl:value-of select="normalize-space(efg:nonAVManifestation/efg:identifier)"/>
|
|
199 | 222 |
</xsl:otherwise> |
200 | 223 |
</xsl:choose> |
201 | 224 |
</xsl:variable> |
202 | 225 |
<xsl:variable name="sourceId"> |
203 | 226 |
<xsl:choose> |
204 | 227 |
<xsl:when test="$creationType = 'avcreation'"> |
205 |
<xsl:value-of select="efg:avManifestation/efg:recordSource/efg:sourceID"/>
|
|
228 |
<xsl:value-of select="normalize-space(efg:avManifestation/efg:recordSource/efg:sourceID)"/>
|
|
206 | 229 |
</xsl:when> |
207 | 230 |
<xsl:otherwise> |
208 |
<xsl:value-of select="efg:nonAVManifestation/efg:recordSource/efg:sourceID"/>
|
|
231 |
<xsl:value-of select="normalize-space(efg:nonAVManifestation/efg:recordSource/efg:sourceID)"/>
|
|
209 | 232 |
</xsl:otherwise> |
210 | 233 |
</xsl:choose> |
211 | 234 |
</xsl:variable> |
... | ... | |
227 | 250 |
|
228 | 251 |
<xsl:for-each select="//efg:avManifestation"> |
229 | 252 |
|
253 |
<xsl:for-each select=".//efg:isShownBy"> |
|
254 |
<xsl:choose> |
|
255 |
<xsl:when test="position() = 1 "> |
|
256 |
<xsl:if test="string-length(.) > 0"> |
|
257 |
<edm:isShownBy> |
|
258 |
<xsl:value-of select="normalize-space(.)"/> |
|
259 |
</edm:isShownBy></xsl:if> |
|
260 |
</xsl:when> |
|
261 |
<xsl:otherwise> |
|
262 |
<edm:hasView> |
|
263 |
<xsl:attribute name="rdf:resource"> |
|
264 |
<xsl:value-of select="normalize-space(.)"/> |
|
265 |
</xsl:attribute> |
|
230 | 266 |
|
231 |
<xsl:if test="string-length(.//efg:isShownBy[1]) > 0"> |
|
232 |
<edm:isShownBy> |
|
233 |
<xsl:value-of select=".//efg:isShownBy[1]"/> |
|
234 |
</edm:isShownBy> |
|
235 |
</xsl:if> |
|
267 |
</edm:hasView> |
|
268 |
</xsl:otherwise> |
|
269 |
</xsl:choose> |
|
236 | 270 |
|
237 |
<xsl:for-each select=".//efg:isShownBy"> |
|
238 |
<xsl:if test="position() > 1"> |
|
239 |
<edm:hasView> |
|
240 |
<xsl:value-of select="."/> |
|
241 |
</edm:hasView> |
|
271 |
</xsl:for-each> |
|
272 |
<xsl:for-each select=".//efg:isShownAt"> |
|
273 |
<xsl:if test="position() = 1 and string-length(.) > 0"> |
|
274 |
<edm:isShownAt> |
|
275 |
<xsl:value-of select="normalize-space(.)"/> |
|
276 |
</edm:isShownAt> |
|
242 | 277 |
</xsl:if> |
243 |
|
|
244 | 278 |
</xsl:for-each> |
245 | 279 |
|
246 |
<xsl:if test="string-length(.//efg:isShownAt[1]) > 0"> |
|
247 |
<edm:isShownAt> |
|
248 |
<xsl:value-of select=".//efg:isShownAt[1]"/> |
|
249 |
</edm:isShownAt> |
|
250 |
</xsl:if> |
|
251 | 280 |
|
252 | 281 |
<xsl:for-each select="//efg:thumbnail"> |
253 | 282 |
<edm:object> |
254 |
<xsl:value-of select="."/>
|
|
283 |
<xsl:value-of select="normalize-space(.)"/>
|
|
255 | 284 |
</edm:object> |
256 | 285 |
</xsl:for-each> |
257 | 286 |
<xsl:call-template name="rigths"> |
... | ... | |
264 | 293 |
|
265 | 294 |
<xsl:for-each select="//efg:nonAVManifestation"> |
266 | 295 |
|
267 |
<!-- <edm:aggregatedCHO> |
|
268 |
<xsl:attribute name="rdf:resource"> |
|
269 |
<xsl:value-of select=".//efg:identifier"/> |
|
270 |
</xsl:attribute> |
|
271 |
</edm:aggregatedCHO>--> |
|
296 |
<xsl:for-each select="//efg:isShownBy"> |
|
297 |
<xsl:choose> |
|
298 |
<xsl:when test="position() = 1"> |
|
299 |
<xsl:if test="string-length(.) > 0"> |
|
300 |
<edm:isShownBy> |
|
301 |
<xsl:value-of select="normalize-space(.)"/> |
|
302 |
</edm:isShownBy></xsl:if> |
|
303 |
</xsl:when> |
|
304 |
<xsl:otherwise> |
|
305 |
<edm:hasView> |
|
306 |
<xsl:value-of select="normalize-space(.)"/> |
|
307 |
</edm:hasView> |
|
308 |
</xsl:otherwise> |
|
309 |
</xsl:choose> |
|
310 |
</xsl:for-each> |
|
272 | 311 |
|
273 |
<xsl:if test="string-length(//efg:isShownBy[1]) > 0"> |
|
274 |
<edm:isShownBy> |
|
275 |
<xsl:value-of select="//efg:isShownBy[1]"/> |
|
276 |
</edm:isShownBy> |
|
277 |
<!-- </xsl:for-each> --> |
|
278 |
</xsl:if> |
|
279 |
<xsl:for-each select="//efg:isShownBy[position() > 1]"> |
|
280 | 312 |
|
281 |
<edm:hasView> |
|
282 |
<xsl:value-of select="."/> |
|
283 |
</edm:hasView> |
|
313 |
<xsl:for-each select="//efg:isShownAt"> |
|
314 |
<xsl:if test="position() =1 and string-length(.) > 0"> |
|
315 |
<edm:isShownAt> |
|
316 |
<xsl:value-of select="normalize-space(.)"/> |
|
317 |
</edm:isShownAt> |
|
318 |
</xsl:if> |
|
284 | 319 |
</xsl:for-each> |
285 |
<xsl:if test="string-length(//efg:isShownAt[1]) > 0"> |
|
286 |
<edm:isShownAt> |
|
287 |
<xsl:value-of select="//efg:isShownAt[1]"/> |
|
288 |
</edm:isShownAt> |
|
289 |
</xsl:if> |
|
290 | 320 |
|
291 | 321 |
<xsl:choose> |
292 | 322 |
<xsl:when test="//efg:thumbnail"> |
293 | 323 |
<xsl:for-each select="//efg:thumbnail"> |
294 | 324 |
<edm:object> |
295 |
<xsl:value-of select="."/>
|
|
325 |
<xsl:value-of select="normalize-space(.)"/>
|
|
296 | 326 |
</edm:object> |
297 | 327 |
</xsl:for-each> |
298 | 328 |
</xsl:when> |
299 | 329 |
<xsl:otherwise> |
300 | 330 |
<xsl:if test="//efg:isShownBy"> |
301 | 331 |
<edm:object> |
302 |
<xsl:value-of select="//efg:isShownBy[1]"/>
|
|
332 |
<xsl:value-of select="normalize-space(//efg:isShownBy[1])"/>
|
|
303 | 333 |
</edm:object> |
304 | 334 |
</xsl:if> |
305 | 335 |
|
... | ... | |
319 | 349 |
</xsl:if> |
320 | 350 |
|
321 | 351 |
<edm:dataProvider> |
322 |
<xsl:value-of select="$efg_provider"/> |
|
352 |
<xsl:value-of select="$efg_provider[1]"/>
|
|
323 | 353 |
</edm:dataProvider> |
324 | 354 |
<edm:provider>EFG - The European Film Gateway</edm:provider> |
325 | 355 |
|
... | ... | |
333 | 363 |
<xsl:when test="$creationType = 'avcreation'"> |
334 | 364 |
<xsl:for-each select="efg:avManifestation/efg:recordSource/efg:sourceID"> |
335 | 365 |
<dc:identifier> |
336 |
<xsl:value-of select="."/>
|
|
366 |
<xsl:value-of select="normalize-space(.)"/>
|
|
337 | 367 |
</dc:identifier> |
338 | 368 |
</xsl:for-each> |
339 | 369 |
</xsl:when> |
340 | 370 |
<xsl:otherwise> |
341 | 371 |
<xsl:for-each select="efg:nonAVManifestation/efg:recordSource/efg:sourceID"> |
342 | 372 |
<dc:identifier> |
343 |
<xsl:value-of select="."/>
|
|
373 |
<xsl:value-of select="normalize-space(.)"/>
|
|
344 | 374 |
</dc:identifier> |
345 | 375 |
</xsl:for-each> |
346 | 376 |
</xsl:otherwise> |
... | ... | |
348 | 378 |
|
349 | 379 |
|
350 | 380 |
<!-- dc:language --> |
351 |
<xsl:for-each select="//efg:language"> |
|
352 |
<dc:language> |
|
353 |
<xsl:value-of select="."/> |
|
354 |
</dc:language> |
|
355 |
</xsl:for-each> |
|
356 |
<xsl:if test="$lang"> |
|
357 |
<dc:language> |
|
358 |
<xsl:value-of select="'unknown'"/> |
|
359 |
</dc:language> |
|
360 |
</xsl:if> |
|
361 |
|
|
381 |
<xsl:choose> |
|
382 |
<xsl:when test="$creationType = 'avcreation'"> |
|
383 |
<xsl:for-each select="//efg:language"> |
|
384 |
<dc:language> |
|
385 |
<xsl:value-of select="normalize-space(.)"/> |
|
386 |
</dc:language> |
|
387 |
</xsl:for-each> |
|
362 | 388 |
|
389 |
<xsl:if test="$lang"> |
|
390 |
<dc:language> |
|
391 |
<xsl:value-of select="'unknown'"/> |
|
392 |
</dc:language> |
|
393 |
</xsl:if> |
|
394 |
</xsl:when> |
|
395 |
<xsl:otherwise> |
|
396 |
<xsl:choose> |
|
397 |
<xsl:when test="count(efg:nonAVManifestation/efg:language) > 0"> |
|
398 |
<xsl:for-each select="efg:nonAVManifestation/efg:language"> |
|
399 |
<dc:language> |
|
400 |
<xsl:value-of select="normalize-space(.)"/> |
|
401 |
</dc:language> |
|
402 |
</xsl:for-each> |
|
403 |
</xsl:when> |
|
404 |
<xsl:otherwise> |
|
405 |
<xsl:for-each select="//efg:language"> |
|
406 |
<dc:language> |
|
407 |
<xsl:value-of select="normalize-space(.)"/> |
|
408 |
</dc:language> |
|
409 |
</xsl:for-each> |
|
410 |
</xsl:otherwise> |
|
411 |
</xsl:choose> |
|
412 |
<xsl:if test="$lang and translate(efg:nonAVManifestation/efg:item/efg:type,$upper,$small)='text'"> |
|
413 |
<dc:language> |
|
414 |
<xsl:value-of select="'unknown'"/> |
|
415 |
</dc:language> |
|
416 |
</xsl:if> |
|
417 |
</xsl:otherwise> |
|
418 |
|
|
419 |
</xsl:choose> |
|
420 |
|
|
421 |
|
|
363 | 422 |
<!-- dc:contributor dc:creator dc:publisher --> |
364 | 423 |
<xsl:for-each select="//efg:relPerson"> |
365 | 424 |
<xsl:variable name="person_type" |
... | ... | |
410 | 469 |
<xsl:value-of select="./efg:name"/> |
411 | 470 |
</dc:creator> |
412 | 471 |
</xsl:if> |
413 |
|
|
414 | 472 |
</xsl:when> |
415 | 473 |
</xsl:choose> |
416 | 474 |
</xsl:for-each> |
... | ... | |
446 | 504 |
</xsl:for-each> |
447 | 505 |
|
448 | 506 |
<!-- dc:format --> |
507 |
<xsl:variable name="format" select="//efg:item/efg:fileFormat"/> |
|
508 |
|
|
449 | 509 |
<xsl:for-each |
450 | 510 |
select="efg:nonAVManifestation/efg:digitalFormat[translate(normalize-space(@status), $upper, $small) = 'born digital']"> |
451 | 511 |
<dc:format> |
452 | 512 |
<xsl:value-of select="."/> |
453 | 513 |
</dc:format> |
514 |
|
|
454 | 515 |
</xsl:for-each> |
455 |
<xsl:for-each |
|
456 |
select="efg:avManifestation/efg:format/efg:digital/efg:originalStatus[translate(normalize-space(.), $upper, $small) = 'born digital']"> |
|
457 |
<dc:format> |
|
458 |
<xsl:value-of select="efg:container"/> |
|
459 |
</dc:format> |
|
460 |
</xsl:for-each> |
|
461 | 516 |
|
517 |
<xsl:if test="count(//efg:avcreation) > 0"> |
|
518 |
<xsl:if test="not ($format)"> |
|
519 |
<xsl:for-each |
|
520 |
select="efg:avManifestation/efg:format/efg:digital/efg:originalStatus[translate(normalize-space(.), $upper, $small) = 'born digital']"> |
|
521 |
<dc:format> |
|
522 |
<xsl:value-of select="efg:container"/> |
|
523 |
</dc:format> |
|
524 |
</xsl:for-each> |
|
525 |
</xsl:if> |
|
526 |
</xsl:if> |
|
527 |
|
|
528 |
|
|
462 | 529 |
<!-- dcterms:extent --> |
463 | 530 |
<xsl:for-each select="//efg:physicalFormat"> |
464 | 531 |
<dcterms:extent> |
... | ... | |
488 | 555 |
</xsl:when> |
489 | 556 |
|
490 | 557 |
<xsl:when test="$keyword_type = 'form'"> |
491 |
<dc:type> |
|
492 |
<xsl:attribute name="xml:lang"> |
|
493 |
<xsl:value-of select="translate(@lang, $upper, $small)" |
|
494 |
/> |
|
495 |
</xsl:attribute> |
|
496 |
<xsl:value-of select="./efg:term"/> |
|
497 |
</dc:type> |
|
558 |
<xsl:if test="not(./efg:term = 'n/a')"> |
|
559 |
<dc:type> |
|
560 |
<xsl:choose> |
|
561 |
<xsl:when test="not(@lang = 'n/a')"> |
|
562 |
<xsl:attribute name="xml:lang"> |
|
563 |
<xsl:value-of select="translate(@lang, $upper, $small)"/> |
|
564 |
</xsl:attribute> |
|
565 |
</xsl:when> |
|
566 |
<xsl:otherwise> |
|
567 |
<xsl:attribute name="xml:lang"> |
|
568 |
<xsl:value-of select="string('en')"/> |
|
569 |
</xsl:attribute> |
|
570 |
</xsl:otherwise> |
|
571 |
</xsl:choose> |
|
572 |
|
|
573 |
<xsl:choose> |
|
574 |
<xsl:when test="translate(normalize-space(./efg:term),$upper,$small) = 'documentary'">Documentary film</xsl:when> |
|
575 |
<xsl:when test="translate(normalize-space(./efg:term),$upper,$small) = 'non-fiction'">Non-fiction film</xsl:when> |
|
576 |
<xsl:otherwise> |
|
577 |
<xsl:value-of select="./efg:term"/> |
|
578 |
</xsl:otherwise> |
|
579 |
</xsl:choose> |
|
580 |
</dc:type> |
|
581 |
</xsl:if> |
|
582 |
|
|
498 | 583 |
</xsl:when> |
499 | 584 |
</xsl:choose> |
500 | 585 |
</xsl:for-each> |
... | ... | |
504 | 589 |
<xsl:value-of select="./efg:term"/> |
505 | 590 |
</dcterms:subject> |
506 | 591 |
</xsl:for-each> |
592 |
<!--*************************************************************--> |
|
593 |
<xsl:for-each select="//efg:relPerson[translate(normalize-space(./efg:type), $upper, $small)='depicts']"> |
|
507 | 594 |
|
595 |
<dcterms:subject> |
|
596 |
<xsl:value-of select="./efg:name"/> |
|
597 |
</dcterms:subject> |
|
598 |
|
|
599 |
</xsl:for-each> |
|
600 |
|
|
601 |
<!--************************************************************--> |
|
508 | 602 |
<!-- dc:title dcterms:alternative --> |
509 | 603 |
<xsl:for-each select="efg:title"> |
510 | 604 |
<xsl:variable name="title_rel" |
511 | 605 |
select="translate(normalize-space(./efg:relation), $upper, $small)"/> |
512 | 606 |
<xsl:choose> |
513 | 607 |
<xsl:when |
514 |
test="$title_rel = 'original title' and $creationType = 'avcreation'">
|
|
608 |
test="($title_rel = 'original title' or $title_rel = 'archive title') and $creationType = 'avcreation'">
|
|
515 | 609 |
<dc:title> |
516 | 610 |
<xsl:call-template name="lang"/> |
517 |
|
|
518 | 611 |
<xsl:value-of select="./efg:text"/> |
519 | 612 |
</dc:title> |
520 | 613 |
</xsl:when> |
... | ... | |
539 | 632 |
<xsl:variable name="title_rel" |
540 | 633 |
select="translate(normalize-space(./efg:relation), $upper, $small)"/> |
541 | 634 |
<xsl:choose> |
542 |
<!-- <xsl:when test="$title_rel = 'original title'"> |
|
543 |
<dc:title> |
|
544 |
<xsl:call-template name="lang"/> |
|
545 |
<xsl:value-of select="./efg:text"/> |
|
546 |
</dc:title> |
|
547 |
</xsl:when>--> |
|
635 |
|
|
548 | 636 |
<xsl:when test="$title_rel = 'main title'"> |
549 |
<xsl:if test="string-length($navct) = 0">
|
|
637 |
<xsl:if test="count($navct) = 0">
|
|
550 | 638 |
<dc:title> |
551 | 639 |
<xsl:call-template name="lang"/> |
552 | 640 |
|
... | ... | |
571 | 659 |
select="translate(normalize-space(./efg:relation), $upper, $small)"/> |
572 | 660 |
<xsl:choose> |
573 | 661 |
<xsl:when test="$title_rel = 'original title'"> |
574 |
<xsl:if test="string-length($avct) = 0"> |
|
662 |
|
|
663 |
<xsl:if test="not($avct)"> |
|
575 | 664 |
<dc:title> |
576 | 665 |
<xsl:call-template name="lang"/> |
577 | 666 |
|
... | ... | |
579 | 668 |
</dc:title> |
580 | 669 |
</xsl:if> |
581 | 670 |
</xsl:when> |
582 |
<!-- <xsl:when test="$title_rel = 'main title'"> |
|
583 |
<dc:title> |
|
584 |
<xsl:call-template name="lang"/> |
|
585 | 671 |
|
586 |
<xsl:value-of select="./efg:text"/> |
|
587 |
</dc:title> |
|
588 |
</xsl:when>--> |
|
589 | 672 |
<xsl:otherwise> |
590 | 673 |
<xsl:if test="$existavct = 0"> |
591 | 674 |
<dcterms:alternative> |
... | ... | |
599 | 682 |
</xsl:for-each> |
600 | 683 |
|
601 | 684 |
<!-- dc:type --> |
685 |
|
|
602 | 686 |
<xsl:for-each select="//efg:specificType"> |
603 | 687 |
<xsl:choose> |
604 | 688 |
<xsl:when |
605 | 689 |
test="count(normalize-space(.)) > 0 and normalize-space(.) != 'n/a'"> |
606 | 690 |
<dc:type> |
607 |
<xsl:value-of select="."/> |
|
691 |
<xsl:attribute name="xml:lang">en</xsl:attribute> |
|
692 |
<xsl:choose> |
|
693 |
<xsl:when test="translate(normalize-space(.),$upper,$small)='photo' or |
|
694 |
translate(normalize-space(.),$upper,$small) = 'unclassified photo'"> |
|
695 |
<xsl:value-of select="string('Photograph')"/> |
|
696 |
</xsl:when> |
|
697 |
<xsl:otherwise> |
|
698 |
<xsl:value-of select="."/> |
|
699 |
</xsl:otherwise> |
|
700 |
</xsl:choose> |
|
608 | 701 |
</dc:type> |
702 |
<xsl:if test="translate(normalize-space(.),$upper,$small)='film still' or |
|
703 |
translate(normalize-space(.),$upper,$small)='set photo' or |
|
704 |
translate(normalize-space(.),$upper,$small)='promotional photo'"> |
|
705 |
<dc:type> |
|
706 |
<xsl:attribute name="xml:lang">en</xsl:attribute> |
|
707 |
<xsl:value-of select="string('Photograph')"/> |
|
708 |
</dc:type> |
|
709 |
</xsl:if> |
|
609 | 710 |
</xsl:when> |
610 | 711 |
<xsl:otherwise> |
611 |
<dc:type> |
|
712 |
<xsl:if test="//efg:avManifestation/efg:item/efg:type"> |
|
713 |
<dc:type> |
|
612 | 714 |
<xsl:value-of |
613 |
select="//efg:avManifestation/efg:item/efg:type"/>
|
|
715 |
select="."/>
|
|
614 | 716 |
</dc:type> |
717 |
</xsl:if> |
|
718 |
|
|
615 | 719 |
</xsl:otherwise> |
616 | 720 |
</xsl:choose> |
617 | 721 |
</xsl:for-each> |
722 |
<!-- <xsl:for-each select="//efg:avcreation/efg:keyword[@type='Form']"> |
|
723 |
<dc:type> |
|
724 |
<TERM><xsl:value-of select="./efg:term"/></TERM> |
|
725 |
<xsl:choose> |
|
726 |
<xsl:when test="translate(normalize-space(./efg:term),$upper,$small) eq 'non-fiction'"> |
|
727 |
<xsl:value-of select="string('Non-fiction film')"/> |
|
728 |
</xsl:when> |
|
729 |
<xsl:otherwise><xsl:value-of select="./@Term"/></xsl:otherwise> |
|
730 |
</xsl:choose> |
|
618 | 731 |
|
732 |
</dc:type> |
|
733 |
</xsl:for-each>--> |
|
619 | 734 |
<!-- cdterms:created --> |
620 | 735 |
<xsl:for-each select="//efg:productionYear"> |
621 | 736 |
<dcterms:created> |
622 |
<xsl:value-of select="."/> |
|
737 |
<xsl:call-template name="date"> |
|
738 |
<xsl:with-param name="value" |
|
739 |
select="." |
|
740 |
/> |
|
741 |
</xsl:call-template> |
|
623 | 742 |
</dcterms:created> |
624 | 743 |
</xsl:for-each> |
625 |
<xsl:for-each select="//efg:nonAVManifestation/efg:dateCreated">
|
|
744 |
<xsl:for-each select="//efg:nonavcreation/efg:dateCreated">
|
|
626 | 745 |
<dcterms:created> |
627 |
<xsl:value-of select="."/> |
|
746 |
<xsl:call-template name="date"> |
|
747 |
<xsl:with-param name="value" |
|
748 |
select="." |
|
749 |
/> |
|
750 |
</xsl:call-template> |
|
628 | 751 |
</dcterms:created> |
629 | 752 |
</xsl:for-each> |
630 | 753 |
|
... | ... | |
670 | 793 |
|
671 | 794 |
<xsl:for-each select="efg:countryOfReference"> |
672 | 795 |
<dcterms:spatial> |
673 |
<xsl:value-of select="."/> |
|
796 |
<xsl:choose> |
|
797 |
<xsl:when test="translate(.,$upper,$small) = 'it'">Italy</xsl:when> |
|
798 |
<xsl:when test="translate(.,$upper,$small) = 'de'">Germany</xsl:when> |
|
799 |
<xsl:when test="translate(.,$upper,$small) = 'dk'">Denmark</xsl:when> |
|
800 |
<xsl:when test="translate(.,$upper,$small) = 'ddrze'">German Democratic Republic</xsl:when> |
|
801 |
<xsl:when test="translate(.,$upper,$small) = 'us'">United States of America</xsl:when> |
|
802 |
<xsl:when test="translate(.,$upper,$small) = 'pl'">Poland</xsl:when> |
|
803 |
<xsl:when test="translate(.,$upper,$small) = 'at'">Austria</xsl:when> |
|
804 |
<xsl:when test="translate(.,$upper,$small) = 'gb'">United Kingdom of Great Britain and Northern Ireland</xsl:when> |
|
805 |
<xsl:when test="translate(.,$upper,$small) = 'fr'">France</xsl:when> |
|
806 |
<xsl:when test="translate(.,$upper,$small) = 'gr'">Greece</xsl:when> |
|
807 |
<xsl:when test="translate(.,$upper,$small) = 'sk'">Slovakia</xsl:when> |
|
808 |
<xsl:when test="translate(.,$upper,$small) = 'hu'">Hungary</xsl:when> |
|
809 |
<xsl:when test="translate(.,$upper,$small) = 'ch'">Switzerland</xsl:when> |
|
810 |
<xsl:when test="translate(.,$upper,$small) = 'fi'">Finland</xsl:when> |
|
811 |
<xsl:when test="translate(.,$upper,$small) = 'se'">Sweden</xsl:when> |
|
812 |
<xsl:when test="translate(.,$upper,$small) = 'es'">Spain</xsl:when> |
|
813 |
<xsl:when test="translate(.,$upper,$small) = 'no'">Norway</xsl:when> |
|
814 |
<xsl:when test="translate(.,$upper,$small) = 'nl'">Netherlands</xsl:when> |
|
815 |
<xsl:when test="translate(.,$upper,$small) = 'deuqg'">Germany</xsl:when> |
|
816 |
<xsl:when test="translate(.,$upper,$small) = 'cz'">Czechia</xsl:when> |
|
817 |
<xsl:otherwise> |
|
818 |
<xsl:value-of select="."/> |
|
819 |
</xsl:otherwise> |
|
820 |
</xsl:choose> |
|
674 | 821 |
</dcterms:spatial> |
675 | 822 |
</xsl:for-each> |
676 | 823 |
|
... | ... | |
684 | 831 |
<!-- edm:type --> |
685 | 832 |
<xsl:for-each select="//efg:item/efg:type"> |
686 | 833 |
<edm:type> |
687 |
<xsl:value-of select="."/>
|
|
834 |
<xsl:value-of select="translate(normalize-space(.), $small, $upper)"/>
|
|
688 | 835 |
</edm:type> |
689 | 836 |
</xsl:for-each> |
690 | 837 |
|
... | ... | |
700 | 847 |
<xsl:for-each select="//efg:avManifestation"> |
701 | 848 |
<xsl:for-each select=".//efg:isShownBy"> |
702 | 849 |
<xsl:if test=". != ''"> |
850 |
|
|
703 | 851 |
<edm:WebResource> |
704 | 852 |
<xsl:attribute name="rdf:about"> |
705 |
<xsl:value-of select="."/> |
|
853 |
<xsl:choose> |
|
854 |
<xsl:when test="substring(normalize-space(.), 1, 1) = '
'"> |
|
855 |
<xsl:value-of select="normalize-space(substring(normalize-space(.),3))"/> |
|
856 |
</xsl:when> |
|
857 |
<xsl:otherwise> |
|
858 |
<xsl:value-of select="normalize-space(.)"/> |
|
859 |
</xsl:otherwise> |
|
860 |
</xsl:choose> |
|
706 | 861 |
</xsl:attribute> |
862 |
|
|
707 | 863 |
<xsl:if |
708 | 864 |
test="../../efg:format/efg:digital/efg:originalStatus[translate(normalize-space(.), $upper, $small)]"> |
709 | 865 |
<dc:format> |
... | ... | |
712 | 868 |
/> |
713 | 869 |
</dc:format> |
714 | 870 |
</xsl:if> |
871 |
<xsl:variable name="format" select="//efg:item/efg:fileFormat"/> |
|
872 |
|
|
873 |
<xsl:if test="$format"> |
|
874 |
<dc:format> |
|
875 |
<xsl:value-of select="$format"/> |
|
876 |
</dc:format> |
|
877 |
</xsl:if> |
|
878 |
<xsl:if test="count(//efg:avcreation) > 0"> |
|
879 |
<xsl:if test="not ($format)"> |
|
880 |
<xsl:for-each select="efg:avManifestation/efg:format/efg:digital/efg:originalStatus[not(translate(normalize-space(.),$upper,$small)='born digital')]"> |
|
881 |
|
|
882 |
<!--<xsl:if test="not(./efg:originalStatus[translate(normalize-space(.), $upper, $small) = 'born digital'])">--> |
|
883 |
<dc:format> |
|
884 |
<xsl:value-of select="./efg:container"/> |
|
885 |
</dc:format> |
|
886 |
<!--</xsl:if>--> |
|
887 |
</xsl:for-each> |
|
888 |
</xsl:if> |
|
889 |
</xsl:if> |
|
890 |
<xsl:for-each |
|
891 |
select="efg:nonAVManifestation/efg:digitalFormat[not(translate(normalize-space(@status), $upper, $small) = 'born digital')]"> |
|
892 |
<dc:format> |
|
893 |
<xsl:value-of select="."/> |
|
894 |
</dc:format> |
|
895 |
|
|
896 |
</xsl:for-each> |
|
715 | 897 |
<xsl:for-each select="../../efg:duration"> |
716 | 898 |
<dcterms:extent> |
717 | 899 |
<xsl:value-of select="."/> |
... | ... | |
730 | 912 |
</xsl:for-each> |
731 | 913 |
<xsl:for-each select="//efg:nonAVManifestation"> |
732 | 914 |
<xsl:for-each select=".//efg:isShownBy"> |
915 |
|
|
733 | 916 |
<edm:WebResource> |
734 | 917 |
<xsl:attribute name="rdf:about"> |
735 |
<xsl:value-of select="."/>
|
|
918 |
<xsl:value-of select="normalize-space(.)"/>
|
|
736 | 919 |
</xsl:attribute> |
737 | 920 |
<xsl:if |
738 | 921 |
test="../../efg:digitalFormat[translate(normalize-space(@status), $upper, $small)]"> |
... | ... | |
780 | 963 |
|
781 | 964 |
</xsl:stylesheet> |
782 | 965 |
|
966 |
|
|
783 | 967 |
]]> |
784 | 968 |
</CODE> |
785 | 969 |
</SCRIPT> |
Also available in: Unified diff
changed according to #10506