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