1
|
<RESOURCE_PROFILE>
|
2
|
<HEADER>
|
3
|
<RESOURCE_IDENTIFIER
|
4
|
value="EagleToEuropeana_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU=" />
|
5
|
<RESOURCE_TYPE value="TransformationRuleDSResourceType" />
|
6
|
<RESOURCE_KIND value="TransformationRuleDSResources" />
|
7
|
<RESOURCE_URI value="" />
|
8
|
<DATE_OF_CREATION value="2014-11-19T11:05:55+01:00" />
|
9
|
</HEADER>
|
10
|
<BODY>
|
11
|
<CONFIGURATION>
|
12
|
<SOURCE_METADATA_FORMAT interpretation="cleaned"
|
13
|
layout="index" name="eagle" />
|
14
|
<SINK_METADATA_FORMAT interpretation="cleaned"
|
15
|
layout="store" name="EDM" />
|
16
|
<IMPORTED />
|
17
|
<SCRIPT>
|
18
|
<TITLE>Eagle_to_Europeana</TITLE>
|
19
|
<CODE>
|
20
|
<xsl:stylesheet xmlns:dc="http://purl.org/dc/elements/1.1/"
|
21
|
xmlns:dri="http://www.driver-repository.eu/namespace/dri"
|
22
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:edm="http://www.europeana.eu/schemas/edm/"
|
23
|
xmlns:oai="http://www.openarchives.org/OAI/2.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
24
|
xmlns:ore="http://www.openarchives.org/ore/terms/" xmlns:date="http://exslt.org/dates-and-times"
|
25
|
xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
26
|
xmlns:dcterms="http://purl.org/dc/terms/"
|
27
|
extension-element-prefixes="date" version="2.0">
|
28
|
<xsl:output encoding="UTF-8" indent="yes" method="xml" omit-xml-declaration="yes" version="1.1" />
|
29
|
<xsl:variable name="DNET_ID" select="normalize-space(/eagleObject/dnetResourceIdentifier)" />
|
30
|
<xsl:variable name="CHO_ID" select="concat($DNET_ID, '::cho')" />
|
31
|
<xsl:variable name="AGGR_ID" select="concat($DNET_ID, '::ore')" />
|
32
|
<xsl:variable name="PROVIDER_NAME" select="normalize-space(/eagleObject/recordSourceInfo/@providerName)" />
|
33
|
<xsl:variable name="VISUAL_IPR_URI">
|
34
|
<xsl:choose>
|
35
|
<xsl:when test="normalize-space(/eagleObject/visualRepresentation/visualRepresentationIpr/@uri) != ''">
|
36
|
<xsl:value-of select="normalize-space(/eagleObject/visualRepresentation/visualRepresentationIpr/@uri)" />
|
37
|
</xsl:when>
|
38
|
<xsl:otherwise>http://www.europeana.eu/rights/rr-f/</xsl:otherwise>
|
39
|
</xsl:choose>
|
40
|
</xsl:variable>
|
41
|
<xsl:variable name="VISUAL_IPR_STATEMENT">
|
42
|
<xsl:choose>
|
43
|
<xsl:when test="normalize-space(/eagleObject/visualRepresentation/visualRepresentationIpr) != ''">
|
44
|
<xsl:value-of select="normalize-space(/eagleObject/visualRepresentation/visualRepresentationIpr)" />
|
45
|
</xsl:when>
|
46
|
<xsl:otherwise>
|
47
|
<xsl:value-of select="concat('Rights reserved - Free access on ', $PROVIDER_NAME)" />
|
48
|
</xsl:otherwise>
|
49
|
</xsl:choose>
|
50
|
</xsl:variable>
|
51
|
|
52
|
<!--This is used in order to avoid duplicate places in EDM output -->
|
53
|
<xsl:key match="//findingSpot/*/text()" name="toponym" use="." />
|
54
|
<xsl:template match="/">
|
55
|
<rdf:RDF>
|
56
|
<!-- PROVIDED CHO -->
|
57
|
<edm:ProvidedCHO rdf:about="{$CHO_ID}">
|
58
|
<!-- dc:contributor -->
|
59
|
<xsl:for-each select="//metadataEditor">
|
60
|
<xsl:call-template name="fieldEmitterTemplate">
|
61
|
<xsl:with-param name="fieldName">dc:contributor</xsl:with-param>
|
62
|
<xsl:with-param name="fieldValue" select="." />
|
63
|
</xsl:call-template>
|
64
|
</xsl:for-each>
|
65
|
|
66
|
<!-- dc:coverage -->
|
67
|
<xsl:for-each
|
68
|
select="//findingSpot/*[generate-id(./text()) = generate-id(key('toponym',./text())[1])]">
|
69
|
<xsl:call-template name="fieldEmitterTemplate">
|
70
|
<xsl:with-param name="fieldName">dc:coverage</xsl:with-param>
|
71
|
<xsl:with-param name="fieldValue" select="." />
|
72
|
</xsl:call-template>
|
73
|
</xsl:for-each>
|
74
|
|
75
|
<!-- dc:creator -->
|
76
|
|
77
|
<!-- dc:date -->
|
78
|
<xsl:for-each select="//originDating">
|
79
|
<xsl:call-template name="fieldEmitterTemplate">
|
80
|
<xsl:with-param name="fieldName">dc:date</xsl:with-param>
|
81
|
<xsl:with-param name="fieldValue" select="." />
|
82
|
</xsl:call-template>
|
83
|
<xsl:call-template name="fieldEmitterTemplate">
|
84
|
<xsl:with-param name="fieldName">dc:date</xsl:with-param>
|
85
|
<xsl:with-param name="fieldValue">
|
86
|
<xsl:choose>
|
87
|
<xsl:when test="./@notBefore != '' and ./@notAfter != ''">
|
88
|
<xsl:value-of select="concat('from: ', ./@notBefore, ' to: ', ./@notAfter)" />
|
89
|
</xsl:when>
|
90
|
</xsl:choose>
|
91
|
</xsl:with-param>
|
92
|
</xsl:call-template>
|
93
|
<xsl:call-template name="fieldEmitterTemplate">
|
94
|
<xsl:with-param name="fieldName">dc:date</xsl:with-param>
|
95
|
<xsl:with-param name="fieldValue" select="./@period" />
|
96
|
</xsl:call-template>
|
97
|
</xsl:for-each>
|
98
|
<xsl:for-each select="//yearOfFinding">
|
99
|
<xsl:call-template name="fieldEmitterTemplate">
|
100
|
<xsl:with-param name="fieldName">dc:date</xsl:with-param>
|
101
|
<xsl:with-param name="fieldValue" select="." />
|
102
|
</xsl:call-template>
|
103
|
</xsl:for-each>
|
104
|
|
105
|
<!-- dc:description -->
|
106
|
<xsl:for-each select="//description">
|
107
|
<xsl:call-template name="fieldEmitterTemplate">
|
108
|
<xsl:with-param name="fieldName">dc:description</xsl:with-param>
|
109
|
<xsl:with-param name="fieldValue" select="." />
|
110
|
</xsl:call-template>
|
111
|
</xsl:for-each>
|
112
|
<xsl:for-each select="//hasTranscription/text">
|
113
|
<xsl:call-template name="fieldEmitterTemplate">
|
114
|
<xsl:with-param name="fieldName"
|
115
|
select="string('dc:description')" />
|
116
|
<xsl:with-param name="fieldValue" select="." />
|
117
|
<xsl:with-param name="language" select="./@lang" />
|
118
|
</xsl:call-template>
|
119
|
</xsl:for-each>
|
120
|
|
121
|
<!-- dc:format -->
|
122
|
<xsl:for-each select="//material">
|
123
|
<xsl:choose>
|
124
|
<xsl:when test="./@uri != ''">
|
125
|
<xsl:call-template name="fieldEmitterTemplate">
|
126
|
<xsl:with-param name="fieldName">dc:format</xsl:with-param>
|
127
|
<xsl:with-param name="resource">
|
128
|
<!-- <xsl:value-of select="concat(replace(./@uri, 'lod', 'skos'), '.rdf')" /> -->
|
129
|
<xsl:value-of select="replace(./@uri, 'lod', 'skos')" />
|
130
|
</xsl:with-param>
|
131
|
</xsl:call-template>
|
132
|
</xsl:when>
|
133
|
<xsl:otherwise>
|
134
|
<xsl:call-template name="fieldEmitterTemplate">
|
135
|
<xsl:with-param name="fieldName">dc:format</xsl:with-param>
|
136
|
<xsl:with-param name="fieldPrefix">material: </xsl:with-param>
|
137
|
<xsl:with-param name="fieldValue" select="." />
|
138
|
</xsl:call-template>
|
139
|
</xsl:otherwise>
|
140
|
</xsl:choose>
|
141
|
</xsl:for-each>
|
142
|
|
143
|
<!-- dc:identifier -->
|
144
|
<xsl:for-each select="//hasTmId">
|
145
|
<xsl:if test="contains(./tmId, 'n/a_') != true">
|
146
|
<xsl:call-template name="fieldEmitterTemplate">
|
147
|
<xsl:with-param name="fieldName">dc:identifier</xsl:with-param>
|
148
|
<xsl:with-param name="fieldValue" select="./tmId" />
|
149
|
</xsl:call-template>
|
150
|
</xsl:if>
|
151
|
</xsl:for-each>
|
152
|
<xsl:for-each select="//eagleObject/recordSourceInfo">
|
153
|
<xsl:call-template name="fieldEmitterTemplate">
|
154
|
<xsl:with-param name="fieldName">dc:identifier</xsl:with-param>
|
155
|
<xsl:with-param name="fieldValue" select="." />
|
156
|
</xsl:call-template>
|
157
|
</xsl:for-each>
|
158
|
|
159
|
<!-- dc:language -->
|
160
|
<xsl:for-each select="//hasTranscription/text">
|
161
|
<xsl:call-template name="fieldEmitterTemplate">
|
162
|
<xsl:with-param name="fieldName">dc:language</xsl:with-param>
|
163
|
<xsl:with-param name="fieldValue">
|
164
|
<xsl:value-of select="./@lang" />
|
165
|
</xsl:with-param>
|
166
|
</xsl:call-template>
|
167
|
</xsl:for-each>
|
168
|
|
169
|
<!-- dc:publisher -->
|
170
|
<!-- dc:relation -->
|
171
|
<!-- dc:rights -->
|
172
|
<!-- dc:source -->
|
173
|
|
174
|
<!-- dc:subject -->
|
175
|
<dc:subject>epigraphy</dc:subject>
|
176
|
|
177
|
<!-- dc:title -->
|
178
|
<xsl:for-each select="//title">
|
179
|
<xsl:if test="normalize-space(.) != ''">
|
180
|
<xsl:call-template name="fieldEmitterTemplate">
|
181
|
<xsl:with-param name="fieldName">dc:title</xsl:with-param>
|
182
|
<xsl:with-param name="fieldValue" select="." />
|
183
|
<xsl:with-param name="language" select="./@lang" />
|
184
|
</xsl:call-template>
|
185
|
</xsl:if>
|
186
|
</xsl:for-each>
|
187
|
|
188
|
<!-- dc:type -->
|
189
|
<xsl:for-each select="//objectType">
|
190
|
<xsl:choose>
|
191
|
<xsl:when test="./@uri != ''">
|
192
|
<xsl:call-template name="fieldEmitterTemplate">
|
193
|
<xsl:with-param name="fieldName">dc:type</xsl:with-param>
|
194
|
<xsl:with-param name="resource">
|
195
|
<!-- <xsl:value-of select="concat(replace(./@uri, 'lod', 'skos'), '.rdf')" /> -->
|
196
|
<xsl:value-of select="replace(./@uri, 'lod', 'skos')" />
|
197
|
</xsl:with-param>
|
198
|
</xsl:call-template>
|
199
|
</xsl:when>
|
200
|
<xsl:otherwise>
|
201
|
<xsl:call-template name="fieldEmitterTemplate">
|
202
|
<xsl:with-param name="fieldName">dc:type</xsl:with-param>
|
203
|
<xsl:with-param name="fieldPrefix">type of object: </xsl:with-param>
|
204
|
<xsl:with-param name="fieldValue" select="." />
|
205
|
</xsl:call-template>
|
206
|
</xsl:otherwise>
|
207
|
</xsl:choose>
|
208
|
</xsl:for-each>
|
209
|
<xsl:for-each select="//decoration">
|
210
|
<xsl:choose>
|
211
|
<xsl:when test="./@uri != ''">
|
212
|
<xsl:call-template name="fieldEmitterTemplate">
|
213
|
<xsl:with-param name="fieldName">dc:type</xsl:with-param>
|
214
|
<xsl:with-param name="resource">
|
215
|
<!-- <xsl:value-of select="concat(replace(./@uri, 'lod', 'skos'), '.rdf')" /> -->
|
216
|
<xsl:value-of select="replace(./@uri, 'lod', 'skos')" />
|
217
|
</xsl:with-param>
|
218
|
</xsl:call-template>
|
219
|
</xsl:when>
|
220
|
<xsl:otherwise>
|
221
|
<xsl:call-template name="fieldEmitterTemplate">
|
222
|
<xsl:with-param name="fieldName">dc:type</xsl:with-param>
|
223
|
<xsl:with-param name="fieldPrefix">decoration:</xsl:with-param>
|
224
|
<xsl:with-param name="fieldValue" select="." />
|
225
|
</xsl:call-template>
|
226
|
</xsl:otherwise>
|
227
|
</xsl:choose>
|
228
|
</xsl:for-each>
|
229
|
<xsl:for-each select="//inscriptionType">
|
230
|
<xsl:choose>
|
231
|
<xsl:when test="./@uri != ''">
|
232
|
<xsl:call-template name="fieldEmitterTemplate">
|
233
|
<xsl:with-param name="fieldName">dc:type</xsl:with-param>
|
234
|
<xsl:with-param name="resource">
|
235
|
<!-- <xsl:value-of select="concat(replace(./@uri, 'lod', 'skos'), '.rdf')" /> -->
|
236
|
<xsl:value-of select="replace(./@uri, 'lod', 'skos')" />
|
237
|
</xsl:with-param>
|
238
|
</xsl:call-template>
|
239
|
</xsl:when>
|
240
|
<xsl:otherwise>
|
241
|
<xsl:call-template name="fieldEmitterTemplate">
|
242
|
<xsl:with-param name="fieldName">dc:type</xsl:with-param>
|
243
|
<xsl:with-param name="fieldPrefix">type of inscription: </xsl:with-param>
|
244
|
<xsl:with-param name="fieldValue" select="." />
|
245
|
</xsl:call-template>
|
246
|
</xsl:otherwise>
|
247
|
</xsl:choose>
|
248
|
</xsl:for-each>
|
249
|
|
250
|
<!-- dcterms:extent -->
|
251
|
<xsl:for-each select="//dimensions">
|
252
|
<xsl:call-template name="dimensions">
|
253
|
<xsl:with-param name="fieldName" select="string('dcterms:extent')" />
|
254
|
<xsl:with-param name="w" select="./width" />
|
255
|
<xsl:with-param name="h" select="./height" />
|
256
|
<xsl:with-param name="d" select="./depth" />
|
257
|
<xsl:with-param name="unit" select="./@unit" />
|
258
|
</xsl:call-template>
|
259
|
</xsl:for-each>
|
260
|
|
261
|
<!-- dcterms:isReferencedBy -->
|
262
|
<xsl:if test="//entityType = 'artifact'">
|
263
|
<xsl:for-each select="//bibliography">
|
264
|
<xsl:call-template name="fieldEmitterTemplate">
|
265
|
<xsl:with-param name="fieldName">dcterms:isReferencedBy</xsl:with-param>
|
266
|
<xsl:with-param name="fieldValue" select="." />
|
267
|
</xsl:call-template>
|
268
|
</xsl:for-each>
|
269
|
</xsl:if>
|
270
|
|
271
|
<!-- edm:type -->
|
272
|
<xsl:if test="//entityType = 'artifact'">
|
273
|
<edm:type>TEXT</edm:type>
|
274
|
</xsl:if>
|
275
|
<xsl:if test="//entityType = 'visual'">
|
276
|
<edm:type>IMAGE</edm:type>
|
277
|
</xsl:if>
|
278
|
</edm:ProvidedCHO>
|
279
|
|
280
|
<!-- ORE AGGREGATION -->
|
281
|
<ore:Aggregation rdf:about="{$AGGR_ID}">
|
282
|
<!-- edm:aggregatedCHO -->
|
283
|
<xsl:call-template name="fieldEmitterTemplate">
|
284
|
<xsl:with-param name="fieldName">edm:aggregatedCHO</xsl:with-param>
|
285
|
<xsl:with-param name="resource" select="$CHO_ID" />
|
286
|
</xsl:call-template>
|
287
|
|
288
|
<!-- edm:dataProvider -->
|
289
|
<edm:dataProvider>
|
290
|
<xsl:value-of select="$PROVIDER_NAME" />
|
291
|
</edm:dataProvider>
|
292
|
|
293
|
<!-- edm:isShownAt -->
|
294
|
<!-- <xsl:if test="//entityType = 'visual'"> -->
|
295
|
<xsl:call-template name="fieldEmitterTemplate">
|
296
|
<xsl:with-param name="fieldName">edm:isShownAt</xsl:with-param>
|
297
|
<xsl:with-param name="resource" select="//eagleObject/recordSourceInfo/@landingPage" />
|
298
|
</xsl:call-template>
|
299
|
<!-- </xsl:if> -->
|
300
|
|
301
|
<!-- edm:isShownBy -->
|
302
|
<xsl:if test="//entityType = 'artifact'">
|
303
|
<xsl:call-template name="fieldEmitterTemplate">
|
304
|
<xsl:with-param name="fieldName">edm:isShownBy</xsl:with-param>
|
305
|
<xsl:with-param name="resource" select="concat('http://node0.d.eagle.research-infrastructures.eu/app/mvc/pdfs/', $DNET_ID)" />
|
306
|
</xsl:call-template>
|
307
|
</xsl:if>
|
308
|
<xsl:if test="//entityType = 'visual'">
|
309
|
<xsl:call-template name="fieldEmitterTemplate">
|
310
|
<xsl:with-param name="fieldName">edm:isShownBy</xsl:with-param>
|
311
|
<xsl:with-param name="resource" select="/eagleObject/visualRepresentation/url" />
|
312
|
</xsl:call-template>
|
313
|
</xsl:if>
|
314
|
|
315
|
<!-- edm:provider -->
|
316
|
<edm:provider>EAGLE</edm:provider>
|
317
|
|
318
|
<!-- dc:rights -->
|
319
|
<xsl:if test="//entityType = 'artifact'">
|
320
|
<xsl:call-template name="fieldEmitterTemplate">
|
321
|
<xsl:with-param name="fieldName">dc:rights</xsl:with-param>
|
322
|
<xsl:with-param name="fieldValue" select="//metadataIpr" />
|
323
|
</xsl:call-template>
|
324
|
</xsl:if>
|
325
|
<xsl:if test="//entityType = 'visual'">
|
326
|
<xsl:call-template name="fieldEmitterTemplate">
|
327
|
<xsl:with-param name="fieldName">dc:rights</xsl:with-param>
|
328
|
<xsl:with-param name="fieldValue" select="$VISUAL_IPR_STATEMENT" />
|
329
|
</xsl:call-template>
|
330
|
</xsl:if>
|
331
|
|
332
|
<!-- edm:rights -->
|
333
|
<xsl:if test="//entityType = 'artifact'">
|
334
|
<xsl:call-template name="fieldEmitterTemplate">
|
335
|
<xsl:with-param name="fieldName">edm:rights</xsl:with-param>
|
336
|
<xsl:with-param name="resource" select="//metadataIpr/@uri" />
|
337
|
</xsl:call-template>
|
338
|
</xsl:if>
|
339
|
<xsl:if test="//entityType = 'visual'">
|
340
|
<xsl:call-template name="fieldEmitterTemplate">
|
341
|
<xsl:with-param name="fieldName">edm:rights</xsl:with-param>
|
342
|
<xsl:with-param name="resource" select="$VISUAL_IPR_URI" />
|
343
|
</xsl:call-template>
|
344
|
</xsl:if>
|
345
|
</ore:Aggregation>
|
346
|
|
347
|
<!-- WEB RESOURCE -->
|
348
|
<xsl:if test="//entityType = 'visual'">
|
349
|
<edm:WebResource rdf:about="{/eagleObject/visualRepresentation/url}">
|
350
|
|
351
|
<!-- dc:creator -->
|
352
|
<xsl:for-each select="//author">
|
353
|
<xsl:call-template name="fieldEmitterTemplate">
|
354
|
<xsl:with-param name="fieldName" select="string('dc:creator')" />
|
355
|
<xsl:with-param name="fieldValue" select="." />
|
356
|
</xsl:call-template>
|
357
|
</xsl:for-each>
|
358
|
|
359
|
<!-- dc:description -->
|
360
|
<xsl:for-each select="//description">
|
361
|
<xsl:call-template name="fieldEmitterTemplate">
|
362
|
<xsl:with-param name="fieldName" select="string('dc:description')" />
|
363
|
<xsl:with-param name="fieldValue" select="." />
|
364
|
<xsl:with-param name="language" select="./@lang" />
|
365
|
</xsl:call-template>
|
366
|
</xsl:for-each>
|
367
|
|
368
|
<!-- dc:format -->
|
369
|
<dc:format>image</dc:format>
|
370
|
<xsl:for-each select="//format">
|
371
|
<xsl:call-template name="fieldEmitterTemplate">
|
372
|
<xsl:with-param name="fieldName" select="string('dc:format')" />
|
373
|
<xsl:with-param name="fieldValue" select="." />
|
374
|
</xsl:call-template>
|
375
|
</xsl:for-each>
|
376
|
|
377
|
<!-- dc:rights -->
|
378
|
<xsl:call-template name="fieldEmitterTemplate">
|
379
|
<xsl:with-param name="fieldName">dc:rights</xsl:with-param>
|
380
|
<xsl:with-param name="fieldValue" select="$VISUAL_IPR_STATEMENT" />
|
381
|
</xsl:call-template>
|
382
|
|
383
|
<!-- dcterms:created -->
|
384
|
<xsl:call-template name="fieldEmitterTemplate">
|
385
|
<xsl:with-param name="fieldName">dcterms:created</xsl:with-param>
|
386
|
<xsl:with-param name="fieldValue" select="//creationDate" />
|
387
|
</xsl:call-template>
|
388
|
|
389
|
<!-- edm:rights -->
|
390
|
<xsl:call-template name="fieldEmitterTemplate">
|
391
|
<xsl:with-param name="fieldName">edm:rights</xsl:with-param>
|
392
|
<xsl:with-param name="resource" select="$VISUAL_IPR_URI" />
|
393
|
</xsl:call-template>
|
394
|
</edm:WebResource>
|
395
|
</xsl:if>
|
396
|
|
397
|
<!-- PLACE CLASSES -->
|
398
|
<!--<xsl:for-each select="//findingSpot/*[generate-id(./text()) =
|
399
|
generate-id(key('toponym',./text())[1])]"> <xsl:if test="./@uri != '' and
|
400
|
contains(./@uri, 'NaN') = false"> <edm:Place rdf:about="{./@uri}"> <xsl:call-template
|
401
|
name="fieldEmitterTemplate"> <xsl:with-param name="fieldName">skos:prefLabel</xsl:with-param>
|
402
|
<xsl:with-param name="fieldValue" select="."/> </xsl:call-template> </edm:Place>
|
403
|
</xsl:if> </xsl:for-each> -->
|
404
|
|
405
|
<!-- CONCEPTS CLASSES -->
|
406
|
<!--<xsl:for-each select="//material"> <xsl:if test="./@uri != ''">
|
407
|
<skos:Concept rdf:about="{./@uri}"> <xsl:call-template name="fieldEmitterTemplate">
|
408
|
<xsl:with-param name="fieldName">skos:prefLabel</xsl:with-param> <xsl:with-param
|
409
|
name="fieldValue" select="."/> </xsl:call-template> </skos:Concept> </xsl:if>
|
410
|
</xsl:for-each> <xsl:for-each select="//decoration"> <xsl:if test="./@uri
|
411
|
!= ''"> <skos:Concept rdf:about="{./@uri}"> <xsl:call-template name="fieldEmitterTemplate">
|
412
|
<xsl:with-param name="fieldName">skos:prefLabel</xsl:with-param> <xsl:with-param
|
413
|
name="fieldValue" select="."/> </xsl:call-template> </skos:Concept> </xsl:if>
|
414
|
</xsl:for-each> <xsl:for-each select="//objectType"> <xsl:if test="./@uri
|
415
|
!= ''"> <skos:Concept rdf:about="{./@uri}"> <xsl:call-template name="fieldEmitterTemplate">
|
416
|
<xsl:with-param name="fieldName">skos:prefLabel</xsl:with-param> <xsl:with-param
|
417
|
name="fieldValue" select="."/> </xsl:call-template> </skos:Concept> </xsl:if>
|
418
|
</xsl:for-each> <xsl:for-each select="//inscriptionType"> <xsl:if test="./@uri
|
419
|
!= ''"> <skos:Concept rdf:about="{./@uri}"> <xsl:call-template name="fieldEmitterTemplate">
|
420
|
<xsl:with-param name="fieldName">skos:prefLabel</xsl:with-param> <xsl:with-param
|
421
|
name="fieldValue" select="."/> </xsl:call-template> </skos:Concept> </xsl:if>
|
422
|
</xsl:for-each> -->
|
423
|
</rdf:RDF>
|
424
|
</xsl:template>
|
425
|
|
426
|
<!-- Override default template -->
|
427
|
<xsl:template match="text()|@*" />
|
428
|
|
429
|
<!-- MISC TEMPLATES -->
|
430
|
<xsl:template name="fieldEmitterTemplate">
|
431
|
<xsl:param name="fieldName" />
|
432
|
<xsl:param name="fieldPrefix" />
|
433
|
<xsl:param name="fieldValue" />
|
434
|
<xsl:param name="language" />
|
435
|
<xsl:param name="resource" />
|
436
|
|
437
|
<!-- if empty value skip output -->
|
438
|
<xsl:if test="normalize-space($fieldValue) != '' or normalize-space($resource) != ''">
|
439
|
<xsl:element name="{$fieldName}">
|
440
|
<xsl:if test="normalize-space($language) != ''">
|
441
|
<xsl:attribute name="xml:lang">
|
442
|
<xsl:value-of select="normalize-space($language)" />
|
443
|
</xsl:attribute>
|
444
|
</xsl:if>
|
445
|
<xsl:if test="normalize-space($resource) != ''">
|
446
|
<xsl:attribute name="rdf:resource">
|
447
|
<xsl:value-of select="normalize-space($resource)" />
|
448
|
</xsl:attribute>
|
449
|
</xsl:if>
|
450
|
<xsl:if test="normalize-space($fieldValue) != ''">
|
451
|
<xsl:value-of select="normalize-space(concat($fieldPrefix, $fieldValue))" />
|
452
|
</xsl:if>
|
453
|
</xsl:element>
|
454
|
</xsl:if>
|
455
|
</xsl:template>
|
456
|
<xsl:template name="dimensions">
|
457
|
<xsl:param name="fieldName" />
|
458
|
<xsl:param name="w" />
|
459
|
<xsl:param name="h" />
|
460
|
<xsl:param name="d" />
|
461
|
<xsl:param name="unit" />
|
462
|
<xsl:variable name="actualW">
|
463
|
<xsl:choose>
|
464
|
<xsl:when test="normalize-space($w) != ''">
|
465
|
<xsl:value-of select="normalize-space($w)" />
|
466
|
</xsl:when>
|
467
|
<xsl:otherwise>??</xsl:otherwise>
|
468
|
</xsl:choose>
|
469
|
</xsl:variable>
|
470
|
<xsl:variable name="actualH">
|
471
|
<xsl:choose>
|
472
|
<xsl:when test="normalize-space($h) != ''">
|
473
|
<xsl:value-of select="normalize-space($h)" />
|
474
|
</xsl:when>
|
475
|
<xsl:otherwise>??</xsl:otherwise>
|
476
|
</xsl:choose>
|
477
|
</xsl:variable>
|
478
|
<xsl:variable name="actualD">
|
479
|
<xsl:choose>
|
480
|
<xsl:when test="normalize-space($d) != ''">
|
481
|
<xsl:value-of select="normalize-space($d)" />
|
482
|
</xsl:when>
|
483
|
<xsl:otherwise>??</xsl:otherwise>
|
484
|
</xsl:choose>
|
485
|
</xsl:variable>
|
486
|
<xsl:element name="{$fieldName}">
|
487
|
<xsl:value-of select="concat($actualW,' x ', $actualH,' x ', $actualD, ' (', $unit, ')')" />
|
488
|
</xsl:element>
|
489
|
</xsl:template>
|
490
|
</xsl:stylesheet>
|
491
|
</CODE>
|
492
|
</SCRIPT>
|
493
|
</CONFIGURATION>
|
494
|
<STATUS />
|
495
|
<SECURITY_PARAMETERS />
|
496
|
</BODY>
|
497
|
</RESOURCE_PROFILE>
|