Project

General

Profile

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[
16
					<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:efg="http://www.europeanfilmgateway.eu/efg"
17
					                xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"
18
					                xmlns:dri="http://www.driver-repository.eu/namespace/dri"
19
					                xmlns:exslt="http://exslt.org/common" version="1.0"
20
					                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
								<!-- NB: only records with a title are processed -->
30
								<xsl:variable name="body">
31
									<xsl:if test="count(//efg:title) &gt; 0">
32
										<xsl:apply-templates select=".//efg:efgEntity/efg:avcreation"/>
33
										<xsl:apply-templates select=".//efg:efgEntity/efg:nonavcreation"/>
34
									</xsl:if>
35
								</xsl:variable>
36

    
37
								<xsl:choose>
38
									<xsl:when test="exslt:node-set($body)/*">
39
										<xsl:apply-templates select=".//efg:efgEntity/efg:avcreation"/>
40
										<xsl:apply-templates select=".//efg:efgEntity/efg:nonavcreation"/>
41
									</xsl:when>
42
									<xsl:otherwise>
43
										<JUNK/>
44
									</xsl:otherwise>
45
								</xsl:choose>
46
							</objectRecord>
47
						</xsl:template>
48

    
49

    
50
						<xsl:template match="identifier | dri:objIdentifier | dri:recordIdentifier" mode="header">
51
							<xsl:param name="pos"/>
52
							<xsl:copy>
53
								<xsl:value-of select="concat(text(), '-', $pos)"/>
54
							</xsl:copy>
55
						</xsl:template>
56

    
57
						<xsl:template match="*" mode="header">
58
							<xsl:param name="pos"/>
59
							<xsl:copy-of select="."/>
60
						</xsl:template>
61

    
62

    
63
						<xsl:template match="efg:avcreation | efg:nonavcreation">
64

    
65
							<xsl:variable name="creationType" select="local-name(.)"/>
66

    
67
							<record>
68
								<header>
69
									<xsl:apply-templates select="/record/header/*" mode="header">
70
										<xsl:with-param name="pos">
71
											<xsl:value-of select="position()"/>
72
										</xsl:with-param>
73
									</xsl:apply-templates>
74
								</header>
75
								<metadata>
76
									<rdf:RDF xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
77
									         xmlns:dc="http://purl.org/dc/elements/1.1/"
78
									         xmlns:edm="http://www.europeana.eu/schemas/edm/"
79
									         xmlns:ore="http://www.openarchives.org/ore/terms/"
80
									         xmlns:dcterms="http://purl.org/dc/terms/"
81
									         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
82
									         xsi:schemaLocation="http://www.w3.org/1999/02/22-rdf-syntax-ns# EDM-INTERNAL.xsd"
83
									>
84

    
85
										<xsl:variable name="efg_provider" select="//efg:provider"/>
86

    
87

    
88
										<ore:Aggregation>
89
											<xsl:attribute name="rdf:about">
90
												<xsl:value-of select="concat('AGGR::', $efg_provider, //efg:sourceID)"/>
91
											</xsl:attribute>
92

    
93
											<edm:aggregatedCHO>
94
												<xsl:attribute name="rdf:resource">
95
													<xsl:value-of select="//efg:sourceID"/>
96
												</xsl:attribute>
97
											</edm:aggregatedCHO>
98

    
99
											<xsl:for-each select="//efg:avManifestation">
100
												<xsl:variable name="status">
101
													<xsl:value-of
102
															select="translate(normalize-space(.//efg:digitalFormat/efg:status), $upper, $small)"
103
													/>
104
												</xsl:variable>
105

    
106
												<xsl:choose>
107
													<xsl:when test="$status != 'born digital'">
108
														<xsl:variable name="rightStatus">
109
															<xsl:value-of
110
																	select="translate(normalize-space(.//efg:rightsStatus), $upper, $small)"
111
															/>
112
														</xsl:variable>
113

    
114
														<edm:aggregatedCHO>
115
															<xsl:attribute name="rdf:resource">
116
																<xsl:value-of select=".//efg:identifier"/>
117
															</xsl:attribute>
118
														</edm:aggregatedCHO>
119
														<dc:rights>
120
															<xsl:value-of select=".//efg:rightsHolder"/>
121
														</dc:rights>
122
														<xsl:choose>
123
															<xsl:when test="string-length($rightStatus) &gt; 0">
124
																<edm:rights>
125
																	<xsl:value-of select="$rightStatus"/>
126
																</edm:rights>
127
															</xsl:when>
128
														</xsl:choose>
129
														<xsl:for-each select="//efg:isShownBy">
130
															<edm:isShownBy>
131
																<xsl:value-of select="."/>
132
															</edm:isShownBy>
133
														</xsl:for-each>
134
														<xsl:for-each select="//efg:isShownAt">
135
															<edm:isShownAt>
136
																<xsl:value-of select="."/>
137
															</edm:isShownAt>
138
														</xsl:for-each>
139
														<xsl:for-each select="//efg:thumbnail">
140
															<edm:isShownBy>
141
																<xsl:value-of select="."/>
142
															</edm:isShownBy>
143
														</xsl:for-each>
144

    
145

    
146
													</xsl:when>
147
												</xsl:choose>
148

    
149
											</xsl:for-each>
150

    
151
											<xsl:for-each select="//efg:nonAVManifestation">
152
												<xsl:variable name="status">
153
													<xsl:value-of
154
															select="translate(normalize-space(.//efg:digitalFormat/efg:status), $upper, $small)"
155
													/>
156
												</xsl:variable>
157

    
158
												<xsl:choose>
159
													<xsl:when test="$status != 'born digital'">
160
														<xsl:variable name="rightStatus">
161
															<xsl:value-of
162
																	select="translate(normalize-space(.//efg:rightsStatus), $upper, $small)"
163
															/>
164
														</xsl:variable>
165

    
166
														<edm:aggregatedCHO>
167
															<xsl:attribute name="rdf:resource">
168
																<xsl:value-of select=".//efg:identifier"/>
169
															</xsl:attribute>
170
														</edm:aggregatedCHO>
171
														<dc:rights>
172
															<xsl:value-of select=".//efg:rightsHolder"/>
173
														</dc:rights>
174
														<xsl:choose>
175
															<xsl:when test="string-length($rightStatus) &gt; 0">
176
																<edm:rights>
177
																	<xsl:value-of select="$status"/>
178
																</edm:rights>
179
															</xsl:when>
180
														</xsl:choose>
181
														<xsl:for-each select="//efg:isShownBy">
182
															<edm:isShownBy>
183
																<xsl:value-of select="."/>
184
															</edm:isShownBy>
185
														</xsl:for-each>
186
														<xsl:for-each select="//efg:isShownAt">
187
															<edm:isShownAt>
188
																<xsl:value-of select="."/>
189
															</edm:isShownAt>
190
														</xsl:for-each>
191
														<xsl:for-each select="//efg:thumbnail">
192
															<edm:isShownBy>
193
																<xsl:value-of select="."/>
194
															</edm:isShownBy>
195
														</xsl:for-each>
196

    
197

    
198
													</xsl:when>
199
												</xsl:choose>
200

    
201
											</xsl:for-each>
202

    
203

    
204
											<edm:dataProvider>
205
												<xsl:value-of select="$efg_provider"/>
206
											</edm:dataProvider>
207
											<edm:provider>EFG - The European Film Gateway</edm:provider>
208

    
209
										</ore:Aggregation>
210

    
211

    
212
										<edm:ProvidedCHO>
213
											<xsl:attribute name="rdf:about">
214
												<xsl:value-of select="//efg:recordSource[1]/efg:sourceID"/>
215
											</xsl:attribute>
216
											<xsl:for-each select="//efg:sourceID">
217
												<dc:idenetifier>
218
													<xsl:value-of select="."/>
219
												</dc:idenetifier>
220
											</xsl:for-each>
221
											<xsl:for-each select="//efg:language">
222
												<dc:language>
223
													<xsl:value-of select="."/>
224
												</dc:language>
225
											</xsl:for-each>
226

    
227
											<xsl:for-each select="//efg:relPerson">
228
												<xsl:variable name="person_type"
229
												              select="translate(normalize-space(./efg:type), $upper, $small)"/>
230
												<xsl:choose>
231
													<xsl:when
232
															test="$person_type = 'director of photography' or $person_type = 'screenplay' or $person_type = 'editor' or $person_type = 'music composer'">
233
														<dc:contributor>
234
															<xsl:value-of select="./efg:name"/>
235
														</dc:contributor>
236
													</xsl:when>
237
													<xsl:when test="$person_type = 'director'">
238
														<dc:creator>
239
															<xsl:value-of select="./efg:name"/>
240
														</dc:creator>
241
													</xsl:when>
242
													<xsl:when
243
															test="
244
										$person_type = 'publisher' or $person_type = 'creator' or $person_type = 'designer' or $person_type = 'photographer'
245
										or $person_type = 'lithographer' or $person_type = 'book designer' or $person_type = 'author'
246
										or $person_type = 'lyrics' or $person_type = 'composer' or $person_type = 'illustrator' or $person_type = 'artist'
247
										or $person_type = 'manufacturer' or $person_type = 'attributed to' or $person_type = 'stills photographer'">
248
														<dc:creator>
249
															<xsl:value-of select="./efg:name"/>
250
														</dc:creator>
251
													</xsl:when>
252
												</xsl:choose>
253
											</xsl:for-each>
254
											<xsl:for-each select="//efg:relCorporate">
255
												<xsl:variable name="corporate_type"
256
												              select="translate(normalize-space(./efg:type), $upper, $small)"/>
257
												<xsl:choose>
258
													<xsl:when test="$corporate_type = 'production company'">
259
														<dc:contributor>
260
															<xsl:value-of select="./efg:name"/>
261
														</dc:contributor>
262
													</xsl:when>
263
													<xsl:when test="$corporate_type = 'publisher'">
264
														<dc:publisher>
265
															<xsl:value-of select="./efg:name"/>
266
														</dc:publisher>
267
													</xsl:when>
268
												</xsl:choose>
269
											</xsl:for-each>
270

    
271
											<xsl:for-each select="//efg:description">
272
												<dc:description>
273
													<xsl:attribute name="xml:lang">
274
														<xsl:value-of select="./@lang"/>
275
													</xsl:attribute>
276
													<xsl:value-of select="."/>
277
												</dc:description>
278
											</xsl:for-each>
279
											<xsl:for-each select="//efg:DigitalFormat">
280
												<xsl:choose>
281
													<xsl:when test="./Status = 'Born digital'">
282
														<dc:format>
283
															<xsl:value-of select="./efg:Container"/>
284
														</dc:format>
285
													</xsl:when>
286
												</xsl:choose>
287

    
288
											</xsl:for-each>
289

    
290

    
291
											<xsl:for-each select="//efg:avcreation//efg:keywords">
292
												<xsl:variable name="keyword_type"
293
												              select="translate(normalize-space(./@type), $upper, $small)"/>
294
												<xsl:choose>
295
													<xsl:when
296
															test="$keyword_type = 'genre' or $keyword_type = 'lcsh' or $keyword_type = 'person' or $keyword_type = 'subject' or $keyword_type = 'place' or $keyword_type = 'project' or $keyword_type = 'n/a'">
297
														<dcterms:subject>
298
															<xsl:attribute name="xml:lang">
299
																<xsl:value-of select="@lang"/>
300
															</xsl:attribute>
301
															<xsl:value-of select="./efg:term"/>
302
														</dcterms:subject>
303
													</xsl:when>
304

    
305
													<xsl:when test="$keyword_type = 'form'">
306
														<dc:type>
307
															<xsl:attribute name="xml:lang">
308
																<xsl:value-of select="@lang"/>
309
															</xsl:attribute>
310
															<xsl:value-of select="./efg:term"/>
311
														</dc:type>
312
													</xsl:when>
313
												</xsl:choose>
314
											</xsl:for-each>
315
											<xsl:for-each select="//efg:nonavcreation//efg:keywords">
316
												<dcterms:subject>
317
													<xsl:value-of select="./efg:term"/>
318
												</dcterms:subject>
319
											</xsl:for-each>
320

    
321
											<xsl:for-each select="//efg:avcreation//efg:title">
322
												<xsl:variable name="title_rel"
323
												              select="translate(normalize-space(./efg:relation), $upper, $small)"/>
324
												<xsl:choose>
325
													<xsl:when test="$title_rel = 'original title'">
326
														<dc:title>
327
															<xsl:attribute name="xml:lang">
328
																<xsl:value-of select="@lang"/>
329
															</xsl:attribute>
330
															<xsl:value-of select="./efg:text"/>
331
														</dc:title>
332
													</xsl:when>
333

    
334
													<xsl:otherwise>
335
														<dcterms:alternative>
336
															<xsl:attribute name="xml:lang">
337
																<xsl:value-of select="@lang"/>
338
															</xsl:attribute>
339
															<xsl:value-of select="./efg:text"/>
340
														</dcterms:alternative>
341
													</xsl:otherwise>
342
												</xsl:choose>
343
											</xsl:for-each>
344
											<xsl:for-each select="//efg:avcreation//efg:title">
345
												<xsl:variable name="title_rel"
346
												              select="translate(normalize-space(./efg:relation), $upper, $small)"/>
347
												<xsl:choose>
348
													<xsl:when test="$title_rel = 'main title'">
349
														<dc:title>
350
															<xsl:attribute name="xml:lang">
351
																<xsl:value-of select="@lang"/>
352
															</xsl:attribute>
353
															<xsl:value-of select="./efg:text"/>
354
														</dc:title>
355
													</xsl:when>
356

    
357
													<xsl:otherwise>
358
														<dcterms:alternative>
359
															<xsl:attribute name="xml:lang">
360
																<xsl:value-of select="@lang"/>
361
															</xsl:attribute>
362
															<xsl:value-of select="./efg:text"/>
363
														</dcterms:alternative>
364
													</xsl:otherwise>
365
												</xsl:choose>
366
											</xsl:for-each>
367

    
368

    
369

    
370

    
371

    
372

    
373
											<xsl:for-each select="//efg:nonavcreation//efg:title">
374
												<xsl:variable name="title_rel"
375
													select="translate(normalize-space(./efg:relation), $upper, $small)"/>
376
												<xsl:choose>
377
													<xsl:when test="$title_rel = 'original title'">
378
														<dc:title>
379
															<xsl:attribute name="xml:lang">
380
																<xsl:value-of select="@lang"/>
381
															</xsl:attribute>
382
															<xsl:value-of select="./efg:text"/>
383
														</dc:title>
384
													</xsl:when>
385

    
386
													<xsl:otherwise>
387
														<dcterms:alternative>
388
															<xsl:attribute name="xml:lang">
389
																<xsl:value-of select="@lang"/>
390
															</xsl:attribute>
391
															<xsl:value-of select="./efg:text"/>
392
														</dcterms:alternative>
393
													</xsl:otherwise>
394
												</xsl:choose>
395
											</xsl:for-each>
396
											<xsl:for-each select="//efg:nonavcreation//efg:title">
397
												<xsl:variable name="title_rel"
398
													select="translate(normalize-space(./efg:relation), $upper, $small)"/>
399
												<xsl:choose>
400
													<xsl:when test="$title_rel = 'main title'">
401
														<dc:title>
402
															<xsl:attribute name="xml:lang">
403
																<xsl:value-of select="@lang"/>
404
															</xsl:attribute>
405
															<xsl:value-of select="./efg:text"/>
406
														</dc:title>
407
													</xsl:when>
408

    
409
													<xsl:otherwise>
410
														<dcterms:alternative>
411
															<xsl:attribute name="xml:lang">
412
																<xsl:value-of select="@lang"/>
413
															</xsl:attribute>
414
															<xsl:value-of select="./efg:text"/>
415
														</dcterms:alternative>
416
													</xsl:otherwise>
417
												</xsl:choose>
418
											</xsl:for-each>
419

    
420

    
421

    
422

    
423

    
424

    
425

    
426

    
427

    
428
											<xsl:for-each select="//efg:specificType">
429
												<xsl:choose>
430
													<xsl:when
431
															test="count(normalize-space(.)) &gt; 0 and normalize-space(.) != 'n/a'">
432
														<dc:type>
433
															<xsl:value-of select="."/>
434
														</dc:type>
435
													</xsl:when>
436
													<xsl:otherwise>
437
														<dc:type>
438
															<xsl:value-of
439
																	select="//efg:avManifestation/efg:item/efg:type"/>
440
														</dc:type>
441
													</xsl:otherwise>
442
												</xsl:choose>
443
											</xsl:for-each>
444

    
445
											<xsl:for-each select="//efg:productionYear">
446
												<dcterms:created>
447
													<xsl:value-of select="."/>
448
												</dcterms:created>
449
											</xsl:for-each>
450

    
451
											<xsl:for-each select="//efg:nonAVManifestation/efg:dateCreated">
452
												<dcterms:created>
453
													<xsl:value-of select="."/>
454
												</dcterms:created>
455
											</xsl:for-each>
456
											<xsl:for-each select="//efg:physicalFormat">
457
												<dc:format>
458
													<xsl:value-of select="./@size"/>
459
												</dc:format>
460
											</xsl:for-each>
461
											<xsl:for-each
462
													select="//efg:nonAVManifestation/efg:date[./efg:type = 'issued']">
463
												<dcterms:issued>
464
													<xsl:value-of select="."/>
465
												</dcterms:issued>
466
											</xsl:for-each>
467
											<xsl:for-each select="//efg:coverage/efg:spatial">
468
												<dcterms:spatial>
469
													<xsl:value-of select="."/>
470
												</dcterms:spatial>
471
											</xsl:for-each>
472

    
473
											<xsl:for-each select="//efg:geographicScope/efg:place">
474
												<dcterms:spatial>
475
													<xsl:value-of select="."/>
476
												</dcterms:spatial>
477
											</xsl:for-each>
478
											<xsl:for-each select="//efg:countryOfReference">
479
												<dcterms:spatial>
480
													<xsl:value-of select="."/>
481
												</dcterms:spatial>
482
											</xsl:for-each>
483
											<xsl:for-each select="//efg:coverage/efg:temporal">
484
												<dcterms:temporal>
485
													<xsl:value-of select="."/>
486
												</dcterms:temporal>
487
											</xsl:for-each>
488
											<xsl:for-each select="//efg:item/efg:type">
489
												<edm:type>
490
													<xsl:value-of select="."/>
491
												</edm:type>
492
											</xsl:for-each>
493
											<xsl:for-each select="//efg:avManifestation//efg:provenance">
494
												<dcterms:provenance>
495
													<xsl:value-of select="."/>
496
												</dcterms:provenance>
497
											</xsl:for-each>
498
										</edm:ProvidedCHO>
499

    
500

    
501
										<xsl:for-each select="//efg:avManifestation">
502
											<xsl:variable name="status">
503
												<xsl:value-of
504
														select="translate(normalize-space(.//efg:digitalFormat/efg:status), $upper, $small)"
505
												/>
506
											</xsl:variable>
507

    
508
											<xsl:choose>
509
												<xsl:when test="$status != 'born digital'">
510
													<edm:WebResource>
511
														<xsl:attribute name="rdf:about">
512
															<xsl:value-of select=".//efg:identifier"/>
513
														</xsl:attribute>
514
														<dc:format>
515
															<xsl:value-of select="$status"/>
516
														</dc:format>
517
														<xsl:for-each select=".//efg:duration">
518
															<dcterms:extent>
519
																<xsl:value-of select="."/>
520
															</dcterms:extent>
521
														</xsl:for-each>
522
														<xsl:variable name="rightStatus">
523
															<xsl:value-of
524
																	select="translate(normalize-space(.//efg:rightsStatus), $upper, $small)"
525
															/>
526
														</xsl:variable>
527
														<xsl:choose>
528
															<xsl:when test="$rightStatus = 'copyright protected'">
529
																<edm:rights>http://www.europeana.eu/rights/rr-f/</edm:rights>
530
															</xsl:when>
531
															<xsl:when test="$rightStatus = 'not copyright protected'">
532
																<edm:rights>http://creativecommons.org/publicdomain/mark/1.0/</edm:rights>
533
															</xsl:when>
534
															<xsl:when test="$rightStatus = 'public domain'">
535
																<edm:rights>http://creativecommons.org/publicdomain/mark/1.0/</edm:rights>
536
															</xsl:when>
537
															<xsl:when test="$rightStatus = 'orphan'">
538
																<edm:rights>http://www.europeana.eu/rights/orphan-work-eu/</edm:rights>
539
															</xsl:when>
540
															<xsl:when
541
																	test="$rightStatus = 'no known copyright / orphan work'">
542
																<edm:rights>http://www.europeana.eu/rights/orphan-work-eu/</edm:rights>
543
															</xsl:when>
544
															<xsl:otherwise>
545
																<edm:rights>http://www.europeana.eu/rights/rr-f/</edm:rights>
546
															</xsl:otherwise>
547
														</xsl:choose>
548
													</edm:WebResource>
549
												</xsl:when>
550
											</xsl:choose>
551

    
552
										</xsl:for-each>
553

    
554

    
555
										<xsl:for-each select="//efg:nonAVManifestation">
556
											<xsl:variable name="status">
557
												<xsl:value-of
558
														select="translate(normalize-space(.//efg:digitalFormat/efg:status), $upper, $small)"
559
												/>
560
											</xsl:variable>
561

    
562
											<xsl:choose>
563
												<xsl:when test="$status != 'born digital'">
564
													<edm:WebResource>
565
														<xsl:attribute name="rdf:about">
566
															<xsl:value-of select=".//efg:identifier"/>
567
														</xsl:attribute>
568
														<dc:format>
569
															<xsl:value-of select="$status"/>
570
														</dc:format>
571
														<xsl:for-each select=".//efg:duration">
572
															<dcterms:extent>
573
																<xsl:value-of select="."/>
574
															</dcterms:extent>
575
														</xsl:for-each>
576
														<xsl:variable name="rightStatus">
577
															<xsl:value-of
578
																	select="translate(normalize-space(.//efg:rightsStatus), $upper, $small)"
579
															/>
580
														</xsl:variable>
581
														<xsl:choose>
582
															<xsl:when test="$rightStatus = 'copyright protected'">
583
																<edm:rights>http://www.europeana.eu/rights/rr-f/</edm:rights>
584
															</xsl:when>
585
															<xsl:when test="$rightStatus = 'not copyright protected'">
586
																<edm:rights>http://creativecommons.org/publicdomain/mark/1.0/</edm:rights>
587
															</xsl:when>
588
															<xsl:when test="$rightStatus = 'public domain'">
589
																<edm:rights>http://creativecommons.org/publicdomain/mark/1.0/</edm:rights>
590
															</xsl:when>
591
															<xsl:when test="$rightStatus = 'orphan'">
592
																<edm:rights>http://www.europeana.eu/rights/orphan-work-eu/</edm:rights>
593
															</xsl:when>
594
															<xsl:when
595
																	test="$rightStatus = 'no known copyright / orphan work'">
596
																<edm:rights>http://www.europeana.eu/rights/orphan-work-eu/</edm:rights>
597
															</xsl:when>
598
															<xsl:otherwise>
599
																<edm:rights>http://www.europeana.eu/rights/rr-f/</edm:rights>
600
															</xsl:otherwise>
601
														</xsl:choose>
602
													</edm:WebResource>
603
												</xsl:when>
604
											</xsl:choose>
605

    
606
										</xsl:for-each>
607

    
608

    
609
									</rdf:RDF>
610
								</metadata>
611
							</record>
612
						</xsl:template>
613

    
614

    
615
						<xsl:template name="distinct">
616
							<xsl:param name="var"/>
617

    
618
							<xsl:variable name="svar">
619
								<xsl:for-each select="exslt:node-set($var)/*">
620
									<xsl:sort select="."/>
621
									<xsl:copy-of select="."/>
622
								</xsl:for-each>
623
							</xsl:variable>
624

    
625
							<xsl:for-each select="exslt:node-set($svar)/*">
626
								<xsl:variable name="pos" select="position()"/>
627
								<xsl:if test="string(../child::*[$pos - 1]) != string(.)">
628
									<xsl:copy-of select="."/>
629
								</xsl:if>
630
							</xsl:for-each>
631
						</xsl:template>
632

    
633

    
634
					</xsl:stylesheet>
635
				]]>
636
				</CODE>
637
			</SCRIPT>
638
		</CONFIGURATION>
639
		<STATUS/>
640
		<SECURITY_PARAMETERS/>
641
	</BODY>
642
</RESOURCE_PROFILE>
    (1-1/1)