udata 7.0.6__py2.py3-none-any.whl → 7.0.6.dev28209__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of udata might be problematic. Click here for more details.

Files changed (43) hide show
  1. udata/__init__.py +1 -1
  2. udata/commands/__init__.py +3 -0
  3. udata/commands/dcat.py +4 -7
  4. udata/core/activity/api.py +1 -1
  5. udata/core/activity/models.py +3 -4
  6. udata/core/activity/tasks.py +5 -6
  7. udata/core/dataset/factories.py +4 -2
  8. udata/core/dataset/models.py +5 -2
  9. udata/core/dataset/rdf.py +25 -65
  10. udata/core/dataset/search.py +1 -0
  11. udata/core/spatial/tests/test_api.py +10 -7
  12. udata/core/topic/factories.py +2 -2
  13. udata/harvest/backends/dcat.py +24 -128
  14. udata/harvest/tests/test_dcat_backend.py +5 -78
  15. udata/rdf.py +0 -1
  16. udata/search/__init__.py +2 -2
  17. udata/tests/api/test_datasets_api.py +45 -45
  18. udata/tests/api/test_me_api.py +14 -13
  19. udata/tests/dataset/test_dataset_actions.py +2 -2
  20. udata/tests/dataset/test_dataset_commands.py +3 -3
  21. udata/tests/dataset/test_dataset_model.py +1 -2
  22. udata/tests/organization/test_organization_model.py +3 -3
  23. udata/tests/organization/test_organization_rdf.py +3 -3
  24. udata/tests/reuse/test_reuse_model.py +2 -2
  25. udata/tests/search/test_adapter.py +12 -12
  26. udata/tests/search/test_results.py +4 -4
  27. udata/tests/site/test_site_api.py +3 -3
  28. udata/tests/site/test_site_metrics.py +3 -3
  29. udata/tests/site/test_site_rdf.py +6 -6
  30. udata/tests/test_activity.py +0 -12
  31. udata/tests/test_transfer.py +17 -18
  32. {udata-7.0.6.dist-info → udata-7.0.6.dev28209.dist-info}/METADATA +4 -9
  33. {udata-7.0.6.dist-info → udata-7.0.6.dev28209.dist-info}/RECORD +37 -43
  34. {udata-7.0.6.dist-info → udata-7.0.6.dev28209.dist-info}/entry_points.txt +0 -1
  35. udata/harvest/tests/csw_dcat/XSLT.xml +0 -4298
  36. udata/harvest/tests/csw_dcat/geonetwork-iso-page-1.xml +0 -1291
  37. udata/harvest/tests/csw_dcat/geonetwork-iso-page-3.xml +0 -1139
  38. udata/harvest/tests/csw_dcat/geonetwork-iso-page-5.xml +0 -1266
  39. udata/harvest/tests/dcat/evian.json +0 -464
  40. udata/migrations/2024-03-22-migrate-activity-kwargs-to-extras.py +0 -16
  41. {udata-7.0.6.dist-info → udata-7.0.6.dev28209.dist-info}/LICENSE +0 -0
  42. {udata-7.0.6.dist-info → udata-7.0.6.dev28209.dist-info}/WHEEL +0 -0
  43. {udata-7.0.6.dist-info → udata-7.0.6.dev28209.dist-info}/top_level.txt +0 -0
@@ -1,4298 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
-
3
- <!--
4
-
5
- Copyright 2015-2021 EUROPEAN UNION
6
- Licensed under the EUPL, Version 1.2 or - as soon they will be approved by
7
- the European Commission - subsequent versions of the EUPL (the "Licence");
8
- You may not use this work except in compliance with the Licence.
9
- You may obtain a copy of the Licence at:
10
-
11
- https://joinup.ec.europa.eu/collection/eupl
12
-
13
- Unless required by applicable law or agreed to in writing, software
14
- distributed under the Licence is distributed on an "AS IS" basis,
15
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- See the Licence for the specific language governing permissions and
17
- limitations under the Licence.
18
-
19
- Contributors: ISA GeoDCAT-AP Working Group (https://github.com/SEMICeu/geodcat-ap)
20
-
21
- This work was originally supported by the EU Interoperability Solutions for
22
- European Public Administrations Programme (http://ec.europa.eu/isa)
23
- through Action 1.17: Re-usable INSPIRE Reference Platform
24
- (http://ec.europa.eu/isa/actions/01-trusted-information-exchange/1-17action_en.htm).
25
-
26
- Source code: https://github.com/SEMICeu/iso-19139-to-dcat-ap
27
-
28
- -->
29
-
30
- <!--
31
-
32
- PURPOSE AND USAGE
33
-
34
- This XSLT is a proof of concept for the implementation of the latest version
35
- of the geospatial profile of DCAT-AP (GeoDCAT-AP):
36
-
37
- https://semiceu.github.io/GeoDCAT-AP/releases/
38
-
39
- As such, this XSLT must be considered as unstable, and can be updated any
40
- time based on the revisions to the GeoDCAT-AP specifications and
41
- related work in the framework of INSPIRE and the EU ISA² Programme.
42
-
43
- The official distributions of this XSLT are published in the dedicated GitHub
44
- repository:
45
-
46
- https://github.com/SEMICeu/iso-19139-to-dcat-ap
47
-
48
- Comments and inquiries should be sent via the corresponding issue tracker:
49
-
50
- https://github.com/SEMICeu/iso-19139-to-dcat-ap/issues
51
-
52
- -->
53
-
54
- <xsl:transform
55
- xmlns:adms = "http://www.w3.org/ns/adms#"
56
- xmlns:cnt = "http://www.w3.org/2011/content#"
57
- xmlns:dc = "http://purl.org/dc/elements/1.1/"
58
- xmlns:dcat = "http://www.w3.org/ns/dcat#"
59
- xmlns:dct = "http://purl.org/dc/terms/"
60
- xmlns:dctype = "http://purl.org/dc/dcmitype/"
61
- xmlns:dqv = "http://www.w3.org/ns/dqv#"
62
- xmlns:earl = "http://www.w3.org/ns/earl#"
63
- xmlns:foaf = "http://xmlns.com/foaf/0.1/"
64
- xmlns:gco = "http://www.isotc211.org/2005/gco"
65
- xmlns:geodcatap = "http://data.europa.eu/930/"
66
- xmlns:gmd = "http://www.isotc211.org/2005/gmd"
67
- xmlns:gml = "http://www.opengis.net/gml"
68
- xmlns:gmx = "http://www.isotc211.org/2005/gmx"
69
- xmlns:gsp = "http://www.opengis.net/ont/geosparql#"
70
- xmlns:i = "http://inspire.ec.europa.eu/schemas/common/1.0"
71
- xmlns:i-gp = "http://inspire.ec.europa.eu/schemas/geoportal/1.0"
72
- xmlns:locn = "http://www.w3.org/ns/locn#"
73
- xmlns:owl = "http://www.w3.org/2002/07/owl#"
74
- xmlns:org = "http://www.w3.org/ns/org#"
75
- xmlns:prov = "http://www.w3.org/ns/prov#"
76
- xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
77
- xmlns:rdfs = "http://www.w3.org/2000/01/rdf-schema#"
78
- xmlns:schema = "http://schema.org/"
79
- xmlns:sdmx-attribute = "http://purl.org/linked-data/sdmx/2009/attribute#"
80
- xmlns:skos = "http://www.w3.org/2004/02/skos/core#"
81
- xmlns:srv = "http://www.isotc211.org/2005/srv"
82
- xmlns:vcard = "http://www.w3.org/2006/vcard/ns#"
83
- xmlns:wdrs = "http://www.w3.org/2007/05/powder-s#"
84
- xmlns:xlink = "http://www.w3.org/1999/xlink"
85
- xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
86
- xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
87
- exclude-result-prefixes="earl gco gmd gml gmx i i-gp srv xlink xsi xsl wdrs"
88
- version="1.0">
89
-
90
- <xsl:output method="xml"
91
- indent="yes"
92
- encoding="utf-8"
93
- cdata-section-elements="locn:geometry dcat:bbox" />
94
-
95
- <!--
96
-
97
- Global variables
98
- ================
99
-
100
- -->
101
-
102
- <!-- Variables $core and $extended. -->
103
- <!--
104
-
105
- These variables are meant to be placeholders for the IDs used for the core and extended profiles of GeoDCAT-AP.
106
-
107
- -->
108
- <!--
109
- <xsl:variable name="core">core</xsl:variable>
110
- <xsl:variable name="extended">extended</xsl:variable>
111
- <xsl:variable name="core">http://data.europa.eu/r5r/</xsl:variable>
112
- <xsl:variable name="extended">http://data.europa.eu/930/</xsl:variable>
113
- -->
114
- <xsl:variable name="profile-core-code">core</xsl:variable>
115
- <xsl:variable name="profile-extended-code">extended</xsl:variable>
116
- <xsl:variable name="profile-core-uri">http://data.europa.eu/r5r/</xsl:variable>
117
- <xsl:variable name="profile-extended-uri">http://data.europa.eu/930/</xsl:variable>
118
-
119
- <!--
120
-
121
- Mapping parameters
122
- ==================
123
-
124
- This section includes mapping parameters by the XSLT processor used, or, possibly, manually.
125
-
126
- -->
127
-
128
- <!-- Parameter $profile -->
129
- <!--
130
-
131
- This parameter specifies the GeoDCAT-AP profile to be used:
132
- - value "core": the GeoDCAT-AP Core profile, which includes only the INSPIRE and ISO 19115 core metadata elements supported in DCAT-AP
133
- - value "extended": the GeoDCAT-AP Extended profile, which defines mappings for all the INSPIRE and ISO 19115 core metadata elements
134
-
135
- The current specifications for the core and extended GeoDCAT-AP profiles are available on the Joinup collaboration platform:
136
-
137
- https://joinup.ec.europa.eu/solution/geodcat-ap
138
-
139
- -->
140
-
141
- <!-- Uncomment to use GeoDCAT-AP Core as default profile -->
142
- <!--
143
- <xsl:variable name="default-profile" select="$profile-core-uri"/>
144
- -->
145
- <!-- Uncomment to use GeoDCAT-AP Extended as default profile -->
146
- <xsl:variable name="default-profile" select="$profile-extended-uri"/>
147
-
148
- <xsl:param name="profile" select="$default-profile"/>
149
-
150
- <xsl:variable name="selected-profile">
151
- <xsl:choose>
152
- <xsl:when test="$profile = $profile-core-code">
153
- <xsl:value-of select="$profile-core-uri"/>
154
- </xsl:when>
155
- <xsl:when test="$profile = $profile-core-uri">
156
- <xsl:value-of select="$profile"/>
157
- </xsl:when>
158
- <xsl:when test="$profile = $profile-extended-code">
159
- <xsl:value-of select="$profile-extended-uri"/>
160
- </xsl:when>
161
- <xsl:when test="$profile = $profile-extended-uri">
162
- <xsl:value-of select="$profile"/>
163
- </xsl:when>
164
- <xsl:otherwise>
165
- <xsl:value-of select="$default-profile"/>
166
- </xsl:otherwise>
167
- </xsl:choose>
168
- </xsl:variable>
169
-
170
- <xsl:variable name="core">
171
- <xsl:choose>
172
- <xsl:when test="$profile = $profile-core-code">
173
- <xsl:value-of select="$profile-core-code"/>
174
- </xsl:when>
175
- <xsl:otherwise>
176
- <xsl:value-of select="$profile-core-uri"/>
177
- </xsl:otherwise>
178
- </xsl:choose>
179
- </xsl:variable>
180
-
181
- <xsl:variable name="extended">
182
- <xsl:choose>
183
- <xsl:when test="$profile = $profile-extended-code">
184
- <xsl:value-of select="$profile-extended-code"/>
185
- </xsl:when>
186
- <xsl:otherwise>
187
- <xsl:value-of select="$profile-extended-uri"/>
188
- </xsl:otherwise>
189
- </xsl:choose>
190
- </xsl:variable>
191
-
192
- <!-- Parameter $include-deprecated -->
193
- <!--
194
- This parameter specifies whether deprecated mappings must ("yes") or must not
195
- ("no") be included in the output.
196
- -->
197
-
198
- <!-- Uncomment to include deprecated mappings from the output -->
199
-
200
- <xsl:param name="include-deprecated">yes</xsl:param>
201
-
202
- <!-- Uncomment to exclude deprecated mappings from the output -->
203
- <!--
204
- <xsl:param name="include-deprecated">no</xsl:param>
205
- -->
206
-
207
- <!-- Parameter $CoupledResourceLookUp -->
208
- <!--
209
-
210
- This parameter specifies whether the coupled resource, referenced via @xlink:href,
211
- should be looked up to fetch the resource's unique resource identifier (i.e., code
212
- and code space). More precisely:
213
- - value "enabled": The coupled resource is looked up
214
- - value "disabled": The coupled resource is not looked up
215
-
216
- The default value is "enabled" for GeoDCAT-AP Extended, and "disabled" otherwise.
217
-
218
- CAVEAT: Using this feature may cause the transformation to hang, in case the URL in
219
- @xlink:href is broken, the request hangs indefinitely, or does not return the
220
- expected resource (e.g., and HTML page, instead of an XML-encoded ISO 19139 record).
221
- It is strongly recommended that this issue is dealt with by using appropriate
222
- configuration parameters and error handling (e.g., by specifying a timeout on HTTP
223
- calls and by setting the HTTP Accept header to "application/xml").
224
-
225
- -->
226
-
227
- <xsl:param name="CoupledResourceLookUp">
228
- <xsl:choose>
229
- <xsl:when test="$profile = $extended">
230
- <xsl:text>enabled</xsl:text>
231
- </xsl:when>
232
- <xsl:otherwise>
233
- <xsl:text>disabled</xsl:text>
234
- </xsl:otherwise>
235
- </xsl:choose>
236
- </xsl:param>
237
-
238
- <!--
239
-
240
- Other global parameters
241
- =======================
242
-
243
- -->
244
-
245
- <!-- Variables to be used to convert strings into lower/uppercase by using the translate() function. -->
246
-
247
- <xsl:variable name="lowercase">abcdefghijklmnopqrstuvwxyz</xsl:variable>
248
- <xsl:variable name="uppercase">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
249
-
250
- <!-- URIs, URNs and names for spatial reference system registers. -->
251
-
252
- <xsl:param name="EpsgSrsBaseUri">http://www.opengis.net/def/crs/EPSG/0</xsl:param>
253
- <xsl:param name="EpsgSrsBaseUrn">urn:ogc:def:crs:EPSG</xsl:param>
254
- <xsl:param name="EpsgSrsName">EPSG Coordinate Reference Systems</xsl:param>
255
- <xsl:param name="OgcSrsBaseUri">http://www.opengis.net/def/crs/OGC</xsl:param>
256
- <xsl:param name="OgcSrsBaseUrn">urn:ogc:def:crs:OGC</xsl:param>
257
- <xsl:param name="OgcSrsName">OGC Coordinate Reference Systems</xsl:param>
258
-
259
- <!-- URI and URN for CRS84. -->
260
-
261
- <xsl:param name="Crs84Uri" select="concat($OgcSrsBaseUri,'/1.3/CRS84')"/>
262
- <xsl:param name="Crs84Urn" select="concat($OgcSrsBaseUrn,':1.3:CRS84')"/>
263
-
264
- <!-- URI and URN for ETRS89. -->
265
-
266
- <xsl:param name="Etrs89Uri" select="concat($EpsgSrsBaseUri,'/4258')"/>
267
- <xsl:param name="Etrs89Urn" select="concat($EpsgSrsBaseUrn,'::4258')"/>
268
-
269
- <!-- URI and URN of the spatial reference system (SRS) used in the bounding box.
270
- The default SRS is CRS84. If a different SRS is used, also parameter
271
- $SrsAxisOrder must be specified. -->
272
-
273
- <!-- The SRS URI is used in the WKT and GML encodings of the bounding box. -->
274
- <xsl:param name="SrsUri" select="$Crs84Uri"/>
275
- <!-- The SRS URN is used in the GeoJSON encoding of the bounding box. -->
276
- <xsl:param name="SrsUrn" select="$Crs84Urn"/>
277
-
278
- <!-- Axis order for the reference SRS:
279
- - "LonLat": longitude / latitude
280
- - "LatLon": latitude / longitude.
281
- The axis order must be specified only if the reference SRS is different from CRS84.
282
- If the reference SRS is CRS84, this parameter is ignored. -->
283
-
284
- <xsl:param name="SrsAxisOrder">LonLat</xsl:param>
285
-
286
- <!-- Namespaces -->
287
-
288
- <!-- Currently not used.
289
- <xsl:param name="timeUri">http://placetime.com/</xsl:param>
290
- <xsl:param name="timeInstantUri" select="concat($timeUri,'instant/gregorian/')"/>
291
- <xsl:param name="timeIntervalUri" select="concat($timeUri,'interval/gregorian/')"/>
292
- -->
293
- <xsl:param name="dcat">http://www.w3.org/ns/dcat#</xsl:param>
294
- <xsl:param name="dct">http://purl.org/dc/terms/</xsl:param>
295
- <xsl:param name="dctype">http://purl.org/dc/dcmitype/</xsl:param>
296
- <xsl:param name="foaf">http://xmlns.com/foaf/0.1/</xsl:param>
297
- <xsl:param name="geodcatap">http://data.europa.eu/930/</xsl:param>
298
- <xsl:param name="gsp">http://www.opengis.net/ont/geosparql#</xsl:param>
299
- <xsl:param name="prov">http://www.w3.org/ns/prov#</xsl:param>
300
- <xsl:param name="skos">http://www.w3.org/2004/02/skos/core#</xsl:param>
301
- <xsl:param name="vcard">http://www.w3.org/2006/vcard/ns#</xsl:param>
302
- <xsl:param name="xsd">http://www.w3.org/2001/XMLSchema#</xsl:param>
303
-
304
- <!-- Old params used for the SRS
305
- <xsl:param name="ogcCrsBaseUri">http://www.opengis.net/def/EPSG/0/</xsl:param>
306
- <xsl:param name="ogcCrsBaseUrn">urn:ogc:def:EPSG::</xsl:param>
307
- -->
308
-
309
- <!-- Currently not used.
310
- <xsl:param name="inspire">http://inspire.ec.europa.eu/schemas/md/</xsl:param>
311
- -->
312
-
313
- <!-- Currently not used.
314
- <xsl:param name="kos">http://ec.europa.eu/open-data/kos/</xsl:param>
315
- <xsl:param name="kosil" select="concat($kos,'interoperability-level/')"/>
316
- <xsl:param name="kosdst" select="concat($kos,'dataset-type/')"/>
317
- <xsl:param name="kosdss" select="concat($kos,'dataset-status/Completed')"/>
318
- <xsl:param name="kosdoct" select="concat($kos,'documentation-type/')"/>
319
- <xsl:param name="koslic" select="concat($kos,'licence/EuropeanCommission')"/>
320
- -->
321
-
322
- <!-- OP's NALs base URI -->
323
-
324
- <xsl:param name="op">http://publications.europa.eu/resource/authority/</xsl:param>
325
-
326
- <!-- OP's NALs URIs -->
327
-
328
- <xsl:param name="opcb" select="concat($op,'corporate-body/')"/>
329
- <xsl:param name="opcountry" select="concat($op,'country/')"/>
330
- <xsl:param name="opfq" select="concat($op,'frequency/')"/>
331
- <xsl:param name="opft" select="concat($op,'file-type/')"/>
332
- <xsl:param name="oplang" select="concat($op,'language/')"/>
333
-
334
- <!-- Currently not used.
335
- <xsl:param name="cldFrequency">http://purl.org/cld/freq/</xsl:param>
336
- -->
337
-
338
- <!-- IANA base URI -->
339
-
340
- <xsl:param name="iana">https://www.iana.org/assignments/</xsl:param>
341
-
342
- <!-- IANA registers URIs -->
343
-
344
- <xsl:param name="iana-mt" select="concat($iana,'media-types/')"/>
345
-
346
- <!-- DEPRECATED: Parameter kept for backward compatibility with GeoDCAT-AP v1.* -->
347
- <!-- This is used as the datatype for the GeoJSON-based encoding of the bounding box. -->
348
- <xsl:param name="geojsonMediaTypeUri" select="concat($iana-mt,'application/vnd.geo+json')"/>
349
-
350
- <!-- QUDT Units Vocabulary -->
351
- <xsl:param name="qudt-unit">http://www.qudt.org/vocab/unit</xsl:param>
352
-
353
- <!-- Ontology for units of measure (OM) -->
354
- <xsl:param name="om18">http://www.wurvoc.org/vocabularies/om-1.8</xsl:param>
355
- <xsl:param name="om2">http://www.ontology-of-units-of-measure.org/resource/om-2</xsl:param>
356
- <xsl:param name="om" select="$om18"/>
357
-
358
- <!-- Units of measure -->
359
- <xsl:param name="uom-m" select="concat($qudt-unit, '/', 'M')"/>
360
- <xsl:param name="uom-km" select="concat($qudt-unit, '/', 'KiloM')"/>
361
- <xsl:param name="uom-ft" select="concat($qudt-unit, '/', 'FT')"/>
362
- <xsl:param name="uom-deg" select="concat($qudt-unit, '/', 'DEG')"/>
363
- <!--
364
- <xsl:param name="uom-m" select="concat($om, '/', 'metre')"/>
365
- <xsl:param name="uom-km" select="concat($om, '/', 'kilometre')"/>
366
- <xsl:param name="uom-ft">
367
- <xsl:choose>
368
- <xsl:when test="$om = $om18">
369
- <xsl:value-of select="concat($om, '/', 'foot-international')"/>
370
- </xsl:when>
371
- <xsl:when test="$om = $om2">
372
- <xsl:value-of select="concat($om, '/', 'foot-International')"/>
373
- </xsl:when>
374
- </xsl:choose>
375
- </xsl:param>
376
- <xsl:param name="uom-deg" select="concat($om, '/', 'degree')"/>
377
- -->
378
-
379
- <!-- INSPIRE base URI -->
380
-
381
- <xsl:param name="inspire">http://inspire.ec.europa.eu/</xsl:param>
382
-
383
- <!-- INSPIRE metadata code list URIs -->
384
-
385
- <xsl:param name="INSPIRECodelistUri" select="concat($inspire,'metadata-codelist/')"/>
386
- <xsl:param name="SpatialDataServiceCategoryCodelistUri" select="concat($INSPIRECodelistUri,'SpatialDataServiceCategory')"/>
387
- <xsl:param name="DegreeOfConformityCodelistUri" select="concat($INSPIRECodelistUri,'DegreeOfConformity')"/>
388
- <xsl:param name="ResourceTypeCodelistUri" select="concat($INSPIRECodelistUri,'ResourceType')"/>
389
- <xsl:param name="ResponsiblePartyRoleCodelistUri" select="concat($INSPIRECodelistUri,'ResponsiblePartyRole')"/>
390
- <xsl:param name="SpatialDataServiceTypeCodelistUri" select="concat($INSPIRECodelistUri,'SpatialDataServiceType')"/>
391
- <xsl:param name="TopicCategoryCodelistUri" select="concat($INSPIRECodelistUri,'TopicCategory')"/>
392
-
393
- <!-- INSPIRE code list URIs (not yet supported; the URI pattern is tentative) -->
394
- <!-- DEPRECATED following the publication of the relevant code list in the INSPIRE Registry
395
- <xsl:param name="SpatialRepresentationTypeCodelistUri" select="concat($INSPIRECodelistUri,'SpatialRepresentationTypeCode')"/>
396
- <xsl:param name="MaintenanceFrequencyCodelistUri" select="concat($INSPIRECodelistUri,'MaintenanceFrequencyCode')"/>
397
- -->
398
- <xsl:param name="SpatialRepresentationTypeCodelistUri" select="concat($INSPIRECodelistUri,'SpatialRepresentationType')"/>
399
- <xsl:param name="MaintenanceFrequencyCodelistUri" select="concat($INSPIRECodelistUri,'MaintenanceFrequency')"/>
400
-
401
- <!-- INSPIRE glossary URI -->
402
-
403
- <xsl:param name="INSPIREGlossaryUri" select="concat($inspire,'glossary/')"/>
404
-
405
- <!-- INSPIRE glossary URI -->
406
-
407
- <xsl:param name="inspire-mt" select="concat($inspire,'media-types/')"/>
408
-
409
- <!--
410
-
411
- Master template
412
- ===============
413
-
414
- -->
415
-
416
- <xsl:template match="/">
417
- <rdf:RDF>
418
- <xsl:apply-templates select="gmd:MD_Metadata|//gmd:MD_Metadata"/>
419
- </rdf:RDF>
420
- </xsl:template>
421
-
422
- <!--
423
-
424
- Metadata template
425
- =================
426
-
427
- -->
428
-
429
- <xsl:template match="gmd:MD_Metadata|//gmd:MD_Metadata">
430
-
431
- <!--
432
-
433
- Parameters to create HTTP URIs for the resource and the corresponding metadata record
434
- =====================================================================================
435
-
436
- These parameters must be customised depending on the strategy used to assign HTTP URIs.
437
-
438
- The default rule implies that HTTP URIs are specified for the metadata file identifier
439
- (metadata URI) and the resource identifier (resource URI).
440
-
441
- -->
442
-
443
- <xsl:param name="ResourceUri">
444
- <xsl:variable name="rURI" select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:identifier/*/gmd:code/gco:CharacterString"/>
445
- <xsl:if test="$rURI != '' and ( starts-with($rURI, 'http://') or starts-with($rURI, 'https://') )">
446
- <xsl:value-of select="$rURI"/>
447
- </xsl:if>
448
- </xsl:param>
449
-
450
- <xsl:param name="MetadataUri">
451
- <xsl:variable name="mURI" select="gmd:fileIdentifier/gco:CharacterString"/>
452
- <xsl:if test="$mURI != '' and ( starts-with($mURI, 'http://') or starts-with($mURI, 'https://') )">
453
- <xsl:value-of select="$mURI"/>
454
- </xsl:if>
455
- </xsl:param>
456
-
457
- <!--
458
-
459
- Other parameters
460
- ================
461
-
462
- -->
463
-
464
- <!-- Metadata language: corresponding Alpha-2 codes -->
465
-
466
- <xsl:param name="ormlang">
467
- <xsl:choose>
468
- <xsl:when test="gmd:language/gmd:LanguageCode/@codeListValue != ''">
469
- <xsl:value-of select="translate(gmd:language/gmd:LanguageCode/@codeListValue,$uppercase,$lowercase)"/>
470
- </xsl:when>
471
- <xsl:when test="gmd:language/gmd:LanguageCode != ''">
472
- <xsl:value-of select="translate(gmd:language/gmd:LanguageCode,$uppercase,$lowercase)"/>
473
- </xsl:when>
474
- <xsl:when test="gmd:language/gco:CharacterString != ''">
475
- <xsl:value-of select="translate(gmd:language/gco:CharacterString,$uppercase,$lowercase)"/>
476
- </xsl:when>
477
- </xsl:choose>
478
- </xsl:param>
479
-
480
- <xsl:param name="MetadataLanguage">
481
- <xsl:choose>
482
- <xsl:when test="$ormlang = 'bul'">
483
- <xsl:text>bg</xsl:text>
484
- </xsl:when>
485
- <xsl:when test="$ormlang = 'cze'">
486
- <xsl:text>cs</xsl:text>
487
- </xsl:when>
488
- <xsl:when test="$ormlang = 'dan'">
489
- <xsl:text>da</xsl:text>
490
- </xsl:when>
491
- <xsl:when test="$ormlang = 'ger'">
492
- <xsl:text>de</xsl:text>
493
- </xsl:when>
494
- <xsl:when test="$ormlang = 'gre'">
495
- <xsl:text>el</xsl:text>
496
- </xsl:when>
497
- <xsl:when test="$ormlang = 'eng'">
498
- <xsl:text>en</xsl:text>
499
- </xsl:when>
500
- <xsl:when test="$ormlang = 'spa'">
501
- <xsl:text>es</xsl:text>
502
- </xsl:when>
503
- <xsl:when test="$ormlang = 'est'">
504
- <xsl:text>et</xsl:text>
505
- </xsl:when>
506
- <xsl:when test="$ormlang = 'fin'">
507
- <xsl:text>fi</xsl:text>
508
- </xsl:when>
509
- <xsl:when test="$ormlang = 'fre'">
510
- <xsl:text>fr</xsl:text>
511
- </xsl:when>
512
- <xsl:when test="$ormlang = 'gle'">
513
- <xsl:text>ga</xsl:text>
514
- </xsl:when>
515
- <xsl:when test="$ormlang = 'hrv'">
516
- <xsl:text>hr</xsl:text>
517
- </xsl:when>
518
- <xsl:when test="$ormlang = 'ita'">
519
- <xsl:text>it</xsl:text>
520
- </xsl:when>
521
- <xsl:when test="$ormlang = 'lav'">
522
- <xsl:text>lv</xsl:text>
523
- </xsl:when>
524
- <xsl:when test="$ormlang = 'lit'">
525
- <xsl:text>lt</xsl:text>
526
- </xsl:when>
527
- <xsl:when test="$ormlang = 'hun'">
528
- <xsl:text>hu</xsl:text>
529
- </xsl:when>
530
- <xsl:when test="$ormlang = 'mlt'">
531
- <xsl:text>mt</xsl:text>
532
- </xsl:when>
533
- <xsl:when test="$ormlang = 'dut'">
534
- <xsl:text>nl</xsl:text>
535
- </xsl:when>
536
- <xsl:when test="$ormlang = 'pol'">
537
- <xsl:text>pl</xsl:text>
538
- </xsl:when>
539
- <xsl:when test="$ormlang = 'por'">
540
- <xsl:text>pt</xsl:text>
541
- </xsl:when>
542
- <xsl:when test="$ormlang = 'rum'">
543
- <xsl:text>ru</xsl:text>
544
- </xsl:when>
545
- <xsl:when test="$ormlang = 'slo'">
546
- <xsl:text>sk</xsl:text>
547
- </xsl:when>
548
- <xsl:when test="$ormlang = 'slv'">
549
- <xsl:text>sl</xsl:text>
550
- </xsl:when>
551
- <xsl:when test="$ormlang = 'swe'">
552
- <xsl:text>sv</xsl:text>
553
- </xsl:when>
554
- <xsl:otherwise>
555
- <xsl:value-of select="$ormlang"/>
556
- </xsl:otherwise>
557
- </xsl:choose>
558
- </xsl:param>
559
-
560
- <!-- Resource language: corresponding Alpha-2 codes -->
561
-
562
- <xsl:param name="orrlang">
563
- <xsl:choose>
564
- <xsl:when test="gmd:identificationInfo/*/gmd:language/gmd:LanguageCode/@codeListValue != ''">
565
- <xsl:value-of select="translate(gmd:identificationInfo/*/gmd:language/gmd:LanguageCode/@codeListValue,$uppercase,$lowercase)"/>
566
- </xsl:when>
567
- <xsl:when test="gmd:identificationInfo/*/gmd:language/gmd:LanguageCode != ''">
568
- <xsl:value-of select="translate(gmd:identificationInfo/*/gmd:language/gmd:LanguageCode,$uppercase,$lowercase)"/>
569
- </xsl:when>
570
- <xsl:when test="gmd:identificationInfo/*/gmd:language/gco:CharacterString != ''">
571
- <xsl:value-of select="translate(gmd:identificationInfo/*/gmd:language/gco:CharacterString,$uppercase,$lowercase)"/>
572
- </xsl:when>
573
- </xsl:choose>
574
- </xsl:param>
575
-
576
- <xsl:param name="ResourceLanguage">
577
- <xsl:choose>
578
- <xsl:when test="$orrlang = 'bul'">
579
- <xsl:text>bg</xsl:text>
580
- </xsl:when>
581
- <xsl:when test="$orrlang = 'cze'">
582
- <xsl:text>cs</xsl:text>
583
- </xsl:when>
584
- <xsl:when test="$orrlang = 'dan'">
585
- <xsl:text>da</xsl:text>
586
- </xsl:when>
587
- <xsl:when test="$orrlang = 'ger'">
588
- <xsl:text>de</xsl:text>
589
- </xsl:when>
590
- <xsl:when test="$orrlang = 'gre'">
591
- <xsl:text>el</xsl:text>
592
- </xsl:when>
593
- <xsl:when test="$orrlang = 'eng'">
594
- <xsl:text>en</xsl:text>
595
- </xsl:when>
596
- <xsl:when test="$orrlang = 'spa'">
597
- <xsl:text>es</xsl:text>
598
- </xsl:when>
599
- <xsl:when test="$orrlang = 'est'">
600
- <xsl:text>et</xsl:text>
601
- </xsl:when>
602
- <xsl:when test="$orrlang = 'fin'">
603
- <xsl:text>fi</xsl:text>
604
- </xsl:when>
605
- <xsl:when test="$orrlang = 'fre'">
606
- <xsl:text>fr</xsl:text>
607
- </xsl:when>
608
- <xsl:when test="$orrlang = 'gle'">
609
- <xsl:text>ga</xsl:text>
610
- </xsl:when>
611
- <xsl:when test="$orrlang = 'hrv'">
612
- <xsl:text>hr</xsl:text>
613
- </xsl:when>
614
- <xsl:when test="$orrlang = 'ita'">
615
- <xsl:text>it</xsl:text>
616
- </xsl:when>
617
- <xsl:when test="$orrlang = 'lav'">
618
- <xsl:text>lv</xsl:text>
619
- </xsl:when>
620
- <xsl:when test="$orrlang = 'lit'">
621
- <xsl:text>lt</xsl:text>
622
- </xsl:when>
623
- <xsl:when test="$orrlang = 'hun'">
624
- <xsl:text>hu</xsl:text>
625
- </xsl:when>
626
- <xsl:when test="$orrlang = 'mlt'">
627
- <xsl:text>mt</xsl:text>
628
- </xsl:when>
629
- <xsl:when test="$orrlang = 'dut'">
630
- <xsl:text>nl</xsl:text>
631
- </xsl:when>
632
- <xsl:when test="$orrlang = 'pol'">
633
- <xsl:text>pl</xsl:text>
634
- </xsl:when>
635
- <xsl:when test="$orrlang = 'por'">
636
- <xsl:text>pt</xsl:text>
637
- </xsl:when>
638
- <xsl:when test="$orrlang = 'rum'">
639
- <xsl:text>ru</xsl:text>
640
- </xsl:when>
641
- <xsl:when test="$orrlang = 'slo'">
642
- <xsl:text>sk</xsl:text>
643
- </xsl:when>
644
- <xsl:when test="$orrlang = 'slv'">
645
- <xsl:text>sl</xsl:text>
646
- </xsl:when>
647
- <xsl:when test="$orrlang = 'swe'">
648
- <xsl:text>sv</xsl:text>
649
- </xsl:when>
650
- <xsl:otherwise>
651
- <xsl:value-of select="$orrlang"/>
652
- </xsl:otherwise>
653
- </xsl:choose>
654
- </xsl:param>
655
-
656
- <xsl:param name="IsoScopeCode">
657
- <xsl:value-of select="normalize-space(gmd:hierarchyLevel/gmd:MD_ScopeCode/@codeListValue)"/>
658
- </xsl:param>
659
-
660
- <xsl:param name="InspireResourceType">
661
- <xsl:if test="$IsoScopeCode = 'dataset' or $IsoScopeCode = 'series' or $IsoScopeCode = 'service'">
662
- <xsl:value-of select="$IsoScopeCode"/>
663
- </xsl:if>
664
- </xsl:param>
665
-
666
- <xsl:param name="ResourceType">
667
- <xsl:choose>
668
- <xsl:when test="$IsoScopeCode = 'dataset' or $IsoScopeCode = 'nonGeographicDataset'">
669
- <xsl:text>dataset</xsl:text>
670
- </xsl:when>
671
- <xsl:otherwise>
672
- <xsl:value-of select="$IsoScopeCode"/>
673
- </xsl:otherwise>
674
- </xsl:choose>
675
- </xsl:param>
676
-
677
- <xsl:param name="ServiceType">
678
- <xsl:value-of select="gmd:identificationInfo/*/srv:serviceType/gco:LocalName"/>
679
- </xsl:param>
680
- <!--
681
- <xsl:param name="ResourceTitle">
682
- <xsl:value-of select="gmd:identificationInfo[1]/*/gmd:citation/*/gmd:title/gco:CharacterString"/>
683
- </xsl:param>
684
- -->
685
- <xsl:param name="ResourceTitle">
686
- <xsl:for-each select="gmd:identificationInfo[1]/*/gmd:citation/*/gmd:title">
687
- <dct:title xml:lang="{$MetadataLanguage}">
688
- <xsl:value-of select="normalize-space(gco:CharacterString)"/>
689
- </dct:title>
690
- <xsl:call-template name="LocalisedString">
691
- <xsl:with-param name="term">dct:title</xsl:with-param>
692
- </xsl:call-template>
693
- </xsl:for-each>
694
- </xsl:param>
695
- <!--
696
- <xsl:param name="ResourceAbstract">
697
- <xsl:value-of select="gmd:identificationInfo[1]/*/gmd:abstract/gco:CharacterString"/>
698
- </xsl:param>
699
- -->
700
- <xsl:param name="ResourceAbstract">
701
- <xsl:for-each select="gmd:identificationInfo[1]/*/gmd:abstract">
702
- <dct:description xml:lang="{$MetadataLanguage}">
703
- <xsl:value-of select="normalize-space(gco:CharacterString)"/>
704
- </dct:description>
705
- <xsl:call-template name="LocalisedString">
706
- <xsl:with-param name="term">dct:description</xsl:with-param>
707
- </xsl:call-template>
708
- </xsl:for-each>
709
- </xsl:param>
710
- <!--
711
- <xsl:param name="Lineage">
712
- <xsl:value-of select="gmd:dataQualityInfo/*/gmd:lineage/*/gmd:statement/gco:CharacterString"/>
713
- </xsl:param>
714
- -->
715
- <xsl:param name="Lineage">
716
- <xsl:for-each select="gmd:dataQualityInfo/*/gmd:lineage/*/gmd:statement">
717
- <dct:provenance>
718
- <dct:ProvenanceStatement>
719
- <rdfs:label xml:lang="{$MetadataLanguage}"><xsl:value-of select="normalize-space(gco:CharacterString)"/></rdfs:label>
720
- <xsl:call-template name="LocalisedString">
721
- <xsl:with-param name="term">rdfs:label</xsl:with-param>
722
- </xsl:call-template>
723
- </dct:ProvenanceStatement>
724
- </dct:provenance>
725
- </xsl:for-each>
726
- </xsl:param>
727
-
728
- <xsl:param name="MetadataDate">
729
- <xsl:choose>
730
- <xsl:when test="gmd:dateStamp/gco:Date">
731
- <xsl:value-of select="gmd:dateStamp/gco:Date"/>
732
- </xsl:when>
733
- <xsl:when test="gmd:dateStamp/gco:DateTime">
734
- <!--
735
- <xsl:value-of select="substring(gmd:dateStamp/gco:DateTime/text(),1,10)"/>
736
- -->
737
- <xsl:value-of select="normalize-space(gmd:dateStamp/gco:DateTime/text())"/>
738
- </xsl:when>
739
- </xsl:choose>
740
- </xsl:param>
741
-
742
- <xsl:param name="UniqueResourceIdentifier">
743
- <xsl:for-each select="gmd:identificationInfo[1]/*/gmd:citation/*/gmd:identifier/*">
744
- <xsl:choose>
745
- <xsl:when test="gmd:codeSpace/gco:CharacterString/text() != ''">
746
- <xsl:value-of select="concat(gmd:codeSpace/gco:CharacterString/text(),gmd:code/gco:CharacterString/text())"/>
747
- </xsl:when>
748
- <xsl:otherwise>
749
- <xsl:value-of select="gmd:code/gco:CharacterString/text()"/>
750
- </xsl:otherwise>
751
- </xsl:choose>
752
- </xsl:for-each>
753
- </xsl:param>
754
-
755
- <xsl:param name="ConstraintsRelatedToAccessAndUse">
756
- <xsl:apply-templates select="gmd:identificationInfo[1]/*/gmd:resourceConstraints/*">
757
- <xsl:with-param name="MetadataLanguage" select="$MetadataLanguage"/>
758
- </xsl:apply-templates>
759
- </xsl:param>
760
-
761
- <!-- Conformity, expressed by using an earl:Assertion (only for the extended profile) -->
762
- <!--
763
- <xsl:param name="Conformity">
764
- <xsl:for-each select="gmd:dataQualityInfo/*/gmd:report/*/gmd:result/*/gmd:specification/gmd:CI_Citation">
765
- <xsl:variable name="specinfo">
766
- <dct:title xml:lang="{$MetadataLanguage}">
767
- <xsl:value-of select="gmd:title/gco:CharacterString"/>
768
- </dct:title>
769
- <xsl:apply-templates select="gmd:date/gmd:CI_Date"/>
770
- </xsl:variable>
771
- <xsl:variable name="degree">
772
- <xsl:choose>
773
- <xsl:when test="../../gmd:pass/gco:Boolean = 'true'">
774
- <xsl:value-of select="concat($DegreeOfConformityCodelistUri,'/conformant')"/>
775
- </xsl:when>
776
- <xsl:when test="../../gmd:pass/gco:Boolean = 'false'">
777
- <xsl:value-of select="concat($DegreeOfConformityCodelistUri,'/notConformant')"/>
778
- </xsl:when>
779
- <xsl:otherwise>
780
- <xsl:value-of select="concat($DegreeOfConformityCodelistUri,'/notEvaluated')"/>
781
- </xsl:otherwise>
782
- </xsl:choose>
783
- </xsl:variable>
784
- <xsl:variable name="explanation">
785
- <xsl:value-of select="../../gmd:explanation/gco:CharacterString"/>
786
- </xsl:variable>
787
- <earl:Assertion>
788
- <xsl:if test="$ResourceUri != ''">
789
- <earl:subject rdf:resource="{$ResourceUri}"/>
790
- </xsl:if>
791
- <xsl:choose>
792
- <xsl:when test="../@xlink:href and ../@xlink:href != ''">
793
- <earl:test>
794
- <rdf:Description rdf:about="{../@xlink:href}">
795
- <xsl:copy-of select="$specinfo"/>
796
- </rdf:Description>
797
- </earl:test>
798
- </xsl:when>
799
- <xsl:otherwise>
800
- <earl:test rdf:parseType="Resource">
801
- <xsl:copy-of select="$specinfo"/>
802
- </earl:test>
803
- </xsl:otherwise>
804
- </xsl:choose>
805
- <earl:result>
806
- <earl:TestResult>
807
- <earl:outcome rdf:resource="{$degree}"/>
808
- <xsl:if test="$explanation and $explanation != ''">
809
- <earl:info xml:lang="{$MetadataLanguage}"><xsl:value-of select="$explanation"/></earl:info>
810
- </xsl:if>
811
- </earl:TestResult>
812
- </earl:result>
813
- </earl:Assertion>
814
- </xsl:for-each>
815
- </xsl:param>
816
- -->
817
- <!-- Conformity, expressed by using a prov:Activity (only for the extended profile) -->
818
-
819
- <xsl:param name="Conformity">
820
- <xsl:for-each select="gmd:dataQualityInfo/*/gmd:report/*/gmd:result/*/gmd:specification/gmd:CI_Citation">
821
- <xsl:variable name="specUri" select="normalize-space(gmd:title/gmx:Anchor/@xlink:href)"/>
822
- <xsl:variable name="specTitle">
823
- <xsl:for-each select="gmd:title">
824
- <!--
825
- <dct:title xml:lang="{$MetadataLanguage}"><xsl:value-of select="normalize-space(gco:CharacterString)"/></dct:title>
826
- -->
827
- <dct:title xml:lang="{$MetadataLanguage}">
828
- <xsl:value-of select="normalize-space(*[self::gco:CharacterString|self::gmx:Anchor])"/>
829
- </dct:title>
830
- <xsl:call-template name="LocalisedString">
831
- <xsl:with-param name="term">dct:title</xsl:with-param>
832
- </xsl:call-template>
833
- </xsl:for-each>
834
- </xsl:variable>
835
- <xsl:variable name="specinfo">
836
- <!--
837
- <dct:title xml:lang="{$MetadataLanguage}">
838
- <xsl:value-of select="gmd:title/gco:CharacterString"/>
839
- </dct:title>
840
- -->
841
- <xsl:copy-of select="$specTitle"/>
842
- <xsl:apply-templates select="gmd:date/gmd:CI_Date"/>
843
- </xsl:variable>
844
- <xsl:variable name="degree">
845
- <xsl:choose>
846
- <xsl:when test="../../gmd:pass/gco:Boolean = 'true'">
847
- <xsl:value-of select="concat($DegreeOfConformityCodelistUri,'/conformant')"/>
848
- </xsl:when>
849
- <xsl:when test="../../gmd:pass/gco:Boolean = 'false'">
850
- <xsl:value-of select="concat($DegreeOfConformityCodelistUri,'/notConformant')"/>
851
- </xsl:when>
852
- <xsl:otherwise>
853
- <!--
854
- <xsl:when test="../../gmd:pass/gco:Boolean = ''">
855
- -->
856
- <xsl:value-of select="concat($DegreeOfConformityCodelistUri,'/notEvaluated')"/>
857
- <!--
858
- </xsl:when>
859
- -->
860
- </xsl:otherwise>
861
- </xsl:choose>
862
- </xsl:variable>
863
- <!--
864
- <xsl:variable name="explanation">
865
- <xsl:value-of select="../../gmd:explanation/gco:CharacterString"/>
866
- </xsl:variable>
867
- -->
868
- <xsl:variable name="explanation">
869
- <xsl:for-each select="../../gmd:explanation">
870
- <dct:description xml:lang="{$MetadataLanguage}">
871
- <xsl:value-of select="normalize-space(gco:CharacterString)"/>
872
- </dct:description>
873
- <xsl:call-template name="LocalisedString">
874
- <xsl:with-param name="term">dct:description</xsl:with-param>
875
- </xsl:call-template>
876
- </xsl:for-each>
877
- </xsl:variable>
878
- <xsl:variable name="Activity">
879
- <prov:Activity>
880
- <xsl:if test="$ResourceUri != ''">
881
- <prov:used>
882
- <prov:Entity rdf:about="{$ResourceUri}"/>
883
- </prov:used>
884
- </xsl:if>
885
- <prov:qualifiedAssociation rdf:parseType="Resource">
886
- <rdf:type rdf:resource="{$prov}Association"/>
887
- <prov:hadPlan rdf:parseType="Resource">
888
- <rdf:type rdf:resource="{$prov}Plan"/>
889
- <xsl:choose>
890
- <xsl:when test="$specUri != ''">
891
- <prov:wasDerivedFrom>
892
- <prov:Entity rdf:about="{$specUri}"/>
893
- </prov:wasDerivedFrom>
894
- <!--
895
- <prov:wasDerivedFrom>
896
- <rdf:Description rdf:about="{$specUri}">
897
- <xsl:copy-of select="$specinfo"/>
898
- </rdf:Description>
899
- </prov:wasDerivedFrom>
900
- -->
901
- </xsl:when>
902
- <xsl:when test="../@xlink:href and ../@xlink:href != ''">
903
- <prov:wasDerivedFrom>
904
- <prov:Entity rdf:about="{../@xlink:href}"/>
905
- </prov:wasDerivedFrom>
906
- <!--
907
- <prov:wasDerivedFrom>
908
- <rdf:Description rdf:about="{../@xlink:href}">
909
- <xsl:copy-of select="$specinfo"/>
910
- </rdf:Description>
911
- </prov:wasDerivedFrom>
912
- -->
913
- </xsl:when>
914
- <xsl:otherwise>
915
- <prov:wasDerivedFrom rdf:parseType="Resource">
916
- <rdf:type rdf:resource="{$prov}Entity"/>
917
- <xsl:copy-of select="$specinfo"/>
918
- </prov:wasDerivedFrom>
919
- </xsl:otherwise>
920
- </xsl:choose>
921
- </prov:hadPlan>
922
- </prov:qualifiedAssociation>
923
- <prov:generated rdf:parseType="Resource">
924
- <rdf:type rdf:resource="{$prov}Entity"/>
925
- <dct:type rdf:resource="{$degree}"/>
926
- <!--
927
- <xsl:if test="$explanation and $explanation != ''">
928
- <dct:description xml:lang="{$MetadataLanguage}"><xsl:value-of select="$explanation"/></dct:description>
929
- </xsl:if>
930
- -->
931
- <xsl:copy-of select="$explanation"/>
932
- </prov:generated>
933
- </prov:Activity>
934
- </xsl:variable>
935
- <!--
936
- <xsl:choose>
937
- <xsl:when test="$ResourceUri != ''">
938
- <xsl:copy-of select="$Activity"/>
939
- </xsl:when>
940
- <xsl:otherwise>
941
- -->
942
- <prov:wasUsedBy>
943
- <xsl:copy-of select="$Activity"/>
944
- </prov:wasUsedBy>
945
- <!--
946
- </xsl:otherwise>
947
- </xsl:choose>
948
- -->
949
- </xsl:for-each>
950
- </xsl:param>
951
-
952
- <!-- Metadata character encoding (only for the extended profile) -->
953
-
954
- <xsl:param name="MetadataCharacterEncoding">
955
- <xsl:apply-templates select="gmd:characterSet/gmd:MD_CharacterSetCode"/>
956
- </xsl:param>
957
-
958
- <xsl:param name="ResourceCharacterEncoding">
959
- <xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification">
960
- <xsl:apply-templates select="gmd:characterSet/gmd:MD_CharacterSetCode"/>
961
- </xsl:for-each>
962
- </xsl:param>
963
-
964
- <!-- Metadata description (metadata on metadata) -->
965
-
966
- <xsl:param name="MetadataDescription">
967
- <rdf:type rdf:resource="{$dcat}CatalogRecord"/>
968
- <xsl:if test="$ResourceUri != ''">
969
- <foaf:primaryTopic rdf:resource="{$ResourceUri}"/>
970
- </xsl:if>
971
- <!-- Metadata standard -->
972
- <dct:conformsTo>
973
- <dct:Standard rdf:about="{$selected-profile}"/>
974
- </dct:conformsTo>
975
- <!-- Metadata language -->
976
- <xsl:if test="$ormlang != ''">
977
- <dct:language>
978
- <dct:LinguisticSystem rdf:about="{concat($oplang,translate($ormlang,$lowercase,$uppercase))}"/>
979
- </dct:language>
980
- </xsl:if>
981
- <!-- Metadata date -->
982
- <xsl:if test="$MetadataDate != ''">
983
- <xsl:variable name="data-type">
984
- <xsl:call-template name="DateDataType">
985
- <xsl:with-param name="date" select="$MetadataDate"/>
986
- </xsl:call-template>
987
- </xsl:variable>
988
- <dct:modified rdf:datatype="{$xsd}{$data-type}">
989
- <xsl:value-of select="$MetadataDate"/>
990
- </dct:modified>
991
- </xsl:if>
992
- <!-- Metadata point of contact: only for the extended profile -->
993
- <xsl:if test="$profile = $extended">
994
- <xsl:for-each select="gmd:contact">
995
- <xsl:apply-templates select="gmd:CI_ResponsibleParty">
996
- <xsl:with-param name="MetadataLanguage" select="$MetadataLanguage"/>
997
- <xsl:with-param name="ResourceType" select="$ResourceType"/>
998
- </xsl:apply-templates>
999
- </xsl:for-each>
1000
- <!-- Old version
1001
- <xsl:apply-templates select="gmd:contact/gmd:CI_ResponsibleParty">
1002
- <xsl:with-param name="MetadataLanguage" select="$MetadataLanguage"/>
1003
- </xsl:apply-templates>
1004
- -->
1005
- </xsl:if>
1006
- <!-- Metadata file identifier (tentative): only for the extended profile -->
1007
- <xsl:if test="$profile = $extended">
1008
- <xsl:for-each select="gmd:fileIdentifier/gco:CharacterString">
1009
- <dct:identifier rdf:datatype="{$xsd}string"><xsl:value-of select="."/></dct:identifier>
1010
- </xsl:for-each>
1011
- </xsl:if>
1012
- <!-- Metadata standard (tentative): only for the extended profile -->
1013
- <!-- Mapping moved to core profile for compliance with DCAT-AP 2 -->
1014
- <!--
1015
- <xsl:if test="$profile = $extended">
1016
- -->
1017
- <xsl:variable name="MetadataStandardURI" select="gmd:metadataStandardName/gmx:Anchor/@xlink:href"/>
1018
- <!--
1019
- <xsl:variable name="MetadataStandardName" select="gmd:metadataStandardName/*[self::gco:CharacterString|self::gmx:Anchor]"/>
1020
- -->
1021
- <xsl:variable name="MetadataStandardName">
1022
- <xsl:for-each select="gmd:metadataStandardName">
1023
- <dct:title xml:lang="{$MetadataLanguage}">
1024
- <xsl:value-of select="normalize-space(*[self::gco:CharacterString|self::gmx:Anchor])"/>
1025
- </dct:title>
1026
- <xsl:call-template name="LocalisedString">
1027
- <xsl:with-param name="term">dct:title</xsl:with-param>
1028
- </xsl:call-template>
1029
- </xsl:for-each>
1030
- </xsl:variable>
1031
- <xsl:variable name="MetadataStandardVersion" select="gmd:metadataStandardVersion/gco:CharacterString"/>
1032
- <xsl:if test="$MetadataCharacterEncoding != '' or $MetadataStandardURI != '' or $MetadataStandardName != ''">
1033
- <dct:source rdf:parseType="Resource">
1034
- <rdf:type rdf:resource="{$dcat}CatalogRecord"/>
1035
- <!-- Metadata date -->
1036
- <xsl:if test="$MetadataDate != ''">
1037
- <dct:modified rdf:datatype="{$xsd}date">
1038
- <xsl:value-of select="$MetadataDate"/>
1039
- </dct:modified>
1040
- </xsl:if>
1041
- <xsl:if test="$MetadataCharacterEncoding != ''">
1042
- <!-- Metadata character encoding (tentative): only for the extended profile -->
1043
- <xsl:copy-of select="$MetadataCharacterEncoding"/>
1044
- </xsl:if>
1045
- <xsl:choose>
1046
- <xsl:when test="$MetadataStandardURI != ''">
1047
- <!-- Metadata standard, denoted by a URI -->
1048
- <dct:conformsTo>
1049
- <dct:Standard rdf:about="{$MetadataStandardURI}"/>
1050
- </dct:conformsTo>
1051
- </xsl:when>
1052
- <xsl:when test="$MetadataStandardName != ''">
1053
- <dct:conformsTo rdf:parseType="Resource">
1054
- <rdf:type rdf:resource="{$dct}Standard"/>
1055
- <!-- Metadata standard name -->
1056
- <!--
1057
- <dct:title xml:lang="{$MetadataLanguage}"><xsl:value-of select="$MetadataStandardName"/></dct:title>
1058
- -->
1059
- <xsl:copy-of select="$MetadataStandardName"/>
1060
- <xsl:if test="$MetadataStandardVersion != ''">
1061
- <!-- Metadata standard version -->
1062
- <owl:versionInfo xml:lang="{$MetadataLanguage}"><xsl:value-of select="$MetadataStandardVersion"/></owl:versionInfo>
1063
- </xsl:if>
1064
- </dct:conformsTo>
1065
- </xsl:when>
1066
- </xsl:choose>
1067
- </dct:source>
1068
- </xsl:if>
1069
- <!-- Old version:
1070
- <xsl:for-each select="gmd:metadataStandardName/gco:CharacterString">
1071
- <xsl:if test="text() != '' or ../../gmd:metadataStandardVersion/gco:CharacterString/text() != ''">
1072
- <dct:source rdf:parseType="Resource">
1073
- <xsl:if test="$MetadataCharacterEncoding != ''">
1074
- <xsl:copy-of select="$MetadataCharacterEncoding"/>
1075
- </xsl:if>
1076
- <dct:conformsTo rdf:parseType="Resource">
1077
- <xsl:if test="text() != ''">
1078
- <dct:title xml:lang="{$MetadataLanguage}"><xsl:value-of select="."/></dct:title>
1079
- </xsl:if>
1080
- <xsl:if test="../../gmd:metadataStandardName/gco:CharacterString/text() != ''">
1081
- <owl:versionInfo xml:lang="{$MetadataLanguage}"><xsl:value-of select="../../gmd:metadataStandardVersion/gco:CharacterString"/></owl:versionInfo>
1082
- </xsl:if>
1083
- </dct:conformsTo>
1084
- </dct:source>
1085
- </xsl:if>
1086
- </xsl:for-each>
1087
- -->
1088
- <!--
1089
- </xsl:if>
1090
- -->
1091
- </xsl:param>
1092
-
1093
- <!-- Resource description (resource metadata) -->
1094
-
1095
- <xsl:param name="ResourceDescription">
1096
- <xsl:choose>
1097
- <xsl:when test="$ResourceType = 'dataset'">
1098
- <rdf:type rdf:resource="{$dcat}Dataset"/>
1099
- </xsl:when>
1100
- <xsl:when test="$ResourceType = 'series'">
1101
- <rdf:type rdf:resource="{$dcat}Dataset"/>
1102
- </xsl:when>
1103
- <xsl:when test="$ResourceType = 'service'">
1104
- <!-- Mapping moved to core profile for compliance with DCAT-AP 2 -->
1105
- <!--
1106
- <xsl:if test="$profile = $extended">
1107
- -->
1108
- <!-- DEPRECATED: Mapping kept for backward compatibility with GeoDCAT-AP v1.* -->
1109
- <xsl:if test="$include-deprecated = 'yes'">
1110
- <rdf:type rdf:resource="{$dctype}Service"/>
1111
- </xsl:if>
1112
- <!-- Mapping added for compliance with DCAT-AP 2 -->
1113
- <rdf:type rdf:resource="{$dcat}DataService"/>
1114
- <!--
1115
- </xsl:if>
1116
- -->
1117
- <xsl:if test="$ServiceType = 'discovery'">
1118
- <!-- DEPRECATED: Mapping kept for backward compatibility with GeoDCAT-AP v1.* -->
1119
- <xsl:if test="$include-deprecated = 'yes'">
1120
- <rdf:type rdf:resource="{$dcat}Catalog"/>
1121
- </xsl:if>
1122
- <!-- Mapping added for compliance with DCAT-AP 2 -->
1123
- <!--
1124
- <rdf:type rdf:resource="{$dcat}DataService"/>
1125
- -->
1126
- </xsl:if>
1127
- </xsl:when>
1128
- </xsl:choose>
1129
- <!-- Mapping moved to core profile for compliance with DCAT-AP 2 -->
1130
- <!--
1131
- <xsl:if test="$profile = $extended">
1132
- -->
1133
- <xsl:if test="$InspireResourceType != ''">
1134
- <dct:type rdf:resource="{$ResourceTypeCodelistUri}/{$ResourceType}"/>
1135
- </xsl:if>
1136
- <!--
1137
- </xsl:if>
1138
- -->
1139
- <!--
1140
- <dct:title xml:lang="{$MetadataLanguage}"><xsl:value-of select="$ResourceTitle"/></dct:title>
1141
- -->
1142
- <xsl:copy-of select="$ResourceTitle"/>
1143
- <!--
1144
- <dct:description xml:lang="{$MetadataLanguage}">
1145
- <xsl:value-of select="normalize-space($ResourceAbstract)"/>
1146
- </dct:description>
1147
- -->
1148
- <xsl:copy-of select="$ResourceAbstract"/>
1149
- <!-- Maintenance information (tentative) -->
1150
- <xsl:for-each select="gmd:identificationInfo/*/gmd:resourceMaintenance">
1151
- <xsl:apply-templates select="gmd:MD_MaintenanceInformation/gmd:maintenanceAndUpdateFrequency/gmd:MD_MaintenanceFrequencyCode"/>
1152
- </xsl:for-each>
1153
- <!-- Topic category -->
1154
- <xsl:if test="$profile = $extended">
1155
- <xsl:apply-templates select="gmd:identificationInfo/*/gmd:topicCategory">
1156
- <xsl:with-param name="MetadataLanguage" select="$MetadataLanguage"/>
1157
- </xsl:apply-templates>
1158
- </xsl:if>
1159
- <!-- Keyword -->
1160
- <xsl:apply-templates select="gmd:identificationInfo/*/gmd:descriptiveKeywords/gmd:MD_Keywords">
1161
- <xsl:with-param name="MetadataLanguage" select="$MetadataLanguage"/>
1162
- <xsl:with-param name="ResourceType" select="$ResourceType"/>
1163
- <xsl:with-param name="ServiceType" select="$ServiceType"/>
1164
- </xsl:apply-templates>
1165
- <!-- Identifier, 0..1 -->
1166
- <!--
1167
- <xsl:apply-templates select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:identifier/*">
1168
- <xsl:with-param name="MetadataLanguage" select="$MetadataLanguage"/>
1169
- </xsl:apply-templates>
1170
- -->
1171
- <!-- Resource locators -->
1172
- <!--
1173
- <xsl:apply-templates select="gmd:distributionInfo/*/gmd:transferOptions/*/gmd:onLine/*/gmd:linkage">
1174
- <xsl:with-param name="ResourceType" select="$ResourceType"/>
1175
- <xsl:with-param name="MetadataLanguage" select="$MetadataLanguage"/>
1176
- </xsl:apply-templates>
1177
- -->
1178
- <!-- Unique Resource Identifier -->
1179
- <xsl:apply-templates select="gmd:identificationInfo/*/gmd:citation/*/gmd:identifier/*"/>
1180
- <!-- Coupled resources -->
1181
- <xsl:apply-templates select="gmd:identificationInfo[1]/*/srv:operatesOn">
1182
- <xsl:with-param name="ResourceType" select="$ResourceType"/>
1183
- <xsl:with-param name="MetadataLanguage" select="$MetadataLanguage"/>
1184
- </xsl:apply-templates>
1185
- <!-- Resource Language -->
1186
- <xsl:if test="$ResourceType = 'dataset' or $ResourceType = 'series'">
1187
- <xsl:choose>
1188
- <xsl:when test="$orrlang != ''">
1189
- <dct:language>
1190
- <dct:LinguisticSystem rdf:about="{concat($oplang,translate($orrlang,$lowercase,$uppercase))}"/>
1191
- </dct:language>
1192
- </xsl:when>
1193
- <xsl:otherwise>
1194
- <!-- To be decided (when the resource language is not specified, it defaults to the metadata language): -->
1195
- <!--
1196
- <xsl:if test="$ormlang != ''">
1197
- <dct:language rdf:resource="{concat($oplang,translate($ormlang,$lowercase,$uppercase))}"/>
1198
- </xsl:if>
1199
- -->
1200
- </xsl:otherwise>
1201
- </xsl:choose>
1202
- </xsl:if>
1203
- <!-- Spatial service type -->
1204
- <!-- Mapping added to the core profile for compliance with DCAT-AP 2 -->
1205
- <!--
1206
- <xsl:if test="$ResourceType = 'service' and $profile = $extended">
1207
- -->
1208
- <xsl:if test="$ResourceType = 'service'">
1209
- <!-- Replaced by param $ServiceType -->
1210
- <!--
1211
- <xsl:apply-templates select="gmd:identificationInfo/*/srv:serviceType">
1212
- <xsl:with-param name="MetadataLanguage" select="$MetadataLanguage"/>
1213
- </xsl:apply-templates>
1214
- -->
1215
- <dct:type rdf:resource="{$SpatialDataServiceTypeCodelistUri}/{$ServiceType}"/>
1216
- </xsl:if>
1217
- <!-- Spatial extent -->
1218
- <!--
1219
- <xsl:apply-templates select="gmd:identificationInfo[1]/*/*[self::gmd:extent|self::srv:extent]/*/gmd:geographicElement/gmd:EX_GeographicBoundingBox"/>
1220
- -->
1221
- <xsl:apply-templates select="gmd:identificationInfo[1]/*/*[self::gmd:extent|self::srv:extent]/*/gmd:geographicElement">
1222
- <xsl:with-param name="MetadataLanguage" select="$MetadataLanguage"/>
1223
- </xsl:apply-templates>
1224
- <!-- Temporal extent -->
1225
- <xsl:apply-templates select="gmd:identificationInfo/*/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent"/>
1226
- <!-- Creation date, publication date, date of last revision -->
1227
- <xsl:apply-templates select="gmd:identificationInfo/*/gmd:citation/gmd:CI_Citation"/>
1228
- <!-- Lineage -->
1229
- <xsl:if test="$ResourceType != 'service' and $Lineage != ''">
1230
- <!--
1231
- <dct:provenance>
1232
- <dct:ProvenanceStatement>
1233
- <rdfs:label xml:lang="{$MetadataLanguage}">
1234
- <xsl:value-of select="normalize-space($Lineage)"/>
1235
- </rdfs:label>
1236
- </dct:ProvenanceStatement>
1237
- </dct:provenance>
1238
- -->
1239
- <xsl:copy-of select="$Lineage"/>
1240
- </xsl:if>
1241
- <!-- Coordinate and temporal reference systems (tentative) -->
1242
- <!-- Mapping added to the core profile for compliance with DCAT-AP 2 -->
1243
- <!--
1244
- <xsl:if test="$profile = $extended">
1245
- -->
1246
- <xsl:apply-templates select="gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier">
1247
- <xsl:with-param name="MetadataLanguage" select="$MetadataLanguage"/>
1248
- </xsl:apply-templates>
1249
- <!--
1250
- </xsl:if>
1251
- -->
1252
- <!-- Spatial resolution -->
1253
- <!-- Mapping moved to core profile for compliance with DCAT-AP 2 -->
1254
- <!--
1255
- <xsl:if test="$profile = $extended">
1256
- -->
1257
- <xsl:apply-templates select="gmd:identificationInfo/*/gmd:spatialResolution/gmd:MD_Resolution"/>
1258
- <!--
1259
- </xsl:if>
1260
- -->
1261
- <!-- Constraints related to access and use for services -->
1262
- <!-- Mapping moved to the core profile for compliance with DCAT-AP 2 -->
1263
- <!--
1264
- <xsl:if test="$ResourceType = 'service' and ($ServiceType = 'discovery' or $profile = $extended)">
1265
- -->
1266
- <xsl:if test="$ResourceType = 'service'">
1267
- <xsl:copy-of select="$ConstraintsRelatedToAccessAndUse"/>
1268
- </xsl:if>
1269
-
1270
- <!-- Conformity -->
1271
- <xsl:apply-templates select="gmd:dataQualityInfo/*/gmd:report/*/gmd:result/*/gmd:specification/gmd:CI_Citation">
1272
- <xsl:with-param name="ResourceUri" select="$ResourceUri"/>
1273
- <xsl:with-param name="MetadataLanguage" select="$MetadataLanguage"/>
1274
- <xsl:with-param name="Conformity" select="$Conformity"/>
1275
- </xsl:apply-templates>
1276
-
1277
- <!-- Spatial representation type -->
1278
- <xsl:variable name="SpatialRepresentationType">
1279
- <xsl:apply-templates select="gmd:identificationInfo/*/gmd:spatialRepresentationType/gmd:MD_SpatialRepresentationTypeCode"/>
1280
- </xsl:variable>
1281
-
1282
- <xsl:for-each select="gmd:distributionInfo/gmd:MD_Distribution">
1283
- <!-- Encoding -->
1284
- <xsl:variable name="Encoding">
1285
- <xsl:apply-templates select="gmd:distributionFormat/gmd:MD_Format/gmd:name/*"/>
1286
- </xsl:variable>
1287
- <!-- Resource locators (access / download URLs) -->
1288
- <xsl:for-each select="gmd:transferOptions/*/gmd:onLine/*">
1289
-
1290
- <xsl:variable name="url" select="gmd:linkage/gmd:URL"/>
1291
-
1292
- <xsl:variable name="protocol" select="gmd:protocol/*"/>
1293
-
1294
- <xsl:variable name="protocol-url" select="gmd:protocol/gmx:Anchor/@xlink:href"/>
1295
-
1296
- <xsl:variable name="function" select="gmd:function/gmd:CI_OnLineFunctionCode/@codeListValue"/>
1297
-
1298
- <xsl:variable name="Title">
1299
- <xsl:for-each select="gmd:name">
1300
- <dct:title xml:lang="{$MetadataLanguage}">
1301
- <xsl:value-of select="normalize-space(*)"/>
1302
- </dct:title>
1303
- <xsl:call-template name="LocalisedString">
1304
- <xsl:with-param name="term">dct:title</xsl:with-param>
1305
- </xsl:call-template>
1306
- </xsl:for-each>
1307
- </xsl:variable>
1308
-
1309
- <xsl:variable name="Description">
1310
- <xsl:for-each select="gmd:description">
1311
- <dct:description xml:lang="{$MetadataLanguage}">
1312
- <xsl:value-of select="normalize-space(*)"/>
1313
- </dct:description>
1314
- <xsl:call-template name="LocalisedString">
1315
- <xsl:with-param name="term">dct:description</xsl:with-param>
1316
- </xsl:call-template>
1317
- </xsl:for-each>
1318
- </xsl:variable>
1319
-
1320
- <xsl:variable name="TitleAndDescription">
1321
- <!--
1322
- <xsl:for-each select="gmd:name/gco:CharacterString">
1323
- <dct:title xml:lang="{$MetadataLanguage}"><xsl:value-of select="."/></dct:title>
1324
- </xsl:for-each>
1325
- <xsl:for-each select="gmd:description/gco:CharacterString">
1326
- <dct:description xml:lang="{$MetadataLanguage}"><xsl:value-of select="."/></dct:description>
1327
- </xsl:for-each>
1328
- -->
1329
- <xsl:copy-of select="$Title"/>
1330
- <xsl:copy-of select="$Description"/>
1331
- </xsl:variable>
1332
-
1333
- <xsl:variable name="TitleOrDescriptionOrPlaceholder">
1334
- <xsl:choose>
1335
- <xsl:when test="normalize-space(gmd:name/*) != ''">
1336
- <xsl:value-of select="normalize-space(gmd:name/*)"/>
1337
- </xsl:when>
1338
- <xsl:when test="normalize-space(gmd:description/*) != ''">
1339
- <xsl:value-of select="normalize-space(gmd:description)"/>
1340
- </xsl:when>
1341
- <xsl:otherwise>
1342
- <xsl:text>N/A</xsl:text>
1343
- </xsl:otherwise>
1344
- </xsl:choose>
1345
- </xsl:variable>
1346
-
1347
- <xsl:choose>
1348
- <!-- Mapping added to the core profile for compliance with DCAT-AP 2 -->
1349
- <xsl:when test="$ResourceType = 'service'">
1350
- <xsl:call-template name="service-endpoint">
1351
- <xsl:with-param name="function" select="$function"/>
1352
- <xsl:with-param name="protocol" select="$protocol"/>
1353
- <xsl:with-param name="url" select="$url"/>
1354
- </xsl:call-template>
1355
- <xsl:if test="$profile = $extended">
1356
- <xsl:call-template name="service-protocol">
1357
- <xsl:with-param name="function" select="$function"/>
1358
- <xsl:with-param name="protocol" select="$protocol"/>
1359
- <xsl:with-param name="url" select="$url"/>
1360
- </xsl:call-template>
1361
- </xsl:if>
1362
- </xsl:when>
1363
- <!-- Distributions -->
1364
- <xsl:when test="$ResourceType = 'dataset' or $ResourceType = 'series'">
1365
- <xsl:variable name="points-to-service">
1366
- <xsl:call-template name="detect-service">
1367
- <xsl:with-param name="function" select="$function"/>
1368
- <xsl:with-param name="protocol" select="$protocol"/>
1369
- <xsl:with-param name="url" select="$url"/>
1370
- </xsl:call-template>
1371
- </xsl:variable>
1372
- <xsl:choose>
1373
- <xsl:when test="$points-to-service = 'yes' or $function = 'download' or $function = 'offlineAccess' or $function = 'order'">
1374
- <dcat:distribution>
1375
- <dcat:Distribution>
1376
- <!-- Title and description -->
1377
- <xsl:copy-of select="$TitleAndDescription"/>
1378
- <!-- Access URL -->
1379
- <!--
1380
- <xsl:for-each select="gmd:linkage/gmd:URL">
1381
- <dcat:accessURL rdf:resource="{.}"/>
1382
- </xsl:for-each>
1383
- -->
1384
- <xsl:choose>
1385
- <xsl:when test="$points-to-service = 'yes'">
1386
- <dcat:accessService rdf:parseType="Resource">
1387
- <rdf:type rdf:resource="{$dcat}DataService"/>
1388
- <dct:title xml:lang="{$MetadataLanguage}">
1389
- <xsl:value-of select="$TitleOrDescriptionOrPlaceholder"/>
1390
- </dct:title>
1391
- <xsl:call-template name="service-endpoint">
1392
- <xsl:with-param name="function" select="$function"/>
1393
- <xsl:with-param name="protocol" select="$protocol"/>
1394
- <xsl:with-param name="url" select="$url"/>
1395
- </xsl:call-template>
1396
- <xsl:if test="$profile = $extended">
1397
- <xsl:call-template name="service-protocol">
1398
- <xsl:with-param name="function" select="$function"/>
1399
- <xsl:with-param name="protocol" select="$protocol"/>
1400
- <xsl:with-param name="url" select="$url"/>
1401
- </xsl:call-template>
1402
- </xsl:if>
1403
- </dcat:accessService>
1404
- </xsl:when>
1405
- <xsl:otherwise>
1406
- </xsl:otherwise>
1407
- </xsl:choose>
1408
- <dcat:accessURL rdf:resource="{$url}"/>
1409
- <!-- Constraints related to access and use -->
1410
- <xsl:copy-of select="$ConstraintsRelatedToAccessAndUse"/>
1411
- <!-- Spatial representation type (tentative) -->
1412
- <xsl:if test="$profile = $extended">
1413
- <xsl:copy-of select="$SpatialRepresentationType"/>
1414
- </xsl:if>
1415
- <!-- Encoding -->
1416
- <xsl:copy-of select="$Encoding"/>
1417
- <!-- Resource character encoding -->
1418
- <xsl:if test="$profile = $extended">
1419
- <xsl:copy-of select="$ResourceCharacterEncoding"/>
1420
- </xsl:if>
1421
- </dcat:Distribution>
1422
- </dcat:distribution>
1423
- </xsl:when>
1424
- <xsl:when test="$function = 'information' or $function = 'search'">
1425
- <!-- ?? Should foaf:page be detailed with title, description, etc.? -->
1426
- <xsl:for-each select="gmd:linkage/gmd:URL">
1427
- <foaf:page>
1428
- <foaf:Document rdf:about="{.}">
1429
- <xsl:copy-of select="$TitleAndDescription"/>
1430
- </foaf:Document>
1431
- </foaf:page>
1432
- </xsl:for-each>
1433
- </xsl:when>
1434
- <!-- ?? Should dcat:landingPage be detailed with title, description, etc.? -->
1435
- <xsl:otherwise>
1436
- <xsl:for-each select="gmd:linkage/gmd:URL">
1437
- <dcat:landingPage>
1438
- <foaf:Document rdf:about="{.}">
1439
- <xsl:copy-of select="$TitleAndDescription"/>
1440
- </foaf:Document>
1441
- </dcat:landingPage>
1442
- </xsl:for-each>
1443
- </xsl:otherwise>
1444
- </xsl:choose>
1445
- </xsl:when>
1446
- </xsl:choose>
1447
- </xsl:for-each>
1448
- </xsl:for-each>
1449
- <!-- Responsible organisation -->
1450
- <xsl:for-each select="gmd:identificationInfo/*/gmd:pointOfContact">
1451
- <xsl:apply-templates select="gmd:CI_ResponsibleParty">
1452
- <xsl:with-param name="MetadataLanguage" select="$MetadataLanguage"/>
1453
- <xsl:with-param name="ResourceType" select="$ResourceType"/>
1454
- </xsl:apply-templates>
1455
- </xsl:for-each>
1456
- <!--
1457
- <xsl:apply-templates select="gmd:identificationInfo/*/gmd:pointOfContact/gmd:CI_ResponsibleParty">
1458
- <xsl:with-param name="MetadataLanguage" select="$MetadataLanguage"/>
1459
- <xsl:with-param name="ResourceType" select="$ResourceType"/>
1460
- </xsl:apply-templates>
1461
- -->
1462
- </xsl:param>
1463
-
1464
- <xsl:param name="Metadata">
1465
- <xsl:if test="$MetadataUri != '' or normalize-space($MetadataDescription)">
1466
- <foaf:isPrimaryTopicOf>
1467
- <xsl:choose>
1468
- <xsl:when test="$MetadataUri != ''">
1469
- <rdf:Description rdf:about="{$MetadataUri}">
1470
- <xsl:copy-of select="$MetadataDescription"/>
1471
- </rdf:Description>
1472
- </xsl:when>
1473
- <xsl:otherwise>
1474
- <xsl:if test="normalize-space($MetadataDescription)">
1475
- <rdf:Description>
1476
- <xsl:copy-of select="$MetadataDescription"/>
1477
- </rdf:Description>
1478
- </xsl:if>
1479
- </xsl:otherwise>
1480
- </xsl:choose>
1481
- </foaf:isPrimaryTopicOf>
1482
- </xsl:if>
1483
- </xsl:param>
1484
-
1485
- <xsl:choose>
1486
- <xsl:when test="$ResourceUri != ''">
1487
- <rdf:Description rdf:about="{$ResourceUri}">
1488
- <xsl:copy-of select="$Metadata"/>
1489
- <xsl:copy-of select="$ResourceDescription"/>
1490
- </rdf:Description>
1491
- </xsl:when>
1492
- <xsl:otherwise>
1493
- <rdf:Description>
1494
- <xsl:copy-of select="$Metadata"/>
1495
- <xsl:copy-of select="$ResourceDescription"/>
1496
- </rdf:Description>
1497
- </xsl:otherwise>
1498
- </xsl:choose>
1499
-
1500
- <!-- Mapping added to core profile for compliance with DCAT-AP 2 -->
1501
- <!--
1502
- <xsl:if test="$profile = $extended and $ResourceUri != '' and $Conformity != ''">
1503
- -->
1504
- <!--
1505
- <xsl:if test="$ResourceUri != '' and $Conformity != ''">
1506
- <xsl:copy-of select="$Conformity"/>
1507
- </xsl:if>
1508
- -->
1509
-
1510
-
1511
- </xsl:template>
1512
-
1513
- <!--
1514
-
1515
- Templates for specific metadata elements
1516
- ========================================
1517
-
1518
- -->
1519
-
1520
- <!-- Unique Resource Identifier -->
1521
-
1522
- <xsl:template name="UniqueResourceIdentifier" match="gmd:identificationInfo/*/gmd:citation/*/gmd:identifier/*">
1523
- <xsl:param name="ns">
1524
- <xsl:value-of select="gmd:codeSpace/gco:CharacterString"/>
1525
- </xsl:param>
1526
- <xsl:param name="code">
1527
- <xsl:value-of select="gmd:code/gco:CharacterString"/>
1528
- </xsl:param>
1529
- <xsl:param name="id">
1530
- <xsl:choose>
1531
- <xsl:when test="$ns != ''">
1532
- <xsl:choose>
1533
- <xsl:when test="substring($ns,string-length($ns),1) = '/'">
1534
- <xsl:value-of select="concat($ns,$code)"/>
1535
- </xsl:when>
1536
- <xsl:otherwise>
1537
- <xsl:value-of select="concat($ns,'/',$code)"/>
1538
- </xsl:otherwise>
1539
- </xsl:choose>
1540
- </xsl:when>
1541
- <xsl:otherwise>
1542
- <xsl:value-of select="$code"/>
1543
- </xsl:otherwise>
1544
- </xsl:choose>
1545
- </xsl:param>
1546
- <xsl:param name="idDatatypeURI">
1547
- <xsl:choose>
1548
- <xsl:when test="starts-with($id, 'http://') or starts-with($id, 'https://') or starts-with($id, 'urn:')">
1549
- <xsl:value-of select="concat($xsd,'anyURI')"/>
1550
- </xsl:when>
1551
- <xsl:otherwise>
1552
- <xsl:value-of select="concat($xsd,'string')"/>
1553
- </xsl:otherwise>
1554
- </xsl:choose>
1555
- </xsl:param>
1556
- <dct:identifier rdf:datatype="{$idDatatypeURI}"><xsl:value-of select="$id"/></dct:identifier>
1557
- </xsl:template>
1558
-
1559
- <!-- Responsible Organisation -->
1560
- <!--
1561
- <xsl:template name="ResponsibleOrganisation" match="gmd:identificationInfo/*/gmd:pointOfContact/gmd:CI_ResponsibleParty">
1562
- -->
1563
- <xsl:template name="ResponsibleOrganisation" match="gmd:CI_ResponsibleParty">
1564
- <xsl:param name="MetadataLanguage"/>
1565
- <xsl:param name="ResourceType"/>
1566
-
1567
- <xsl:param name="role">
1568
- <xsl:value-of select="gmd:role/gmd:CI_RoleCode/@codeListValue"/>
1569
- </xsl:param>
1570
-
1571
- <xsl:param name="ResponsiblePartyRole">
1572
- <xsl:value-of select="concat($ResponsiblePartyRoleCodelistUri,'/',$role)"/>
1573
- </xsl:param>
1574
-
1575
- <xsl:param name="IndividualURI">
1576
- <xsl:value-of select="normalize-space(gmd:individualName/*/@xlink:href)"/>
1577
- </xsl:param>
1578
-
1579
- <xsl:param name="IndividualName">
1580
- <xsl:value-of select="normalize-space(gmd:individualName/*)"/>
1581
- </xsl:param>
1582
-
1583
- <xsl:param name="IndividualName-FOAF">
1584
- <xsl:for-each select="gmd:individualName">
1585
- <foaf:name xml:lang="{$MetadataLanguage}"><xsl:value-of select="normalize-space(*[self::gco:CharacterString|gmx:Anchor])"/></foaf:name>
1586
- <xsl:call-template name="LocalisedString">
1587
- <xsl:with-param name="term">foaf:name</xsl:with-param>
1588
- </xsl:call-template>
1589
- </xsl:for-each>
1590
- </xsl:param>
1591
-
1592
- <xsl:param name="IndividualName-vCard">
1593
- <xsl:for-each select="gmd:individualName">
1594
- <vcard:fn xml:lang="{$MetadataLanguage}"><xsl:value-of select="normalize-space(*[self::gco:CharacterString|gmx:Anchor])"/></vcard:fn>
1595
- <xsl:call-template name="LocalisedString">
1596
- <xsl:with-param name="term">vcard:fn</xsl:with-param>
1597
- </xsl:call-template>
1598
- </xsl:for-each>
1599
- </xsl:param>
1600
-
1601
- <xsl:param name="OrganisationURI">
1602
- <xsl:value-of select="normalize-space(gmd:organisationName/*/@xlink:href)"/>
1603
- </xsl:param>
1604
-
1605
- <xsl:param name="URI">
1606
- <xsl:choose>
1607
- <xsl:when test="$IndividualURI != ''">
1608
- <xsl:value-of select="$IndividualURI"/>
1609
- </xsl:when>
1610
- <xsl:when test="$OrganisationURI != ''">
1611
- <xsl:value-of select="$OrganisationURI"/>
1612
- </xsl:when>
1613
- </xsl:choose>
1614
- </xsl:param>
1615
-
1616
- <xsl:param name="OrganisationName">
1617
- <xsl:value-of select="normalize-space(gmd:organisationName/*)"/>
1618
- </xsl:param>
1619
- <xsl:param name="OrganisationName-FOAF">
1620
- <xsl:for-each select="gmd:organisationName">
1621
- <foaf:name xml:lang="{$MetadataLanguage}"><xsl:value-of select="normalize-space(*[self::gco:CharacterString|gmx:Anchor])"/></foaf:name>
1622
- <xsl:call-template name="LocalisedString">
1623
- <xsl:with-param name="term">foaf:name</xsl:with-param>
1624
- </xsl:call-template>
1625
- </xsl:for-each>
1626
- </xsl:param>
1627
-
1628
- <xsl:param name="OrganisationName-vCard">
1629
- <xsl:for-each select="gmd:organisationName">
1630
- <vcard:organization-name xml:lang="{$MetadataLanguage}"><xsl:value-of select="normalize-space(*[self::gco:CharacterString|gmx:Anchor])"/></vcard:organization-name>
1631
- <xsl:call-template name="LocalisedString">
1632
- <xsl:with-param name="term">vcard:organization-name</xsl:with-param>
1633
- </xsl:call-template>
1634
- </xsl:for-each>
1635
- </xsl:param>
1636
-
1637
- <xsl:param name="OrganisationNameAsIndividualName-vCard">
1638
- <xsl:for-each select="gmd:organisationName">
1639
- <vcard:fn xml:lang="{$MetadataLanguage}"><xsl:value-of select="normalize-space(*[self::gco:CharacterString|gmx:Anchor])"/></vcard:fn>
1640
- <xsl:call-template name="LocalisedString">
1641
- <xsl:with-param name="term">vcard:fn</xsl:with-param>
1642
- </xsl:call-template>
1643
- </xsl:for-each>
1644
- </xsl:param>
1645
-
1646
- <xsl:param name="Email">
1647
- <xsl:for-each select="gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/*[normalize-space() != '']">
1648
- <foaf:mbox rdf:resource="mailto:{normalize-space(.)}"/>
1649
- </xsl:for-each>
1650
- </xsl:param>
1651
-
1652
- <xsl:param name="Email-vCard">
1653
- <xsl:for-each select="gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/*[normalize-space() != '']">
1654
- <vcard:hasEmail rdf:resource="mailto:{normalize-space(.)}"/>
1655
- </xsl:for-each>
1656
- </xsl:param>
1657
-
1658
- <xsl:param name="URL">
1659
- <xsl:for-each select="gmd:contactInfo/gmd:CI_Contact/gmd:onlineResource/gmd:CI_OnlineResource/gmd:linkage/gmd:URL[normalize-space() != '']">
1660
- <foaf:workplaceHomepage rdf:resource="{normalize-space(.)}"/>
1661
- </xsl:for-each>
1662
- </xsl:param>
1663
-
1664
- <xsl:param name="URL-vCard">
1665
- <xsl:for-each select="gmd:contactInfo/gmd:CI_Contact/gmd:onlineResource/gmd:CI_OnlineResource/gmd:linkage/gmd:URL[normalize-space() != '']">
1666
- <vcard:hasURL rdf:resource="{normalize-space(.)}"/>
1667
- </xsl:for-each>
1668
- </xsl:param>
1669
- <xsl:param name="Telephone">
1670
- <xsl:for-each select="gmd:contactInfo/gmd:CI_Contact/gmd:phone/gmd:CI_Telephone/gmd:voice/*[normalize-space() != '']">
1671
- <foaf:phone rdf:resource="tel:+{translate(translate(translate(translate(translate(normalize-space(.),' ',''),'(',''),')',''),'+',''),'.','')}"/>
1672
- </xsl:for-each>
1673
- </xsl:param>
1674
-
1675
- <xsl:param name="Telephone-vCard">
1676
- <xsl:for-each select="gmd:contactInfo/gmd:CI_Contact/gmd:phone/gmd:CI_Telephone/gmd:voice/*[normalize-space() != '']">
1677
- <vcard:hasTelephone rdf:resource="tel:+{translate(translate(translate(translate(translate(normalize-space(.),' ',''),'(',''),')',''),'+',''),'.','')}"/>
1678
- </xsl:for-each>
1679
- </xsl:param>
1680
-
1681
- <xsl:param name="Address">
1682
- <xsl:for-each select="gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address">
1683
- <xsl:variable name="deliveryPoint" select="normalize-space(gmd:deliveryPoint/*)"/>
1684
- <xsl:variable name="city" select="normalize-space(gmd:city/*)"/>
1685
- <xsl:variable name="administrativeArea" select="normalize-space(gmd:administrativeArea/*)"/>
1686
- <xsl:variable name="postalCode" select="normalize-space(gmd:postalCode/*)"/>
1687
- <xsl:variable name="country" select="normalize-space(gmd:country/*)"/>
1688
- <xsl:if test="$deliveryPoint != '' or $city != '' or $administrativeArea != '' or $postalCode != '' or $country != ''">
1689
- <locn:address>
1690
- <locn:Address>
1691
- <xsl:if test="$deliveryPoint != ''">
1692
- <locn:thoroughfare><xsl:value-of select="$deliveryPoint"/></locn:thoroughfare>
1693
- </xsl:if>
1694
- <xsl:if test="$city != ''">
1695
- <locn:postName><xsl:value-of select="$city"/></locn:postName>
1696
- </xsl:if>
1697
- <xsl:if test="$administrativeArea != ''">
1698
- <locn:adminUnitL2><xsl:value-of select="$administrativeArea"/></locn:adminUnitL2>
1699
- </xsl:if>
1700
- <xsl:if test="$postalCode != ''">
1701
- <locn:postCode><xsl:value-of select="$postalCode"/></locn:postCode>
1702
- </xsl:if>
1703
- <xsl:if test="$country != ''">
1704
- <locn:adminUnitL1><xsl:value-of select="$country"/></locn:adminUnitL1>
1705
- </xsl:if>
1706
- </locn:Address>
1707
- </locn:address>
1708
- </xsl:if>
1709
- </xsl:for-each>
1710
- </xsl:param>
1711
-
1712
- <xsl:param name="Address-vCard">
1713
- <xsl:for-each select="gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address">
1714
- <xsl:variable name="deliveryPoint" select="normalize-space(gmd:deliveryPoint/*)"/>
1715
- <xsl:variable name="city" select="normalize-space(gmd:city/*)"/>
1716
- <xsl:variable name="administrativeArea" select="normalize-space(gmd:administrativeArea/*)"/>
1717
- <xsl:variable name="postalCode" select="normalize-space(gmd:postalCode/*)"/>
1718
- <xsl:variable name="country" select="normalize-space(gmd:country/*)"/>
1719
- <xsl:if test="$deliveryPoint != '' or $city != '' or $administrativeArea != '' or $postalCode != '' or $country != ''">
1720
- <vcard:hasAddress>
1721
- <vcard:Address>
1722
- <xsl:if test="$deliveryPoint != ''">
1723
- <vcard:street-address><xsl:value-of select="$deliveryPoint"/></vcard:street-address>
1724
- </xsl:if>
1725
- <xsl:if test="$city != ''">
1726
- <vcard:locality><xsl:value-of select="$city"/></vcard:locality>
1727
- </xsl:if>
1728
- <xsl:if test="$administrativeArea != ''">
1729
- <vcard:region><xsl:value-of select="$administrativeArea"/></vcard:region>
1730
- </xsl:if>
1731
- <xsl:if test="$postalCode != ''">
1732
- <vcard:postal-code><xsl:value-of select="$postalCode"/></vcard:postal-code>
1733
- </xsl:if>
1734
- <xsl:if test="$country != ''">
1735
- <vcard:country-name><xsl:value-of select="$country"/></vcard:country-name>
1736
- </xsl:if>
1737
- </vcard:Address>
1738
- </vcard:hasAddress>
1739
- </xsl:if>
1740
- </xsl:for-each>
1741
- </xsl:param>
1742
-
1743
- <xsl:param name="ROInfo">
1744
- <xsl:variable name="info">
1745
- <xsl:choose>
1746
- <xsl:when test="$IndividualName != ''">
1747
- <rdf:type rdf:resource="{$foaf}Person"/>
1748
- </xsl:when>
1749
- <xsl:when test="$OrganisationName != ''">
1750
- <rdf:type rdf:resource="{$foaf}Organization"/>
1751
- </xsl:when>
1752
- <xsl:otherwise>
1753
- <rdf:type rdf:resource="{$foaf}Agent"/>
1754
- </xsl:otherwise>
1755
- </xsl:choose>
1756
-
1757
- <!-- CAVEAT: The following xsl:if ensures that the agent is typed also as prov:Agent for its
1758
- use with the PROV-based approach. The conditions MUST be aligned with the one used later
1759
- just before the statement with predicate prov:agent. -->
1760
-
1761
- <xsl:if test="($ResourceType != 'service' and $role != 'pointOfContact' and $role != 'publisher' and $role != 'author') or $profile = $extended">
1762
- <rdf:type rdf:resource="{$prov}Agent"/>
1763
- </xsl:if>
1764
-
1765
- <xsl:if test="$IndividualName != ''">
1766
- <!--
1767
- <foaf:name xml:lang="{$MetadataLanguage}">
1768
- <xsl:value-of select="$IndividualName"/>
1769
- </foaf:name>
1770
- -->
1771
- <xsl:copy-of select="$IndividualName-FOAF"/>
1772
- <xsl:if test="$OrganisationName != ''">
1773
- <org:memberOf>
1774
- <xsl:choose>
1775
- <xsl:when test="$OrganisationURI != ''">
1776
- <foaf:Organization rdf:about="{$OrganisationURI}">
1777
- <!--
1778
- <foaf:name xml:lang="{$MetadataLanguage}"><xsl:value-of select="$OrganisationName"/></foaf:name>
1779
- -->
1780
- <xsl:copy-of select="$OrganisationName-FOAF"/>
1781
- </foaf:Organization>
1782
- </xsl:when>
1783
- <xsl:otherwise>
1784
- <foaf:Organization>
1785
- <!--
1786
- <foaf:name xml:lang="{$MetadataLanguage}"><xsl:value-of select="$OrganisationName"/></foaf:name>
1787
- -->
1788
- <xsl:copy-of select="$OrganisationName-FOAF"/>
1789
- </foaf:Organization>
1790
- </xsl:otherwise>
1791
- </xsl:choose>
1792
- </org:memberOf>
1793
- </xsl:if>
1794
- </xsl:if>
1795
- <xsl:if test="$IndividualName = '' and $OrganisationName != ''">
1796
- <!--
1797
- <foaf:name xml:lang="{$MetadataLanguage}">
1798
- <xsl:value-of select="$OrganisationName"/>
1799
- </foaf:name>
1800
- -->
1801
- <xsl:copy-of select="$OrganisationName-FOAF"/>
1802
- </xsl:if>
1803
- <xsl:copy-of select="$Telephone"/>
1804
- <xsl:copy-of select="$Email"/>
1805
- <xsl:copy-of select="$URL"/>
1806
- <xsl:copy-of select="$Address"/>
1807
- <!--
1808
- <xsl:for-each select="gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString">
1809
- <foaf:mbox rdf:resource="mailto:{.}"/>
1810
- </xsl:for-each>
1811
- <xsl:for-each select="gmd:contactInfo/gmd:CI_Contact/gmd:onlineResource/gmd:CI_OnlineResource/gmd:linkage/gmd:URL">
1812
- -->
1813
- <!-- ?? Should another property be used instead? E.g., foaf:homepage? -->
1814
- <!--
1815
- <foaf:workplaceHomepage rdf:resource="{.}"/>
1816
- </xsl:for-each>
1817
- -->
1818
- </xsl:variable>
1819
- <xsl:choose>
1820
- <xsl:when test="$IndividualURI != ''">
1821
- <rdf:Description rdf:about="{$IndividualURI}">
1822
- <xsl:copy-of select="$info"/>
1823
- </rdf:Description>
1824
- </xsl:when>
1825
- <xsl:when test="$OrganisationURI != ''">
1826
- <rdf:Description rdf:about="{$OrganisationURI}">
1827
- <xsl:copy-of select="$info"/>
1828
- </rdf:Description>
1829
- </xsl:when>
1830
- <xsl:otherwise>
1831
- <rdf:Description>
1832
- <xsl:copy-of select="$info"/>
1833
- </rdf:Description>
1834
- </xsl:otherwise>
1835
- </xsl:choose>
1836
- </xsl:param>
1837
-
1838
- <xsl:param name="ResponsibleParty">
1839
- <xsl:variable name="info">
1840
- <xsl:choose>
1841
- <xsl:when test="$IndividualName != ''">
1842
- <rdf:type rdf:resource="{$vcard}Individual"/>
1843
- </xsl:when>
1844
- <xsl:when test="$OrganisationName != ''">
1845
- <rdf:type rdf:resource="{$vcard}Organization"/>
1846
- </xsl:when>
1847
- <xsl:otherwise>
1848
- <rdf:type rdf:resource="{$vcard}Kind"/>
1849
- </xsl:otherwise>
1850
- </xsl:choose>
1851
- <xsl:if test="$IndividualName != ''">
1852
- <!--
1853
- <vcard:fn xml:lang="{$MetadataLanguage}">
1854
- <xsl:value-of select="$IndividualName"/>
1855
- </vcard:fn>
1856
- -->
1857
- <xsl:copy-of select="$IndividualName-vCard"/>
1858
- </xsl:if>
1859
- <xsl:if test="$IndividualName != '' and $OrganisationName != ''">
1860
- <!--
1861
- <vcard:organization-name xml:lang="{$MetadataLanguage}">
1862
- <xsl:value-of select="$OrganisationName"/>
1863
- </vcard:organization-name>
1864
- -->
1865
- <xsl:copy-of select="$OrganisationName-vCard"/>
1866
- </xsl:if>
1867
- <xsl:if test="$IndividualName = '' and $OrganisationName != ''">
1868
- <!--
1869
- <vcard:fn xml:lang="{$MetadataLanguage}">
1870
- <xsl:value-of select="$OrganisationName"/>
1871
- </vcard:fn>
1872
- -->
1873
- <xsl:copy-of select="$OrganisationNameAsIndividualName-vCard"/>
1874
- </xsl:if>
1875
- <xsl:copy-of select="$Telephone-vCard"/>
1876
- <xsl:copy-of select="$Email-vCard"/>
1877
- <xsl:copy-of select="$URL-vCard"/>
1878
- <xsl:copy-of select="$Address-vCard"/>
1879
- <!--
1880
- <xsl:for-each select="gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString">
1881
- <vcard:hasEmail rdf:resource="mailto:{.}"/>
1882
- </xsl:for-each>
1883
- <xsl:for-each select="gmd:contactInfo/gmd:CI_Contact/gmd:onlineResource/gmd:CI_OnlineResource/gmd:linkage/gmd:URL">
1884
- <vcard:hasURL rdf:resource="{.}"/>
1885
- </xsl:for-each>
1886
- -->
1887
- </xsl:variable>
1888
- <xsl:choose>
1889
- <xsl:when test="$IndividualURI != ''">
1890
- <rdf:Description rdf:about="{$IndividualURI}">
1891
- <xsl:copy-of select="$info"/>
1892
- </rdf:Description>
1893
- </xsl:when>
1894
- <xsl:when test="$OrganisationURI != ''">
1895
- <rdf:Description rdf:about="{$OrganisationURI}">
1896
- <xsl:copy-of select="$info"/>
1897
- </rdf:Description>
1898
- </xsl:when>
1899
- <xsl:otherwise>
1900
- <rdf:Description>
1901
- <xsl:copy-of select="$info"/>
1902
- </rdf:Description>
1903
- </xsl:otherwise>
1904
- </xsl:choose>
1905
- </xsl:param>
1906
-
1907
- <xsl:choose>
1908
- <!-- Mapping added for compliance with GeoDCAT-AP 2 -->
1909
- <xsl:when test="$role = 'resourceProvider' and $profile = $extended">
1910
- <geodcatap:resourceProvider>
1911
- <xsl:copy-of select="$ROInfo"/>
1912
- </geodcatap:resourceProvider>
1913
- </xsl:when>
1914
- <!-- Mapping added for compliance with GeoDCAT-AP 2 -->
1915
- <xsl:when test="$role = 'custodian' and $profile = $extended">
1916
- <geodcatap:custodian>
1917
- <xsl:copy-of select="$ROInfo"/>
1918
- </geodcatap:custodian>
1919
- </xsl:when>
1920
- <xsl:when test="$role = 'owner' and $profile = $extended">
1921
- <dct:rightsHolder>
1922
- <xsl:copy-of select="$ROInfo"/>
1923
- </dct:rightsHolder>
1924
- </xsl:when>
1925
- <!-- Mapping added for compliance with GeoDCAT-AP 2 -->
1926
- <xsl:when test="$role = 'user' and $profile = $extended">
1927
- <geodcatap:user>
1928
- <xsl:copy-of select="$ROInfo"/>
1929
- </geodcatap:user>
1930
- </xsl:when>
1931
- <!--
1932
- <xsl:when test="$role = 'user'">
1933
- <prov:wasUsedBy>
1934
- <prov:Activity>
1935
- <prov:wasAssociatedWith>
1936
- <xsl:copy-of select="$ROInfo"/>
1937
- </prov:wasAssociatedWith>
1938
- </prov:Activity>
1939
- </prov:wasUsedBy>
1940
- </xsl:when>
1941
- -->
1942
- <!-- Mapping added for compliance with GeoDCAT-AP 2 -->
1943
- <xsl:when test="$role = 'distributor' and $profile = $extended">
1944
- <geodcatap:distributor>
1945
- <xsl:copy-of select="$ROInfo"/>
1946
- </geodcatap:distributor>
1947
- </xsl:when>
1948
- <!-- Mapping added for compliance with GeoDCAT-AP 2 -->
1949
- <xsl:when test="$role = 'originator' and $profile = $extended">
1950
- <geodcatap:originator>
1951
- <xsl:copy-of select="$ROInfo"/>
1952
- </geodcatap:originator>
1953
- </xsl:when>
1954
- <xsl:when test="$role = 'pointOfContact' and ($ResourceType != 'service' or $profile = $extended)">
1955
- <dcat:contactPoint>
1956
- <xsl:copy-of select="$ResponsibleParty"/>
1957
- </dcat:contactPoint>
1958
- </xsl:when>
1959
- <!--
1960
- <xsl:when test="$role = 'pointOfContact' and $ResourceType != 'service'">
1961
- <dcat:contactPoint>
1962
- <xsl:copy-of select="$ResponsibleParty"/>
1963
- </dcat:contactPoint>
1964
- </xsl:when>
1965
- -->
1966
- <!-- Mapping added for compliance with GeoDCAT-AP 2 -->
1967
- <xsl:when test="$role = 'principalInvestigator' and $profile = $extended">
1968
- <geodcatap:principalInvestigator>
1969
- <xsl:copy-of select="$ROInfo"/>
1970
- </geodcatap:principalInvestigator>
1971
- </xsl:when>
1972
- <!-- Mapping added for compliance with GeoDCAT-AP 2 -->
1973
- <xsl:when test="$role = 'processor' and $profile = $extended">
1974
- <geodcatap:processor>
1975
- <xsl:copy-of select="$ROInfo"/>
1976
- </geodcatap:processor>
1977
- </xsl:when>
1978
- <!--
1979
- <xsl:when test="$role = 'processor'">
1980
- <prov:entityOfInfluence>
1981
- <prov:Derivation>
1982
- <prov:hadActivity>
1983
- <prov:Activity>
1984
- <prov:wasAssociatedWith>
1985
- <xsl:copy-of select="$ROInfo"/>
1986
- </prov:wasAssociatedWith>
1987
- </prov:Activity>
1988
- </prov:hadActivity>
1989
- </prov:Derivation>
1990
- </prov:entityOfInfluence>
1991
- </xsl:when>
1992
- -->
1993
- <xsl:when test="$role = 'publisher' and ($ResourceType != 'service' or $profile = $extended)">
1994
- <dct:publisher>
1995
- <xsl:copy-of select="$ROInfo"/>
1996
- </dct:publisher>
1997
- </xsl:when>
1998
- <!-- Mapping moved to core profile for compliance with DCAT-AP 2 -->
1999
- <xsl:when test="$role = 'author' and ($ResourceType != 'service' or $profile = $extended)">
2000
- <dct:creator>
2001
- <xsl:copy-of select="$ROInfo"/>
2002
- </dct:creator>
2003
- </xsl:when>
2004
- <!--
2005
- <xsl:when test="$role = 'author' and $profile = $extended">
2006
- <dct:creator>
2007
- <xsl:copy-of select="$ROInfo"/>
2008
- </dct:creator>
2009
- </xsl:when>
2010
- -->
2011
- </xsl:choose>
2012
- <!-- Mapping moved to core profile for compliance with DCAT-AP 2 -->
2013
- <xsl:if test="($ResourceType != 'service' and $role != 'pointOfContact' and $role != 'publisher' and $role != 'author') or $profile = $extended">
2014
- <prov:qualifiedAttribution>
2015
- <prov:Attribution>
2016
- <prov:agent>
2017
- <!--
2018
- <xsl:copy-of select="$ResponsibleParty"/>
2019
- -->
2020
- <xsl:copy-of select="$ROInfo"/>
2021
- </prov:agent>
2022
- <!-- DEPRECATED: Mapping kept for backward compatibility with GeoDCAT-AP v1.* -->
2023
- <xsl:if test="$profile = $extended">
2024
- <xsl:if test="$include-deprecated = 'yes'">
2025
- <dct:type rdf:resource="{$ResponsiblePartyRole}"/>
2026
- </xsl:if>
2027
- </xsl:if>
2028
- <!-- Mapping added for compliance with DCAT-AP 2 -->
2029
- <dcat:hadRole>
2030
- <dcat:Role rdf:about="{$ResponsiblePartyRole}"/>
2031
- </dcat:hadRole>
2032
- </prov:Attribution>
2033
- </prov:qualifiedAttribution>
2034
- </xsl:if>
2035
-
2036
- </xsl:template>
2037
-
2038
- <!-- Metadata point of contact -->
2039
- <!--
2040
- <xsl:template name="MetadataPointOfContact" match="gmd:contact/gmd:CI_ResponsibleParty">
2041
- <xsl:param name="MetadataLanguage"/>
2042
- <xsl:param name="ResponsiblePartyRole">
2043
- <xsl:value-of select="concat($ResponsiblePartyRoleCodelistUri,'/','pointOfContact')"/>
2044
- </xsl:param>
2045
- <xsl:param name="OrganisationName">
2046
- <xsl:value-of select="gmd:organisationName/gco:CharacterString"/>
2047
- </xsl:param>
2048
- <xsl:param name="ResponsibleParty">
2049
- <vcard:Kind>
2050
- <vcard:organization-name xml:lang="{$MetadataLanguage}">
2051
- <xsl:value-of select="$OrganisationName"/>
2052
- </vcard:organization-name>
2053
- <xsl:for-each select="gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString">
2054
- <vcard:hasEmail rdf:resource="mailto:{.}"/>
2055
- </xsl:for-each>
2056
- </vcard:Kind>
2057
- </xsl:param>
2058
- <dcat:contactPoint>
2059
- <xsl:copy-of select="$ResponsibleParty"/>
2060
- </dcat:contactPoint>
2061
- <xsl:if test="$profile = $extended">
2062
- <prov:qualifiedAttribution>
2063
- <prov:Attribution>
2064
- <prov:agent>
2065
- <xsl:copy-of select="$ResponsibleParty"/>
2066
- </prov:agent>
2067
- <dct:type rdf:resource="{$ResponsiblePartyRole}"/>
2068
- </prov:Attribution>
2069
- </prov:qualifiedAttribution>
2070
- </xsl:if>
2071
- </xsl:template>
2072
- -->
2073
- <!-- Resource locator -->
2074
- <!-- Old version, applied to the resource (not to the resource distribution)
2075
- <xsl:template name="ResourceLocator" match="gmd:distributionInfo/*/gmd:transferOptions/*/gmd:onLine/*/gmd:linkage">
2076
- <xsl:param name="ResourceType"/>
2077
- <xsl:choose>
2078
- <xsl:when test="$ResourceType = 'dataset' or $ResourceType = 'series'">
2079
- <dcat:landingPage rdf:resource="{gmd:URL}"/>
2080
- </xsl:when>
2081
- <xsl:when test="$ResourceType = 'service'">
2082
- <foaf:homepage rdf:resource="{gmd:URL}"/>
2083
- </xsl:when>
2084
- </xsl:choose>
2085
- </xsl:template>
2086
- -->
2087
- <xsl:template name="ResourceLocator" match="gmd:transferOptions/*/gmd:onLine/*/gmd:linkage">
2088
- <xsl:param name="MetadataLanguage"/>
2089
- <xsl:param name="ResourceType"/>
2090
- <xsl:choose>
2091
- <xsl:when test="$ResourceType = 'dataset' or $ResourceType = 'series'">
2092
- <dct:title xml:lang="{$MetadataLanguage}">
2093
- <xsl:value-of select="../gmd:description/gco:CharacterString"/>
2094
- </dct:title>
2095
- <dcat:accessURL rdf:resource="{gmd:URL}"/>
2096
- </xsl:when>
2097
- <!--
2098
- <xsl:when test="$ResourceType = 'service'">
2099
- <foaf:homepage rdf:resource="{gmd:URL}"/>
2100
- </xsl:when>
2101
- -->
2102
- </xsl:choose>
2103
- </xsl:template>
2104
-
2105
- <!-- Coupled resource -->
2106
-
2107
- <xsl:template name="CoupledResource" match="gmd:identificationInfo[1]/*/srv:operatesOn">
2108
- <xsl:param name="href" select="@xlink:href"/>
2109
- <xsl:param name="code">
2110
- <xsl:choose>
2111
- <xsl:when test="$CoupledResourceLookUp = 'enabled' and $href != '' and (starts-with($href, 'http://') or starts-with($href, 'https://'))">
2112
- <xsl:value-of select="document($href)//gmd:identificationInfo/*/gmd:citation/*/gmd:identifier/*/gmd:code/gco:CharacterString"/>
2113
- </xsl:when>
2114
- <xsl:when test="*/gmd:citation/*/gmd:identifier/*/gmd:code/gco:CharacterString != ''">
2115
- <xsl:value-of select="*/gmd:citation/*/gmd:identifier/*/gmd:code/gco:CharacterString"/>
2116
- </xsl:when>
2117
- <xsl:when test="@uuidref != ''">
2118
- <xsl:value-of select="@uuidref"/>
2119
- </xsl:when>
2120
- </xsl:choose>
2121
- </xsl:param>
2122
- <xsl:param name="codespace">
2123
- <xsl:choose>
2124
- <xsl:when test="$CoupledResourceLookUp = 'enabled' and $href != '' and (starts-with($href, 'http://') or starts-with($href, 'https://'))">
2125
- <xsl:value-of select="document($href)//gmd:identificationInfo/*/gmd:citation/*/gmd:identifier/*/gmd:codeSpace/gco:CharacterString"/>
2126
- </xsl:when>
2127
- <xsl:when test="*/gmd:citation/*/gmd:identifier/*/gmd:codeSpace/gco:CharacterString != ''">
2128
- <xsl:value-of select="*/gmd:citation/*/gmd:identifier/*/gmd:codeSpace/gco:CharacterString"/>
2129
- </xsl:when>
2130
- </xsl:choose>
2131
- </xsl:param>
2132
- <xsl:param name="resID" select="concat($codespace, $code)"/>
2133
- <xsl:param name="uriref" select="@uriref"/>
2134
- <xsl:choose>
2135
- <!-- The use of @uriref is still under discussion by the INSPIRE MIG. -->
2136
- <xsl:when test="$uriref != ''">
2137
- <!-- DEPRECATED: Mapping kept for backward compatibility with GeoDCAT-AP v1.* -->
2138
- <xsl:if test="$profile = $extended">
2139
- <xsl:if test="$include-deprecated = 'yes'">
2140
- <dct:hasPart>
2141
- <dcat:Dataset rdf:about="{@uriref}"/>
2142
- </dct:hasPart>
2143
- </xsl:if>
2144
- </xsl:if>
2145
- <!-- Mapping added for compliance with DCAT-AP 2 -->
2146
- <dcat:servesDataset>
2147
- <dcat:Dataset rdf:about="{@uriref}"/>
2148
- </dcat:servesDataset>
2149
- </xsl:when>
2150
- <xsl:when test="$code != ''">
2151
- <xsl:choose>
2152
- <xsl:when test="starts-with($code, 'http://') or starts-with($code, 'https://')">
2153
- <!-- DEPRECATED: Mapping kept for backward compatibility with GeoDCAT-AP v1.* -->
2154
- <xsl:if test="$profile = $extended">
2155
- <xsl:if test="$include-deprecated = 'yes'">
2156
- <dct:hasPart>
2157
- <dcat:Dataset rdf:about="{$code}"/>
2158
- </dct:hasPart>
2159
- </xsl:if>
2160
- </xsl:if>
2161
- <!-- Mapping added for compliance with DCAT-AP 2 -->
2162
- <dcat:servesDataset>
2163
- <dcat:Dataset rdf:about="{$code}"/>
2164
- </dcat:servesDataset>
2165
- </xsl:when>
2166
- <xsl:otherwise>
2167
- <!-- DEPRECATED: Mapping kept for backward compatibility with GeoDCAT-AP v1.* -->
2168
- <xsl:if test="$profile = $extended">
2169
- <xsl:if test="$include-deprecated = 'yes'">
2170
- <dct:hasPart rdf:parseType="Resource">
2171
- <rdf:type rdf:resource="{$dcat}Dataset"/>
2172
- <xsl:choose>
2173
- <xsl:when test="starts-with($resID, 'http://') or starts-with($resID, 'https://')">
2174
- <dct:identifier rdf:datatype="{$xsd}anyURI"><xsl:value-of select="$resID"/></dct:identifier>
2175
- </xsl:when>
2176
- <xsl:otherwise>
2177
- <dct:identifier rdf:datatype="{$xsd}string"><xsl:value-of select="$resID"/></dct:identifier>
2178
- </xsl:otherwise>
2179
- </xsl:choose>
2180
- <xsl:if test="$href != '' and $href != '' and (starts-with($href, 'http://') or starts-with($href, 'https://'))">
2181
- <foaf:isPrimaryTopicOf>
2182
- <dcat:CatalogRecord rdf:about="{$href}"/>
2183
- </foaf:isPrimaryTopicOf>
2184
- </xsl:if>
2185
- </dct:hasPart>
2186
- </xsl:if>
2187
- </xsl:if>
2188
- <!-- Mapping added for compliance with DCAT-AP 2 -->
2189
- <dcat:servesDataset rdf:parseType="Resource">
2190
- <rdf:type rdf:resource="{$dcat}Dataset"/>
2191
- <xsl:choose>
2192
- <xsl:when test="starts-with($resID, 'http://') or starts-with($resID, 'https://')">
2193
- <dct:identifier rdf:datatype="{$xsd}anyURI"><xsl:value-of select="$resID"/></dct:identifier>
2194
- </xsl:when>
2195
- <xsl:otherwise>
2196
- <dct:identifier rdf:datatype="{$xsd}string"><xsl:value-of select="$resID"/></dct:identifier>
2197
- </xsl:otherwise>
2198
- </xsl:choose>
2199
- <xsl:if test="$href != '' and $href != '' and (starts-with($href, 'http://') or starts-with($href, 'https://'))">
2200
- <foaf:isPrimaryTopicOf>
2201
- <dcat:CatalogRecord rdf:about="{$href}"/>
2202
- </foaf:isPrimaryTopicOf>
2203
- </xsl:if>
2204
- </dcat:servesDataset>
2205
- </xsl:otherwise>
2206
- </xsl:choose>
2207
- </xsl:when>
2208
- </xsl:choose>
2209
- </xsl:template>
2210
-
2211
- <!-- Spatial data service type -->
2212
- <!-- Replaced by param $ServiceType -->
2213
- <!--
2214
- <xsl:template match="gmd:identificationInfo/*/srv:serviceType">
2215
- <dct:type rdf:resource="{$SpatialDataServiceTypeCodelistUri}/{gco:LocalName}"/>
2216
- </xsl:template>
2217
- -->
2218
- <!-- Conformity -->
2219
- <xsl:template name="Conformity" match="gmd:dataQualityInfo/*/gmd:report/*/gmd:result/*/gmd:specification/gmd:CI_Citation">
2220
- <xsl:param name="ResourceUri"/>
2221
- <xsl:param name="MetadataLanguage"/>
2222
- <xsl:param name="Conformity"/>
2223
-
2224
- <xsl:variable name="specUri" select="normalize-space(gmd:title/gmx:Anchor/@xlink:href)"/>
2225
- <xsl:variable name="specTitle">
2226
- <xsl:for-each select="gmd:title">
2227
- <!--
2228
- <dct:title xml:lang="{$MetadataLanguage}"><xsl:value-of select="normalize-space(gco:CharacterString)"/></dct:title>
2229
- -->
2230
- <dct:title xml:lang="{$MetadataLanguage}">
2231
- <xsl:value-of select="normalize-space(*[self::gco:CharacterString|self::gmx:Anchor])"/>
2232
- </dct:title>
2233
- <xsl:call-template name="LocalisedString">
2234
- <xsl:with-param name="term">dct:title</xsl:with-param>
2235
- </xsl:call-template>
2236
- </xsl:for-each>
2237
- </xsl:variable>
2238
- <xsl:variable name="specinfo">
2239
- <!--
2240
- <dct:title xml:lang="{$MetadataLanguage}">
2241
- <xsl:value-of select="gmd:title/gco:CharacterString"/>
2242
- </dct:title>
2243
- -->
2244
- <xsl:copy-of select="$specTitle"/>
2245
- <xsl:apply-templates select="gmd:date/gmd:CI_Date"/>
2246
- </xsl:variable>
2247
- <!--
2248
- <xsl:variable name="specinfo">
2249
- <dct:title xml:lang="{$MetadataLanguage}">
2250
- <xsl:value-of select="gmd:title/gco:CharacterString"/>
2251
- </dct:title>
2252
- <xsl:apply-templates select="gmd:date/gmd:CI_Date"/>
2253
- </xsl:variable>
2254
- -->
2255
- <!--
2256
- <xsl:variable name="degree">
2257
- <xsl:choose>
2258
- <xsl:when test="../../gmd:pass/gco:Boolean = 'true'">
2259
- <xsl:value-of select="concat($DegreeOfConformityCodelistUri,'/conformant')"/>
2260
- </xsl:when>
2261
- <xsl:when test="../../gmd:pass/gco:Boolean = 'false'">
2262
- <xsl:value-of select="concat($DegreeOfConformityCodelistUri,'/notConformant')"/>
2263
- </xsl:when>
2264
- <xsl:otherwise>
2265
-
2266
- <xsl:when test="../../gmd:pass/gco:Boolean = ''">
2267
-
2268
- <xsl:value-of select="concat($DegreeOfConformityCodelistUri,'/notEvaluated')"/>
2269
-
2270
- </xsl:when>
2271
-
2272
- </xsl:otherwise>
2273
- </xsl:choose>
2274
- </xsl:variable>
2275
- -->
2276
- <xsl:if test="../../gmd:pass/gco:Boolean = 'true'">
2277
- <xsl:choose>
2278
- <xsl:when test="$specUri != ''">
2279
- <dct:conformsTo>
2280
- <dct:Standard rdf:about="{$specUri}"/>
2281
- </dct:conformsTo>
2282
- <!--
2283
- <dct:conformsTo>
2284
- <rdf:Description rdf:about="{$specUri}">
2285
- <xsl:copy-of select="$specinfo"/>
2286
- </rdf:Description>
2287
- </dct:conformsTo>
2288
- -->
2289
- </xsl:when>
2290
- <xsl:when test="../@xlink:href and ../@xlink:href != ''">
2291
- <dct:conformsTo>
2292
- <dct:Standard rdf:about="{../@xlink:href}"/>
2293
- </dct:conformsTo>
2294
- <!--
2295
- <dct:conformsTo>
2296
- <rdf:Description rdf:about="{../@xlink:href}">
2297
- <xsl:copy-of select="$specinfo"/>
2298
- </rdf:Description>
2299
- </dct:conformsTo>
2300
- -->
2301
- </xsl:when>
2302
- <xsl:otherwise>
2303
- <dct:conformsTo rdf:parseType="Resource">
2304
- <rdf:type rdf:resource="{$dct}Standard"/>
2305
- <xsl:copy-of select="$specinfo"/>
2306
- </dct:conformsTo>
2307
- </xsl:otherwise>
2308
- </xsl:choose>
2309
- </xsl:if>
2310
- <!-- Mapping moved to core profile for compliance with DCAT-AP 2 -->
2311
- <!--
2312
- <xsl:if test="$profile = $extended">
2313
- -->
2314
- <!--
2315
- <xsl:if test="$Conformity != '' and $ResourceUri = ''">
2316
- -->
2317
- <xsl:copy-of select="$Conformity"/>
2318
- <!--
2319
- </xsl:if>
2320
- -->
2321
- <!--
2322
- <xsl:choose>
2323
- <xsl:when test="../@xlink:href and ../@xlink:href != ''">
2324
- <wdrs:describedby>
2325
- <earl:Assertion>
2326
- <earl:test>
2327
- <rdf:Description rdf:about="{../@xlink:href}">
2328
- <xsl:copy-of select="$specinfo"/>
2329
- </rdf:Description>
2330
- </earl:test>
2331
- <earl:result>
2332
- <earl:TestResult>
2333
- <earl:outcome rdf:resource="{$degree}"/>
2334
- </earl:TestResult>
2335
- </earl:result>
2336
- </earl:Assertion>
2337
- </wdrs:describedby>
2338
- </xsl:when>
2339
- <xsl:otherwise>
2340
- <wdrs:describedby>
2341
- <earl:Assertion>
2342
- <earl:test rdf:parseType="Resource">
2343
- <xsl:copy-of select="$specinfo"/>
2344
- </earl:test>
2345
- <earl:result>
2346
- <earl:TestResult>
2347
- <earl:outcome rdf:resource="{$degree}"/>
2348
- </earl:TestResult>
2349
- </earl:result>
2350
- </earl:Assertion>
2351
- </wdrs:describedby>
2352
- </xsl:otherwise>
2353
- </xsl:choose>
2354
- -->
2355
- <!--
2356
- </xsl:if>
2357
- -->
2358
- </xsl:template>
2359
-
2360
- <!-- Geographic extent -->
2361
-
2362
- <xsl:template name="GeographicExtent" match="gmd:identificationInfo[1]/*/*[self::gmd:extent|self::srv:extent]/*/gmd:geographicElement">
2363
- <xsl:param name="MetadataLanguage"/>
2364
- <!--
2365
-
2366
- <xsl:otherwise>
2367
- <dct:spatial>
2368
- <dct:Location>
2369
- <xsl:for-each select="gmd:description">
2370
- <rdfs:label xml:lang="{$MetadataLanguage}"><xsl:value-of select="gco:CharacterString"/></rdfs:label>
2371
- </xsl:for-each>
2372
- -->
2373
- <xsl:apply-templates select="gmd:EX_GeographicDescription/gmd:geographicIdentifier/*">
2374
- <xsl:with-param name="MetadataLanguage" select="$MetadataLanguage"/>
2375
- </xsl:apply-templates>
2376
- <xsl:apply-templates select="gmd:EX_GeographicBoundingBox"/>
2377
- <!--
2378
- </dct:Location>
2379
- </dct:spatial>
2380
- </xsl:otherwise>
2381
- </xsl:choose>
2382
- -->
2383
- </xsl:template>
2384
-
2385
- <!-- Geographic identifier -->
2386
-
2387
- <xsl:template name="GeographicIdentifier" match="gmd:EX_GeographicDescription/gmd:geographicIdentifier/*">
2388
- <xsl:param name="MetadataLanguage"/>
2389
- <!--
2390
- <xsl:param name="GeoCode" select="gmd:code/*[self::gco:CharacterString|self::gmx:Anchor/@xlink:href]"/>
2391
- <xsl:param name="GeoURI" select="gmd:code/gmx:Anchor/@xlink:href"/>
2392
- -->
2393
- <xsl:param name="GeoCode">
2394
- <xsl:choose>
2395
- <xsl:when test="gmd:code/gco:CharacterString">
2396
- <xsl:value-of select="gmd:code/gco:CharacterString"/>
2397
- </xsl:when>
2398
- <xsl:when test="gmd:code/gmx:Anchor">
2399
- <xsl:value-of select="gmd:code/gmx:Anchor/@xlink:href"/>
2400
- </xsl:when>
2401
- </xsl:choose>
2402
- </xsl:param>
2403
-
2404
- <xsl:param name="GeoURI">
2405
- <xsl:if test="starts-with($GeoCode,'http://') or starts-with($GeoCode,'https://')">
2406
- <xsl:value-of select="$GeoCode"/>
2407
- </xsl:if>
2408
- </xsl:param>
2409
- <xsl:param name="GeoURN">
2410
- <xsl:if test="starts-with($GeoCode,'urn:')">
2411
- <xsl:value-of select="$GeoCode"/>
2412
- </xsl:if>
2413
- </xsl:param>
2414
-
2415
- <xsl:choose>
2416
- <xsl:when test="$GeoURI != ''">
2417
- <!--
2418
- <xsl:choose>
2419
- <xsl:when test="gmd:EX_GeographicBoundingBox">
2420
- <dct:spatial>
2421
- <dct:Location rdf:about="{$GeoURI}">
2422
- <xsl:if test="$GeoCode != ''">
2423
- <rdfs:label xml:lang="{$MetadataLanguage}"><xsl:value-of select="$GeoCode"/></rdfs:label>
2424
- </xsl:if>
2425
- <xsl:apply-templates select="gmd:EX_GeographicBoundingBox"/>
2426
- </dct:Location>
2427
- </dct:spatial>
2428
- </xsl:when>
2429
- <xsl:otherwise>
2430
- -->
2431
- <dct:spatial>
2432
- <dct:Location rdf:about="{$GeoURI}"/>
2433
- </dct:spatial>
2434
- <!--
2435
- </xsl:otherwise>
2436
- </xsl:choose>
2437
- -->
2438
- </xsl:when>
2439
- <xsl:when test="$GeoCode != ''">
2440
- <dct:spatial rdf:parseType="Resource">
2441
- <rdf:type rdf:resource="{$dct}Location"/>
2442
- <!--
2443
- <rdfs:seeAlso rdf:parseType="Resource">
2444
- -->
2445
- <xsl:choose>
2446
- <xsl:when test="$GeoURN != ''">
2447
- <dct:identifier rdf:datatype="{$xsd}anyURI"><xsl:value-of select="$GeoURN"/></dct:identifier>
2448
- </xsl:when>
2449
- <xsl:otherwise>
2450
- <skos:prefLabel xml:lang="{$MetadataLanguage}">
2451
- <xsl:value-of select="$GeoCode"/>
2452
- </skos:prefLabel>
2453
- </xsl:otherwise>
2454
- </xsl:choose>
2455
- <xsl:for-each select="gmd:authority/gmd:CI_Citation">
2456
- <skos:inScheme>
2457
- <skos:ConceptScheme>
2458
- <dct:title xml:lang="{$MetadataLanguage}">
2459
- <xsl:value-of select="gmd:title/*[self::gco:CharacterString|self::gmx:Anchor]"/>
2460
- </dct:title>
2461
- <xsl:apply-templates select="gmd:date/gmd:CI_Date"/>
2462
- </skos:ConceptScheme>
2463
- </skos:inScheme>
2464
- </xsl:for-each>
2465
- <!--
2466
- </rdfs:seeAlso>
2467
- -->
2468
- </dct:spatial>
2469
- </xsl:when>
2470
- </xsl:choose>
2471
- </xsl:template>
2472
-
2473
- <!-- Geographic bounding box -->
2474
-
2475
- <!--
2476
- <xsl:template name="GeographicBoundingBox" match="gmd:identificationInfo[1]/*/*[self::gmd:extent|self::srv:extent]/*/gmd:geographicElement/gmd:EX_GeographicBoundingBox">
2477
- -->
2478
- <xsl:template name="GeographicBoundingBox" match="gmd:EX_GeographicBoundingBox">
2479
- <xsl:param name="north" select="gmd:northBoundLatitude/gco:Decimal"/>
2480
- <xsl:param name="east" select="gmd:eastBoundLongitude/gco:Decimal"/>
2481
- <xsl:param name="south" select="gmd:southBoundLatitude/gco:Decimal"/>
2482
- <xsl:param name="west" select="gmd:westBoundLongitude/gco:Decimal"/>
2483
-
2484
- <!-- Bbox as a dct:Box -->
2485
- <!-- Need to check whether this is correct - in particular, the "projection" parameter -->
2486
- <!--
2487
- <xsl:param name="DCTBox">northlimit=<xsl:value-of select="$north"/>; eastlimit=<xsl:value-of select="$east"/>; southlimit=<xsl:value-of select="$south"/>; westlimit=<xsl:value-of select="$west"/>; projection=EPSG:<xsl:value-of select="$srid"/></xsl:param>
2488
- -->
2489
-
2490
- <!-- Bbox as GML (GeoSPARQL) -->
2491
-
2492
- <xsl:param name="GMLLiteral">
2493
- <xsl:choose>
2494
- <xsl:when test="$SrsUri = $Crs84Uri">&lt;gml:Envelope srsName="<xsl:value-of select="$SrsUri"/>"&gt;&lt;gml:lowerCorner&gt;<xsl:value-of select="$west"/><xsl:text> </xsl:text><xsl:value-of select="$south"/>&lt;/gml:lowerCorner&gt;&lt;gml:upperCorner&gt;<xsl:value-of select="$east"/><xsl:text> </xsl:text><xsl:value-of select="$north"/>&lt;/gml:upperCorner&gt;&lt;/gml:Envelope&gt;</xsl:when>
2495
- <xsl:when test="$SrsAxisOrder = 'LonLat'">&lt;gml:Envelope srsName="<xsl:value-of select="$SrsUri"/>"&gt;&lt;gml:lowerCorner&gt;<xsl:value-of select="$west"/><xsl:text> </xsl:text><xsl:value-of select="$south"/>&lt;/gml:lowerCorner&gt;&lt;gml:upperCorner&gt;<xsl:value-of select="$east"/><xsl:text> </xsl:text><xsl:value-of select="$north"/>&lt;/gml:upperCorner&gt;&lt;/gml:Envelope&gt;</xsl:when>
2496
- <xsl:when test="$SrsAxisOrder = 'LatLon'">&lt;gml:Envelope srsName="<xsl:value-of select="$SrsUri"/>"&gt;&lt;gml:lowerCorner&gt;<xsl:value-of select="$south"/><xsl:text> </xsl:text><xsl:value-of select="$west"/>&lt;/gml:lowerCorner&gt;&lt;gml:upperCorner&gt;<xsl:value-of select="$north"/><xsl:text> </xsl:text><xsl:value-of select="$east"/>&lt;/gml:upperCorner&gt;&lt;/gml:Envelope&gt;</xsl:when>
2497
- </xsl:choose>
2498
- </xsl:param>
2499
-
2500
- <!-- Bbox as WKT (GeoSPARQL) -->
2501
-
2502
- <xsl:param name="WKTLiteral">
2503
- <xsl:choose>
2504
- <xsl:when test="$SrsUri = $Crs84Uri">POLYGON((<xsl:value-of select="$west"/><xsl:text> </xsl:text><xsl:value-of select="$north"/>,<xsl:value-of select="$east"/><xsl:text> </xsl:text><xsl:value-of select="$north"/>,<xsl:value-of select="$east"/><xsl:text> </xsl:text><xsl:value-of select="$south"/>,<xsl:value-of select="$west"/><xsl:text> </xsl:text><xsl:value-of select="$south"/>,<xsl:value-of select="$west"/><xsl:text> </xsl:text><xsl:value-of select="$north"/>))</xsl:when>
2505
- <xsl:when test="$SrsAxisOrder = 'LonLat'">&lt;<xsl:value-of select="$SrsUri"/>&gt; POLYGON((<xsl:value-of select="$west"/><xsl:text> </xsl:text><xsl:value-of select="$north"/>,<xsl:value-of select="$east"/><xsl:text> </xsl:text><xsl:value-of select="$north"/>,<xsl:value-of select="$east"/><xsl:text> </xsl:text><xsl:value-of select="$south"/>,<xsl:value-of select="$west"/><xsl:text> </xsl:text><xsl:value-of select="$south"/>,<xsl:value-of select="$west"/><xsl:text> </xsl:text><xsl:value-of select="$north"/>))</xsl:when>
2506
- <xsl:when test="$SrsAxisOrder = 'LatLon'">&lt;<xsl:value-of select="$SrsUri"/>&gt; POLYGON((<xsl:value-of select="$north"/><xsl:text> </xsl:text><xsl:value-of select="$west"/>,<xsl:value-of select="$north"/><xsl:text> </xsl:text><xsl:value-of select="$east"/>,<xsl:value-of select="$south"/><xsl:text> </xsl:text><xsl:value-of select="$east"/>,<xsl:value-of select="$south"/><xsl:text> </xsl:text><xsl:value-of select="$west"/>,<xsl:value-of select="$north"/><xsl:text> </xsl:text><xsl:value-of select="$west"/>))</xsl:when>
2507
- </xsl:choose>
2508
- </xsl:param>
2509
-
2510
- <!-- Bbox as GeoJSON -->
2511
-
2512
- <!-- Revised to ensure compliance with RFC 7946 -->
2513
- <xsl:param name="GeoJSONLiteral">
2514
- <xsl:choose>
2515
- <!-- GeoJSON compliant with RFC 7946 -->
2516
- <xsl:when test="$SrsUri = $Crs84Uri">{"type":"Polygon","coordinates":[[[<xsl:value-of select="$west"/><xsl:text>,</xsl:text><xsl:value-of select="$north"/>],[<xsl:value-of select="$east"/><xsl:text>,</xsl:text><xsl:value-of select="$north"/>],[<xsl:value-of select="$east"/><xsl:text>,</xsl:text><xsl:value-of select="$south"/>],[<xsl:value-of select="$west"/><xsl:text>,</xsl:text><xsl:value-of select="$south"/>],[<xsl:value-of select="$west"/><xsl:text>,</xsl:text><xsl:value-of select="$north"/>]]]}</xsl:when>
2517
- <!-- GeoJSON compliant with original specification, where CRSs different from CRS84 were supported -->
2518
- <xsl:otherwise>{"type":"Polygon","crs":{"type":"name","properties":{"name":"<xsl:value-of select="$SrsUrn"/>"}},"coordinates":[[[<xsl:value-of select="$west"/><xsl:text>,</xsl:text><xsl:value-of select="$north"/>],[<xsl:value-of select="$east"/><xsl:text>,</xsl:text><xsl:value-of select="$north"/>],[<xsl:value-of select="$east"/><xsl:text>,</xsl:text><xsl:value-of select="$south"/>],[<xsl:value-of select="$west"/><xsl:text>,</xsl:text><xsl:value-of select="$south"/>],[<xsl:value-of select="$west"/><xsl:text>,</xsl:text><xsl:value-of select="$north"/>]]]}</xsl:otherwise>
2519
- </xsl:choose>
2520
- </xsl:param>
2521
-
2522
- <dct:spatial rdf:parseType="Resource">
2523
- <rdf:type rdf:resource="{$dct}Location"/>
2524
- <!-- DEPRECATED: Mapping kept for backward compatibility with GeoDCAT-AP v1.* -->
2525
- <xsl:if test="$include-deprecated = 'yes'">
2526
- <!-- Recommended geometry encodings -->
2527
- <locn:geometry rdf:datatype="{$gsp}wktLiteral"><xsl:value-of select="$WKTLiteral"/></locn:geometry>
2528
- <locn:geometry rdf:datatype="{$gsp}gmlLiteral"><xsl:value-of select="$GMLLiteral"/></locn:geometry>
2529
- <!-- Additional geometry encodings -->
2530
- <!-- DEPRECATED: Mapping kept for backward compatibility with GeoDCAT-AP v1.* -->
2531
- <locn:geometry rdf:datatype="{$geojsonMediaTypeUri}"><xsl:value-of select="$GeoJSONLiteral"/></locn:geometry>
2532
- <!-- Mapping added for compliance with GeoDCAT-AP 2 -->
2533
- <locn:geometry rdf:datatype="{$gsp}geoJSONLiteral"><xsl:value-of select="$GeoJSONLiteral"/></locn:geometry>
2534
- <!--
2535
- <locn:geometry rdf:datatype="{$dct}Box"><xsl:value-of select="$DCTBox"/></locn:geometry>
2536
- -->
2537
- </xsl:if>
2538
- <!-- Mapping added for compliance with DCAT-AP 2 -->
2539
- <!-- Recommended geometry encodings -->
2540
- <dcat:bbox rdf:datatype="{$gsp}wktLiteral"><xsl:value-of select="$WKTLiteral"/></dcat:bbox>
2541
- <dcat:bbox rdf:datatype="{$gsp}gmlLiteral"><xsl:value-of select="$GMLLiteral"/></dcat:bbox>
2542
- <!-- Additional geometry encodings -->
2543
- <!-- DEPRECATED: Mapping kept for backward compatibility with GeoDCAT-AP v1.* -->
2544
- <xsl:if test="$include-deprecated = 'yes'">
2545
- <dcat:bbox rdf:datatype="{$geojsonMediaTypeUri}"><xsl:value-of select="$GeoJSONLiteral"/></dcat:bbox>
2546
- </xsl:if>
2547
- <!-- Mapping added for compliance with GeoDCAT-AP 2 -->
2548
- <dcat:bbox rdf:datatype="{$gsp}geoJSONLiteral"><xsl:value-of select="$GeoJSONLiteral"/></dcat:bbox>
2549
- </dct:spatial>
2550
-
2551
- </xsl:template>
2552
-
2553
- <!-- Temporal extent -->
2554
-
2555
- <xsl:template name="TemporalExtent" match="gmd:identificationInfo/*/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent">
2556
- <!--
2557
- <xsl:for-each select="gmd:extent/gml:TimeInstant|gmd:extent/gml:TimePeriod">
2558
- <xsl:if test="local-name(.) = 'TimeInstant' or ( local-name(.) = 'TimePeriod' and gml:beginPosition and gml:endPosition )">
2559
- -->
2560
- <xsl:for-each select="gmd:extent/*[local-name() = 'TimeInstant']|gmd:extent/*[local-name() = 'TimePeriod']">
2561
- <xsl:if test="local-name(.) = 'TimeInstant' or ( local-name(.) = 'TimePeriod' and *[local-name() = 'beginPosition'] and *[local-name() = 'endPosition'] )">
2562
- <!--
2563
- <xsl:variable name="dctperiod">
2564
- <xsl:choose>
2565
- <xsl:when test="local-name(.) = 'TimeInstant'">start=<xsl:value-of select="gml:timePosition"/>; end=<xsl:value-of select="gml:timePosition"/></xsl:when>
2566
- <xsl:otherwise>start=<xsl:value-of select="gml:beginPosition"/>; end=<xsl:value-of select="gml:endPosition"/></xsl:otherwise>
2567
- </xsl:choose>
2568
- </xsl:variable>
2569
- -->
2570
- <xsl:variable name="dateStart">
2571
- <xsl:choose>
2572
- <!--
2573
- <xsl:when test="local-name(.) = 'TimeInstant'"><xsl:value-of select="gml:timePosition"/></xsl:when>
2574
- <xsl:otherwise><xsl:value-of select="gml:beginPosition"/></xsl:otherwise>
2575
- -->
2576
- <xsl:when test="local-name(.) = 'TimeInstant'"><xsl:value-of select="normalize-space(*[local-name() = 'timePosition'])"/></xsl:when>
2577
- <xsl:otherwise><xsl:value-of select="normalize-space(*[local-name() = 'beginPosition'])"/></xsl:otherwise>
2578
- </xsl:choose>
2579
- </xsl:variable>
2580
- <xsl:variable name="dateStart-data-type">
2581
- <xsl:call-template name="DateDataType">
2582
- <xsl:with-param name="date" select="$dateStart"/>
2583
- </xsl:call-template>
2584
- </xsl:variable>
2585
- <xsl:variable name="dateEnd">
2586
- <xsl:choose>
2587
- <!--
2588
- <xsl:when test="local-name(.) = 'TimeInstant'"><xsl:value-of select="gml:timePosition"/></xsl:when>
2589
- <xsl:otherwise><xsl:value-of select="gml:endPosition"/></xsl:otherwise>
2590
- -->
2591
- <xsl:when test="local-name(.) = 'TimeInstant'"><xsl:value-of select="normalize-space(*[local-name() = 'timePosition'])"/></xsl:when>
2592
- <xsl:otherwise><xsl:value-of select="normalize-space(*[local-name() = 'endPosition'])"/></xsl:otherwise>
2593
- </xsl:choose>
2594
- </xsl:variable>
2595
- <xsl:variable name="dateEnd-data-type">
2596
- <xsl:call-template name="DateDataType">
2597
- <xsl:with-param name="date" select="$dateEnd"/>
2598
- </xsl:call-template>
2599
- </xsl:variable>
2600
- <xsl:if test="$dateStart != '' or $dateEnd != ''">
2601
- <dct:temporal>
2602
- <dct:PeriodOfTime>
2603
- <!-- DEPRECATED: Mapping kept for backward compatibility with GeoDCAT-AP v1.* -->
2604
- <xsl:if test="$include-deprecated = 'yes'">
2605
- <xsl:if test="$dateStart != ''">
2606
- <schema:startDate rdf:datatype="{$xsd}{$dateStart-data-type}"><xsl:value-of select="$dateStart"/></schema:startDate>
2607
- </xsl:if>
2608
- <xsl:if test="$dateEnd != ''">
2609
- <schema:endDate rdf:datatype="{$xsd}{$dateStart-data-type}"><xsl:value-of select="$dateEnd"/></schema:endDate>
2610
- </xsl:if>
2611
- </xsl:if>
2612
- <!-- Mapping added for compliance with DCAT-AP 2 -->
2613
- <xsl:if test="$dateStart != ''">
2614
- <dcat:startDate rdf:datatype="{$xsd}{$dateEnd-data-type}"><xsl:value-of select="$dateStart"/></dcat:startDate>
2615
- </xsl:if>
2616
- <xsl:if test="$dateEnd != ''">
2617
- <dcat:endDate rdf:datatype="{$xsd}{$dateEnd-data-type}"><xsl:value-of select="$dateEnd"/></dcat:endDate>
2618
- </xsl:if>
2619
- </dct:PeriodOfTime>
2620
- </dct:temporal>
2621
- </xsl:if>
2622
- </xsl:if>
2623
- </xsl:for-each>
2624
- </xsl:template>
2625
-
2626
- <!-- Dates of publication, last revision, creation -->
2627
-
2628
- <xsl:template name="ResourceDates" match="gmd:identificationInfo/*/gmd:citation/gmd:CI_Citation">
2629
- <xsl:apply-templates select="gmd:date/gmd:CI_Date"/>
2630
- </xsl:template>
2631
-
2632
- <!-- Generic date template -->
2633
-
2634
- <xsl:template name="Dates" match="gmd:date/gmd:CI_Date">
2635
- <xsl:param name="date">
2636
- <xsl:value-of select="normalize-space(gmd:date/gco:Date)"/>
2637
- </xsl:param>
2638
- <xsl:param name="type">
2639
- <xsl:value-of select="gmd:dateType/gmd:CI_DateTypeCode/@codeListValue"/>
2640
- </xsl:param>
2641
- <xsl:param name="data-type">
2642
- <xsl:call-template name="DateDataType">
2643
- <xsl:with-param name="date" select="$date"/>
2644
- </xsl:call-template>
2645
- </xsl:param>
2646
- <xsl:choose>
2647
- <xsl:when test="$type = 'publication'">
2648
- <dct:issued rdf:datatype="{$xsd}{$data-type}">
2649
- <xsl:value-of select="$date"/>
2650
- </dct:issued>
2651
- </xsl:when>
2652
- <xsl:when test="$type = 'revision'">
2653
- <dct:modified rdf:datatype="{$xsd}{$data-type}">
2654
- <xsl:value-of select="$date"/>
2655
- </dct:modified>
2656
- </xsl:when>
2657
- <xsl:when test="$type = 'creation' and $profile = $extended">
2658
- <dct:created rdf:datatype="{$xsd}{$data-type}">
2659
- <xsl:value-of select="$date"/>
2660
- </dct:created>
2661
- </xsl:when>
2662
- </xsl:choose>
2663
- </xsl:template>
2664
-
2665
- <!-- Generic date data type template -->
2666
-
2667
- <xsl:template name="DateDataType">
2668
- <xsl:param name="date"/>
2669
- <xsl:choose>
2670
- <xsl:when test="string-length($date) = 4">
2671
- <xsl:text>gYear</xsl:text>
2672
- </xsl:when>
2673
- <xsl:when test="string-length($date) = 10">
2674
- <xsl:text>date</xsl:text>
2675
- </xsl:when>
2676
- <xsl:when test="string-length($date) &gt; 10">
2677
- <xsl:text>dateTime</xsl:text>
2678
- </xsl:when>
2679
- <xsl:otherwise>
2680
- <xsl:text>date</xsl:text>
2681
- </xsl:otherwise>
2682
- </xsl:choose>
2683
- </xsl:template>
2684
-
2685
- <!-- Constraints related to access and use -->
2686
-
2687
- <xsl:template name="ConstraintsRelatedToAccessAndUse" match="gmd:identificationInfo[1]/*/gmd:resourceConstraints/*">
2688
- <xsl:param name="MetadataLanguage"/>
2689
- <xsl:param name="LimitationsOnPublicAccess">
2690
- <xsl:value-of select="gmd:MD_LegalConstraints/gmd:otherConstraints/*"/>
2691
- </xsl:param>
2692
- <xsl:param name="LimitationsOnPublicAccessCode">
2693
- <xsl:value-of select="gmd:MD_LegalConstraints/gmd:otherConstraints/*/@codeListValue"/>
2694
- </xsl:param>
2695
- <xsl:param name="LimitationsOnPublicAccessURL">
2696
- <xsl:value-of select="gmd:MD_LegalConstraints/gmd:otherConstraints/*/@xlink:href"/>
2697
- </xsl:param>
2698
-
2699
- <!-- DEPRECATED: This mapping is not compliant with the 2017 edition of the INSPIRE Metadata
2700
- Technical Guidelines, where use conditions are specified instead by element
2701
- gmd:useConstraints (the use of gmd:useLimitation for this purpose has been
2702
- recognised as an error, as this element is rather about "fit for purpose").
2703
-
2704
- The mapping has been however kept active for backward compatibility, waiting
2705
- for being revised (e.g., mapped to a usage note) or dropped.
2706
- -->
2707
-
2708
- <xsl:if test="$include-deprecated = 'yes'">
2709
-
2710
- <xsl:for-each select="gmd:useLimitation">
2711
- <xsl:choose>
2712
- <!-- In case the rights/licence URL IS NOT provided -->
2713
- <xsl:when test="normalize-space(gco:CharacterString) != ''">
2714
- <dct:license>
2715
- <dct:LicenseDocument>
2716
- <rdfs:label xml:lang="{$MetadataLanguage}"><xsl:value-of select="normalize-space(gco:CharacterString)"/></rdfs:label>
2717
- <xsl:call-template name="LocalisedString">
2718
- <xsl:with-param name="term">rdfs:label</xsl:with-param>
2719
- </xsl:call-template>
2720
- </dct:LicenseDocument>
2721
- </dct:license>
2722
- <!--
2723
- <dct:rights>
2724
- <dct:RightsStatement>
2725
- <rdfs:label xml:lang="{$MetadataLanguage}"><xsl:value-of select="normalize-space(gco:CharacterString)"/></rdfs:label>
2726
- </dct:RightsStatement>
2727
- </dct:rights>
2728
- -->
2729
- </xsl:when>
2730
- <xsl:when test="gmd:MD_RestrictionCode">
2731
- <xsl:variable name="use-limitation-code" select="normalize-space(@codeListValue)"/>
2732
- <xsl:variable name="use-limitation-text">
2733
- <xsl:choose>
2734
- <xsl:when test="normalize-space(.) != ''">
2735
- <xsl:value-of select="normalize-space(.)"/>
2736
- </xsl:when>
2737
- <xsl:when test="$use-limitation-code != ''">
2738
- <xsl:value-of select="$use-limitation-code"/>
2739
- </xsl:when>
2740
- </xsl:choose>
2741
- </xsl:variable>
2742
- <dct:license>
2743
- <dct:LicenseDocument>
2744
- <xsl:if test="$use-limitation-code != ''">
2745
- <dct:identifier rdf:datatype="{$xsd}string"><xsl:value-of select="$use-limitation-code"/></dct:identifier>
2746
- </xsl:if>
2747
- <rdfs:label xml:lang="{$MetadataLanguage}"><xsl:value-of select="$use-limitation-text"/></rdfs:label>
2748
- <xsl:call-template name="LocalisedString">
2749
- <xsl:with-param name="term">rdfs:label</xsl:with-param>
2750
- </xsl:call-template>
2751
- </dct:LicenseDocument>
2752
- </dct:license>
2753
- <!--
2754
- <dct:rights>
2755
- <dct:RightsStatement>
2756
- <rdfs:label xml:lang="{$MetadataLanguage}"><xsl:value-of select="normalize-space(gco:CharacterString)"/></rdfs:label>
2757
- </dct:RightsStatement>
2758
- </dct:rights>
2759
- -->
2760
- </xsl:when>
2761
- <!-- In case the rights/licence URL IS provided -->
2762
- <xsl:when test="gmx:Anchor/@xlink:href">
2763
- <dct:license>
2764
- <dct:LicenseDocument rdf:about="{gmx:Anchor/@xlink:href}"/>
2765
- </dct:license>
2766
- <!--
2767
- <dct:license>
2768
- <dct:LicenseDocument rdf:about="{gmx:Anchor/@xlink:href}">
2769
- <rdfs:label xml:lang="{$MetadataLanguage}"><xsl:value-of select="normalize-space(gmx:Anchor)"/></rdfs:label>
2770
- </dct:LicenseDocument>
2771
- </dct:license>
2772
- -->
2773
- </xsl:when>
2774
- </xsl:choose>
2775
- </xsl:for-each>
2776
-
2777
- </xsl:if>
2778
-
2779
- <!-- Mapping added for compliance with the 2017 edition of the INSPIRE Metadata Technical Guidelines -->
2780
- <xsl:for-each select="gmd:otherConstraints[../gmd:useConstraints]">
2781
- <xsl:choose>
2782
- <!-- In case the rights/licence URL IS NOT provided -->
2783
- <xsl:when test="normalize-space(gco:CharacterString) != ''">
2784
- <dct:license>
2785
- <dct:LicenseDocument>
2786
- <rdfs:label xml:lang="{$MetadataLanguage}"><xsl:value-of select="normalize-space(gco:CharacterString)"/></rdfs:label>
2787
- <xsl:call-template name="LocalisedString">
2788
- <xsl:with-param name="term">rdfs:label</xsl:with-param>
2789
- </xsl:call-template>
2790
- </dct:LicenseDocument>
2791
- </dct:license>
2792
- </xsl:when>
2793
- <xsl:when test="gmd:MD_RestrictionCode">
2794
- <xsl:variable name="use-constraints-code" select="normalize-space(@codeListValue)"/>
2795
- <xsl:variable name="use-constraints-text">
2796
- <xsl:choose>
2797
- <xsl:when test="normalize-space(.) != ''">
2798
- <xsl:value-of select="normalize-space(.)"/>
2799
- </xsl:when>
2800
- <xsl:when test="$use-constraints-code != ''">
2801
- <xsl:value-of select="$use-constraints-code"/>
2802
- </xsl:when>
2803
- </xsl:choose>
2804
- </xsl:variable>
2805
- <dct:license>
2806
- <dct:LicenseDocument>
2807
- <xsl:if test="$use-constraints-code != ''">
2808
- <dct:identifier rdf:datatype="{$xsd}string"><xsl:value-of select="$use-constraints-code"/></dct:identifier>
2809
- </xsl:if>
2810
- <rdfs:label xml:lang="{$MetadataLanguage}"><xsl:value-of select="$use-constraints-text"/></rdfs:label>
2811
- <xsl:call-template name="LocalisedString">
2812
- <xsl:with-param name="term">rdfs:label</xsl:with-param>
2813
- </xsl:call-template>
2814
- </dct:LicenseDocument>
2815
- </dct:license>
2816
- </xsl:when>
2817
- <!-- In case the rights/licence URL IS provided -->
2818
- <xsl:when test="gmx:Anchor/@xlink:href">
2819
- <dct:license>
2820
- <dct:LicenseDocument rdf:about="{gmx:Anchor/@xlink:href}"/>
2821
- </dct:license>
2822
- </xsl:when>
2823
- </xsl:choose>
2824
- </xsl:for-each>
2825
-
2826
- <!-- Mapping revised for compliance with the 2017 edition of the INSPIRE Metadata Technical Guidelines -->
2827
- <xsl:for-each select="gmd:otherConstraints[../gmd:accessConstraints]">
2828
- <!-- Mapping moved to core profile for compliance with DCAT-AP 2 -->
2829
- <!--
2830
- <xsl:if test="$profile = $extended">
2831
- -->
2832
- <xsl:choose>
2833
- <!-- In case the rights/licence URL IS NOT provided -->
2834
- <xsl:when test="normalize-space(gco:CharacterString) != ''">
2835
- <dct:accessRights>
2836
- <dct:RightsStatement>
2837
- <rdfs:label xml:lang="{$MetadataLanguage}"><xsl:value-of select="normalize-space(gco:CharacterString)"/></rdfs:label>
2838
- <xsl:call-template name="LocalisedString">
2839
- <xsl:with-param name="term">rdfs:label</xsl:with-param>
2840
- </xsl:call-template>
2841
- </dct:RightsStatement>
2842
- </dct:accessRights>
2843
- </xsl:when>
2844
- <xsl:when test="gmd:MD_RestrictionCode">
2845
- <xsl:variable name="access-constraints-code" select="normalize-space(@codeListValue)"/>
2846
- <xsl:variable name="access-constraints-text">
2847
- <xsl:choose>
2848
- <xsl:when test="normalize-space(.) != ''">
2849
- <xsl:value-of select="normalize-space(.)"/>
2850
- </xsl:when>
2851
- <xsl:when test="$access-constraints-code != ''">
2852
- <xsl:value-of select="$access-constraints-code"/>
2853
- </xsl:when>
2854
- </xsl:choose>
2855
- </xsl:variable>
2856
- <dct:accessRights>
2857
- <dct:RightsStatement>
2858
- <xsl:if test="$access-constraints-code != ''">
2859
- <dct:identifier rdf:datatype="{$xsd}string"><xsl:value-of select="$access-constraints-code"/></dct:identifier>
2860
- </xsl:if>
2861
- <rdfs:label xml:lang="{$MetadataLanguage}"><xsl:value-of select="$access-constraints-text"/></rdfs:label>
2862
- <xsl:call-template name="LocalisedString">
2863
- <xsl:with-param name="term">rdfs:label</xsl:with-param>
2864
- </xsl:call-template>
2865
- </dct:RightsStatement>
2866
- </dct:accessRights>
2867
- </xsl:when>
2868
- <!-- In case the rights/licence URL IS provided -->
2869
- <xsl:when test="gmx:Anchor/@xlink:href">
2870
- <dct:accessRights>
2871
- <dct:RightsStatement rdf:about="{gmx:Anchor/@xlink:href}"/>
2872
- </dct:accessRights>
2873
- </xsl:when>
2874
- </xsl:choose>
2875
- <!--
2876
- </xsl:if>
2877
- -->
2878
- </xsl:for-each>
2879
- <!--
2880
- <xsl:for-each select="gmd:accessConstraints">
2881
- <dct:accessRights rdf:resource="{$MD_RestrictionCode}_{gmd:MD_RestrictionCode/@codeListValue}"/>
2882
- </xsl:for-each>
2883
- <xsl:for-each select="gmd:classification">
2884
- <dct:accessRights rdf:resource="{$MD_ClassificationCode}_{gmd:MD_ClassificationCode/@codeListValue}"/>
2885
- </xsl:for-each>
2886
- -->
2887
- </xsl:template>
2888
-
2889
- <!-- Keyword -->
2890
-
2891
- <xsl:template name="Keyword" match="gmd:identificationInfo/*/gmd:descriptiveKeywords/gmd:MD_Keywords">
2892
- <xsl:param name="MetadataLanguage"/>
2893
- <xsl:param name="ResourceType"/>
2894
- <xsl:param name="ServiceType"/>
2895
- <xsl:param name="OriginatingControlledVocabularyURI" select="normalize-space(gmd:thesaurusName/gmd:CI_Citation/gmd:title/gmx:Anchor/@xlink:href)"/>
2896
- <xsl:param name="OriginatingControlledVocabulary">
2897
- <!--
2898
- <xsl:for-each select="gmd:thesaurusName/gmd:CI_Citation">
2899
- <dct:title xml:lang="{$MetadataLanguage}">
2900
- <xsl:value-of select="gmd:title/gco:CharacterString"/>
2901
- </dct:title>
2902
- <xsl:apply-templates select="gmd:date/gmd:CI_Date"/>
2903
- </xsl:for-each>
2904
- -->
2905
- <xsl:for-each select="gmd:thesaurusName/gmd:CI_Citation">
2906
- <xsl:for-each select="gmd:title">
2907
- <dct:title xml:lang="{$MetadataLanguage}">
2908
- <xsl:value-of select="normalize-space(*[self::gco:CharacterString|self::gmx:Anchor])"/>
2909
- </dct:title>
2910
- <xsl:call-template name="LocalisedString">
2911
- <xsl:with-param name="term">dct:title</xsl:with-param>
2912
- </xsl:call-template>
2913
- </xsl:for-each>
2914
- <xsl:if test="$profile = $extended">
2915
- <xsl:apply-templates select="gmd:date/gmd:CI_Date"/>
2916
- </xsl:if>
2917
- </xsl:for-each>
2918
- </xsl:param>
2919
- <xsl:param name="ConceptScheme">
2920
- <xsl:choose>
2921
- <xsl:when test="$OriginatingControlledVocabularyURI != ''">
2922
- <skos:ConceptScheme rdf:about="{$OriginatingControlledVocabularyURI}">
2923
- <xsl:copy-of select="$OriginatingControlledVocabulary"/>
2924
- </skos:ConceptScheme>
2925
- </xsl:when>
2926
- <xsl:otherwise>
2927
- <skos:ConceptScheme>
2928
- <xsl:copy-of select="$OriginatingControlledVocabulary"/>
2929
- </skos:ConceptScheme>
2930
- </xsl:otherwise>
2931
- </xsl:choose>
2932
- </xsl:param>
2933
- <xsl:param name="inScheme">
2934
- <xsl:choose>
2935
- <xsl:when test="$OriginatingControlledVocabularyURI != ''">
2936
- <skos:inScheme rdf:resource="{$OriginatingControlledVocabularyURI}"/>
2937
- </xsl:when>
2938
- <xsl:otherwise>
2939
- <skos:inScheme>
2940
- <xsl:copy-of select="$ConceptScheme"/>
2941
- </skos:inScheme>
2942
- </xsl:otherwise>
2943
- </xsl:choose>
2944
- </xsl:param>
2945
- <xsl:for-each select="gmd:keyword[normalize-space(gco:CharacterString) != '' or normalize-space(gmx:Anchor/@xlink:href) != '']">
2946
- <xsl:variable name="lckw" select="translate(*[self::gco:CharacterString|self::gmx:Anchor],$uppercase,$lowercase)"/>
2947
- <xsl:choose>
2948
- <xsl:when test="normalize-space($OriginatingControlledVocabulary) = '' and not( gmx:Anchor/@xlink:href and ( starts-with(gmx:Anchor/@xlink:href, 'http://') or starts-with(gmx:Anchor/@xlink:href, 'https://') ) )">
2949
- <xsl:choose>
2950
- <xsl:when test="$ResourceType = 'service'">
2951
- <!-- Mapping moved to core profile for compliance with DCAT-AP 2 -->
2952
- <!-- Mapping added for compliance with DCAT-AP 2 -->
2953
- <dcat:keyword xml:lang="{$MetadataLanguage}">
2954
- <xsl:value-of select="normalize-space(*[self::gco:CharacterString|self::gmx:Anchor])"/>
2955
- </dcat:keyword>
2956
- <xsl:call-template name="LocalisedString">
2957
- <xsl:with-param name="term">dcat:keyword</xsl:with-param>
2958
- </xsl:call-template>
2959
- <xsl:if test="$profile = $extended">
2960
- <!-- DEPRECATED: Mapping kept for backward compatibility with GeoDCAT-AP v1.* -->
2961
- <xsl:if test="$include-deprecated = 'yes'">
2962
- <dc:subject xml:lang="{$MetadataLanguage}">
2963
- <xsl:value-of select="normalize-space(*[self::gco:CharacterString|self::gmx:Anchor])"/>
2964
- </dc:subject>
2965
- <xsl:call-template name="LocalisedString">
2966
- <xsl:with-param name="term">dc:subject</xsl:with-param>
2967
- </xsl:call-template>
2968
- </xsl:if>
2969
- </xsl:if>
2970
- </xsl:when>
2971
- <xsl:otherwise>
2972
- <dcat:keyword xml:lang="{$MetadataLanguage}">
2973
- <xsl:value-of select="normalize-space(*[self::gco:CharacterString|self::gmx:Anchor])"/>
2974
- </dcat:keyword>
2975
- <xsl:call-template name="LocalisedString">
2976
- <xsl:with-param name="term">dcat:keyword</xsl:with-param>
2977
- </xsl:call-template>
2978
- </xsl:otherwise>
2979
- </xsl:choose>
2980
- </xsl:when>
2981
- <xsl:otherwise>
2982
- <xsl:choose>
2983
- <!-- In case the concept's URI is NOT provided -->
2984
- <xsl:when test="gco:CharacterString">
2985
- <xsl:choose>
2986
- <xsl:when test="$ResourceType != 'service'">
2987
- <dcat:theme rdf:parseType="Resource">
2988
- <rdf:type rdf:resource="{$skos}Concept"/>
2989
- <skos:prefLabel xml:lang="{$MetadataLanguage}">
2990
- <xsl:value-of select="normalize-space(gco:CharacterString)"/>
2991
- </skos:prefLabel>
2992
- <xsl:call-template name="LocalisedString">
2993
- <xsl:with-param name="term">skos:prefLabel</xsl:with-param>
2994
- </xsl:call-template>
2995
- <xsl:copy-of select="$inScheme"/>
2996
- <!--
2997
- <skos:inScheme>
2998
- <skos:ConceptScheme>
2999
- <xsl:copy-of select="$OriginatingControlledVocabulary"/>
3000
- </skos:ConceptScheme>
3001
- </skos:inScheme>
3002
- -->
3003
- </dcat:theme>
3004
- </xsl:when>
3005
- <xsl:otherwise>
3006
- <!-- Mapping moved to core profile for compliance with DCAT-AP 2 -->
3007
- <!-- Mapping added for compliance with DCAT-AP 2 -->
3008
- <dcat:theme rdf:parseType="Resource">
3009
- <rdf:type rdf:resource="{$skos}Concept"/>
3010
- <skos:prefLabel xml:lang="{$MetadataLanguage}">
3011
- <xsl:value-of select="normalize-space(gco:CharacterString)"/>
3012
- </skos:prefLabel>
3013
- <xsl:call-template name="LocalisedString">
3014
- <xsl:with-param name="term">skos:prefLabel</xsl:with-param>
3015
- </xsl:call-template>
3016
- <xsl:copy-of select="$inScheme"/>
3017
- <!--
3018
- <skos:inScheme>
3019
- <skos:ConceptScheme>
3020
- <xsl:copy-of select="$OriginatingControlledVocabulary"/>
3021
- </skos:ConceptScheme>
3022
- </skos:inScheme>
3023
- -->
3024
- </dcat:theme>
3025
- <xsl:if test="$profile = $extended">
3026
- <!-- DEPRECATED: Mapping kept for backward compatibility with GeoDCAT-AP v1.* -->
3027
- <xsl:if test="$include-deprecated = 'yes'">
3028
- <dct:subject rdf:parseType="Resource">
3029
- <rdf:type rdf:resource="{$skos}Concept"/>
3030
- <skos:prefLabel xml:lang="{$MetadataLanguage}">
3031
- <xsl:value-of select="normalize-space(gco:CharacterString)"/>
3032
- </skos:prefLabel>
3033
- <xsl:call-template name="LocalisedString">
3034
- <xsl:with-param name="term">skos:prefLabel</xsl:with-param>
3035
- </xsl:call-template>
3036
- <xsl:copy-of select="$inScheme"/>
3037
- <!--
3038
- <skos:inScheme>
3039
- <skos:ConceptScheme>
3040
- <xsl:copy-of select="$OriginatingControlledVocabulary"/>
3041
- </skos:ConceptScheme>
3042
- </skos:inScheme>
3043
- -->
3044
- </dct:subject>
3045
- </xsl:if>
3046
- </xsl:if>
3047
- </xsl:otherwise>
3048
- </xsl:choose>
3049
- </xsl:when>
3050
- <!-- In case the concept's URI is provided -->
3051
- <xsl:when test="gmx:Anchor/@xlink:href">
3052
- <xsl:choose>
3053
- <xsl:when test="$ResourceType != 'service'">
3054
- <dcat:theme rdf:resource="{gmx:Anchor/@xlink:href}"/>
3055
- <!--
3056
- <skos:Concept rdf:about="{gmx:Anchor/@xlink:href}">
3057
- <skos:prefLabel xml:lang="{$MetadataLanguage}">
3058
- <xsl:value-of select="gmx:Anchor"/>
3059
- </skos:prefLabel>
3060
- <skos:inScheme>
3061
- <skos:ConceptScheme>
3062
- <xsl:copy-of select="$OriginatingControlledVocabulary"/>
3063
- </skos:ConceptScheme>
3064
- </skos:inScheme>
3065
- </skos:Concept>
3066
- -->
3067
- </xsl:when>
3068
- <xsl:otherwise>
3069
- <!-- Mapping moved to core profile for compliance with DCAT-AP 2 -->
3070
- <!-- Mapping added for compliance with DCAT-AP 2 -->
3071
- <dcat:theme rdf:resource="{gmx:Anchor/@xlink:href}"/>
3072
- <xsl:if test="$profile = $extended">
3073
- <!-- DEPRECATED: Mapping kept for backward compatibility with GeoDCAT-AP v1.* -->
3074
- <xsl:if test="$include-deprecated = 'yes'">
3075
- <dct:subject rdf:resource="{gmx:Anchor/@xlink:href}"/>
3076
- </xsl:if>
3077
- </xsl:if>
3078
- </xsl:otherwise>
3079
- </xsl:choose>
3080
- </xsl:when>
3081
- </xsl:choose>
3082
- </xsl:otherwise>
3083
- </xsl:choose>
3084
- </xsl:for-each>
3085
- </xsl:template>
3086
-
3087
- <!-- Topic category -->
3088
-
3089
- <xsl:template name="TopicCategory" match="gmd:identificationInfo/*/gmd:topicCategory">
3090
- <xsl:param name="TopicCategory"><xsl:value-of select="normalize-space(gmd:MD_TopicCategoryCode)"/></xsl:param>
3091
- <xsl:if test="$TopicCategory != ''">
3092
- <dct:subject rdf:resource="{$TopicCategoryCodelistUri}/{$TopicCategory}"/>
3093
- </xsl:if>
3094
- </xsl:template>
3095
-
3096
- <!-- Spatial resolution (unstable - to be replaced with a standard-based solution, when available) -->
3097
-
3098
- <xsl:template name="SpatialResolution" match="gmd:identificationInfo/*/gmd:spatialResolution/gmd:MD_Resolution">
3099
- <!-- dcat:granularity is deprecated -->
3100
- <!--
3101
- <xsl:for-each select="gmd:distance/gco:Distance">
3102
- <dcat:granularity rdf:datatype="{$xsd}string"><xsl:value-of select="."/> <xsl:value-of select="@uom"/></dcat:granularity>
3103
- </xsl:for-each>
3104
- <xsl:for-each select="gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator">
3105
- <dcat:granularity rdf:datatype="{$xsd}string">1/<xsl:value-of select="gco:Integer"/></dcat:granularity>
3106
- </xsl:for-each>
3107
- -->
3108
- <xsl:for-each select="gmd:distance/gco:Distance">
3109
- <xsl:variable name="UoM">
3110
- <xsl:choose>
3111
- <xsl:when test="@uom = 'EPSG::9001' or @uom = 'urn:ogc:def:uom:EPSG::9001' or @uom = 'urn:ogc:def:uom:UCUM::m' or @uom = 'urn:ogc:def:uom:OGC::m'">
3112
- <xsl:value-of select="concat('m',' (',@uom,')')"/>
3113
- </xsl:when>
3114
- <xsl:when test="@uom = 'EPSG::9002' or @uom = 'urn:ogc:def:uom:EPSG::9002' or @uom = 'urn:ogc:def:uom:UCUM::[ft_i]' or @uom = 'urn:ogc:def:uom:OGC::[ft_i]'">
3115
- <xsl:value-of select="concat('ft',' (',@uom,')')"/>
3116
- </xsl:when>
3117
- <xsl:when test="starts-with(@uom, 'http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/uom/ML_gmxUom.xml#')">
3118
- <xsl:value-of select="concat(substring-after(@uom, 'http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/uom/ML_gmxUom.xml#'),' (',@uom,')')"/>
3119
- </xsl:when>
3120
- <!-- To be completed -->
3121
- <xsl:otherwise>
3122
- <xsl:value-of select="normalize-space(@uom)"/>
3123
- </xsl:otherwise>
3124
- </xsl:choose>
3125
- </xsl:variable>
3126
- <!--
3127
- <xsl:if test="$profile = $extended">
3128
- <rdfs:comment xml:lang="en">Spatial resolution (distance): <xsl:value-of select="."/>&#160;<xsl:value-of select="$UoM"/></rdfs:comment>
3129
- </xsl:if>
3130
- -->
3131
- <!-- Mapping moved to core profile for compliance with DCAT-AP 2 -->
3132
- <!-- Mapping added for compliance with DCAT-AP 2 -->
3133
- <xsl:choose>
3134
- <xsl:when test="($UoM = 'm' or starts-with($UoM, 'm ')) and number(.) = number(.)">
3135
- <dcat:spatialResolutionInMeters rdf:datatype="{$xsd}decimal">
3136
- <xsl:value-of select="."/>
3137
- </dcat:spatialResolutionInMeters>
3138
- <!-- Mapping added for compliance with GeoDCAT-AP 2 -->
3139
- <xsl:if test="$profile = 'extended'">
3140
- <dqv:hasQualityMeasurement>
3141
- <dqv:QualityMeasurement>
3142
- <dqv:isMeasurementOf>
3143
- <dqv:Metric rdf:about="{$geodcatap}spatialResolutionAsDistance"/>
3144
- </dqv:isMeasurementOf>
3145
- <dqv:value rdf:datatype="{$xsd}decimal"><xsl:value-of select="."/></dqv:value>
3146
- <sdmx-attribute:unitMeasure rdf:resource="{$uom-m}"/>
3147
- </dqv:QualityMeasurement>
3148
- </dqv:hasQualityMeasurement>
3149
- </xsl:if>
3150
- </xsl:when>
3151
- <xsl:when test="($UoM = 'km' or starts-with($UoM, 'km ')) and number(.) = number(.)">
3152
- <dcat:spatialResolutionInMeters rdf:datatype="{$xsd}decimal">
3153
- <xsl:value-of select="(. * 1000)"/>
3154
- </dcat:spatialResolutionInMeters>
3155
- <!-- Mapping added for compliance with GeoDCAT-AP 2 -->
3156
- <xsl:if test="$profile = 'extended'">
3157
- <dqv:hasQualityMeasurement>
3158
- <dqv:QualityMeasurement>
3159
- <dqv:isMeasurementOf>
3160
- <dqv:Metric rdf:about="{$geodcatap}spatialResolutionAsDistance"/>
3161
- </dqv:isMeasurementOf>
3162
- <dqv:value rdf:datatype="{$xsd}decimal"><xsl:value-of select="."/></dqv:value>
3163
- <sdmx-attribute:unitMeasure rdf:resource="{$uom-km}"/>
3164
- </dqv:QualityMeasurement>
3165
- </dqv:hasQualityMeasurement>
3166
- </xsl:if>
3167
- </xsl:when>
3168
- <xsl:when test="($UoM = 'ft' or starts-with($UoM, 'ft ')) and number(.) = number(.)">
3169
- <dcat:spatialResolutionInMeters rdf:datatype="{$xsd}decimal">
3170
- <xsl:value-of select="(. * 0.3048)"/>
3171
- </dcat:spatialResolutionInMeters>
3172
- <!-- Mapping added for compliance with GeoDCAT-AP 2 -->
3173
- <xsl:if test="$profile = 'extended'">
3174
- <dqv:hasQualityMeasurement>
3175
- <dqv:QualityMeasurement>
3176
- <dqv:isMeasurementOf>
3177
- <dqv:Metric rdf:about="{$geodcatap}spatialResolutionAsDistance"/>
3178
- </dqv:isMeasurementOf>
3179
- <dqv:value rdf:datatype="{$xsd}decimal"><xsl:value-of select="."/></dqv:value>
3180
- <sdmx-attribute:unitMeasure rdf:resource="{$uom-ft}"/>
3181
- </dqv:QualityMeasurement>
3182
- </dqv:hasQualityMeasurement>
3183
- </xsl:if>
3184
- </xsl:when>
3185
- <xsl:otherwise>
3186
- <xsl:if test="$profile = $extended">
3187
- <rdfs:comment xml:lang="en">
3188
- Spatial resolution (distance): <xsl:value-of select="."/>&#160;<xsl:value-of select="$UoM"/>
3189
- </rdfs:comment>
3190
- </xsl:if>
3191
- </xsl:otherwise>
3192
- </xsl:choose>
3193
- </xsl:for-each>
3194
- <xsl:if test="$profile = $extended">
3195
- <xsl:for-each select="gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator">
3196
- <!--
3197
- <rdfs:comment xml:lang="en">Spatial resolution (equivalent scale): 1:<xsl:value-of select="gco:Integer"/></rdfs:comment>
3198
- -->
3199
- <xsl:choose>
3200
- <!-- Mapping added for compliance with GeoDCAT-AP 2 -->
3201
- <xsl:when test="number(gco:Integer) = number(gco:Integer)">
3202
- <dqv:hasQualityMeasurement>
3203
- <dqv:QualityMeasurement>
3204
- <dqv:isMeasurementOf>
3205
- <dqv:Metric rdf:about="{$geodcatap}spatialResolutionAsScale"/>
3206
- </dqv:isMeasurementOf>
3207
- <dqv:value rdf:datatype="{$xsd}decimal">
3208
- <xsl:value-of select="format-number((1 div gco:Integer), '0.########################')"/>
3209
- </dqv:value>
3210
- </dqv:QualityMeasurement>
3211
- </dqv:hasQualityMeasurement>
3212
- </xsl:when>
3213
- <xsl:otherwise>
3214
- <rdfs:comment xml:lang="en">
3215
- Spatial resolution (equivalent scale): <xsl:value-of select="gco:Integer"/>
3216
- </rdfs:comment>
3217
- </xsl:otherwise>
3218
- </xsl:choose>
3219
- </xsl:for-each>
3220
- </xsl:if>
3221
- </xsl:template>
3222
-
3223
- <!-- Character encoding -->
3224
-
3225
- <xsl:template name="CharacterEncoding" match="gmd:characterSet/gmd:MD_CharacterSetCode">
3226
- <xsl:variable name="CharSetCode">
3227
- <xsl:choose>
3228
- <xsl:when test="@codeListValue = 'ucs2'">
3229
- <xsl:text>ISO-10646-UCS-2</xsl:text>
3230
- </xsl:when>
3231
- <xsl:when test="@codeListValue = 'ucs4'">
3232
- <xsl:text>ISO-10646-UCS-4</xsl:text>
3233
- </xsl:when>
3234
- <xsl:when test="@codeListValue = 'utf7'">
3235
- <xsl:text>UTF-7</xsl:text>
3236
- </xsl:when>
3237
- <xsl:when test="@codeListValue = 'utf8'">
3238
- <xsl:text>UTF-8</xsl:text>
3239
- </xsl:when>
3240
- <xsl:when test="@codeListValue = 'utf16'">
3241
- <xsl:text>UTF-16</xsl:text>
3242
- </xsl:when>
3243
- <xsl:when test="@codeListValue = '8859part1'">
3244
- <xsl:text>ISO-8859-1</xsl:text>
3245
- </xsl:when>
3246
- <xsl:when test="@codeListValue = '8859part2'">
3247
- <xsl:text>ISO-8859-2</xsl:text>
3248
- </xsl:when>
3249
- <xsl:when test="@codeListValue = '8859part3'">
3250
- <xsl:text>ISO-8859-3</xsl:text>
3251
- </xsl:when>
3252
- <xsl:when test="@codeListValue = '8859part4'">
3253
- <xsl:text>ISO-8859-4</xsl:text>
3254
- </xsl:when>
3255
- <xsl:when test="@codeListValue = '8859part5'">
3256
- <xsl:text>ISO-8859-5</xsl:text>
3257
- </xsl:when>
3258
- <xsl:when test="@codeListValue = '8859part6'">
3259
- <xsl:text>ISO-8859-6</xsl:text>
3260
- </xsl:when>
3261
- <xsl:when test="@codeListValue = '8859part7'">
3262
- <xsl:text>ISO-8859-7</xsl:text>
3263
- </xsl:when>
3264
- <xsl:when test="@codeListValue = '8859part8'">
3265
- <xsl:text>ISO-8859-8</xsl:text>
3266
- </xsl:when>
3267
- <xsl:when test="@codeListValue = '8859part9'">
3268
- <xsl:text>ISO-8859-9</xsl:text>
3269
- </xsl:when>
3270
- <xsl:when test="@codeListValue = '8859part10'">
3271
- <xsl:text>ISO-8859-10</xsl:text>
3272
- </xsl:when>
3273
- <xsl:when test="@codeListValue = '8859part11'">
3274
- <xsl:text>ISO-8859-11</xsl:text>
3275
- </xsl:when>
3276
- <xsl:when test="@codeListValue = '8859part12'">
3277
- <xsl:text>ISO-8859-12</xsl:text>
3278
- </xsl:when>
3279
- <xsl:when test="@codeListValue = '8859part13'">
3280
- <xsl:text>ISO-8859-13</xsl:text>
3281
- </xsl:when>
3282
- <xsl:when test="@codeListValue = '8859part14'">
3283
- <xsl:text>ISO-8859-14</xsl:text>
3284
- </xsl:when>
3285
- <xsl:when test="@codeListValue = '8859part15'">
3286
- <xsl:text>ISO-8859-15</xsl:text>
3287
- </xsl:when>
3288
- <xsl:when test="@codeListValue = '8859part16'">
3289
- <xsl:text>ISO-8859-16</xsl:text>
3290
- </xsl:when>
3291
- <!-- Mapping to be verified: multiple candidates are available in the IANA register for jis -->
3292
- <xsl:when test="@codeListValue = 'jis'">
3293
- <xsl:text>JIS_Encoding</xsl:text>
3294
- </xsl:when>
3295
- <xsl:when test="@codeListValue = 'shiftJIS'">
3296
- <xsl:text>Shift_JIS</xsl:text>
3297
- </xsl:when>
3298
- <xsl:when test="@codeListValue = 'eucJP'">
3299
- <xsl:text>EUC-JP</xsl:text>
3300
- </xsl:when>
3301
- <xsl:when test="@codeListValue = 'usAscii'">
3302
- <xsl:text>US-ASCII</xsl:text>
3303
- </xsl:when>
3304
- <!-- Mapping to be verified: multiple candidates are available in the IANA register ebcdic -->
3305
- <xsl:when test="@codeListValue = 'ebcdic'">
3306
- <xsl:text>IBM037</xsl:text>
3307
- </xsl:when>
3308
- <xsl:when test="@codeListValue = 'eucKR'">
3309
- <xsl:text>EUC-KR</xsl:text>
3310
- </xsl:when>
3311
- <xsl:when test="@codeListValue = 'big5'">
3312
- <xsl:text>Big5</xsl:text>
3313
- </xsl:when>
3314
- <xsl:when test="@codeListValue = 'GB2312'">
3315
- <xsl:text>GB2312</xsl:text>
3316
- </xsl:when>
3317
- </xsl:choose>
3318
- </xsl:variable>
3319
- <cnt:characterEncoding rdf:datatype="{$xsd}string"><xsl:value-of select="$CharSetCode"/></cnt:characterEncoding>
3320
- <!--
3321
- <cnt:characterEncoding rdf:datatype="{$xsd}string"><xsl:value-of select="@codeListValue"/></cnt:characterEncoding>
3322
- -->
3323
- </xsl:template>
3324
-
3325
- <!-- Encoding -->
3326
-
3327
- <xsl:template name="Encoding" match="gmd:distributionFormat/gmd:MD_Format/gmd:name/*">
3328
- <xsl:param name="format-label">
3329
- <xsl:value-of select="normalize-space(.)"/>
3330
- </xsl:param>
3331
- <xsl:param name="format-uri">
3332
- <xsl:choose>
3333
- <xsl:when test="@xlink:href and @xlink:href != ''">
3334
- <xsl:value-of select="@xlink:href"/>
3335
- </xsl:when>
3336
- <xsl:otherwise>
3337
- <xsl:call-template name="EncodingLabelToUri">
3338
- <xsl:with-param name="label" select="normalize-space(.)"/>
3339
- </xsl:call-template>
3340
- </xsl:otherwise>
3341
- </xsl:choose>
3342
- </xsl:param>
3343
- <xsl:param name="media-type">
3344
- <xsl:choose>
3345
- <xsl:when test="$format-uri != ''">
3346
- <dct:MediaType rdf:about="{$format-uri}"/>
3347
- </xsl:when>
3348
- <xsl:when test="$format-label != ''">
3349
- <dct:MediaType>
3350
- <rdfs:label><xsl:value-of select="$format-label"/></rdfs:label>
3351
- </dct:MediaType>
3352
- </xsl:when>
3353
- </xsl:choose>
3354
- </xsl:param>
3355
- <xsl:choose>
3356
- <xsl:when test="starts-with($format-uri,$iana-mt)">
3357
- <dcat:mediaType>
3358
- <xsl:copy-of select="$media-type"/>
3359
- </dcat:mediaType>
3360
- </xsl:when>
3361
- <xsl:otherwise>
3362
- <dct:format>
3363
- <xsl:copy-of select="$media-type"/>
3364
- </dct:format>
3365
- </xsl:otherwise>
3366
- </xsl:choose>
3367
- <!--
3368
- <dct:format>
3369
- <rdf:Description rdf:about="{$format-uri}">
3370
- <rdf:type rdf:resource="{$dct}MediaType"/>
3371
- <xsl:if test="$format-uri = concat($opft,'OP_DATPRO') and $format-label != ''">
3372
- <rdfs:label><xsl:value-of select="."/></rdfs:label>
3373
- </xsl:if>
3374
- </rdf:Description>
3375
- </dct:format>
3376
- -->
3377
- <!--
3378
- <xsl:choose>
3379
- <xsl:when test="@xlink:href and @xlink:href != ''">
3380
- <dct:format>
3381
- <dct:MediaType rdf:about="{@xlink:href}"/>
3382
- </dct:format>
3383
- </xsl:when>
3384
- <xsl:otherwise>
3385
- <dct:format rdf:parseType="Resource">
3386
- <rdf:type rdf:resource="{$dct}MediaType"/>
3387
- <rdfs:label><xsl:value-of select="."/></rdfs:label>
3388
- </dct:format>
3389
- </xsl:otherwise>
3390
- </xsl:choose>
3391
- -->
3392
- </xsl:template>
3393
-
3394
- <!-- Encoding: Label to URI -->
3395
-
3396
- <!-- CAVEAT: This template attempts to map textual description
3397
- of a distribution encoding, based on the most frequently
3398
- used labels from the European Data Portal. -->
3399
-
3400
- <xsl:template name="EncodingLabelToUri">
3401
- <xsl:param name="label"/>
3402
- <xsl:param name="norm-label">
3403
- <xsl:choose>
3404
- <xsl:when test="starts-with(normalize-space($label),$opft)">
3405
- <xsl:value-of select="translate(substring-after(normalize-space($label),$opft),$uppercase,$lowercase)"/>
3406
- </xsl:when>
3407
- <xsl:otherwise>
3408
- <xsl:value-of select="translate(normalize-space($label),$uppercase,$lowercase)"/>
3409
- </xsl:otherwise>
3410
- </xsl:choose>
3411
- </xsl:param>
3412
- <xsl:choose>
3413
- <xsl:when test="$norm-label = 'aaigrid'">
3414
- <xsl:value-of select="concat($opft,'GRID_ASCII')"/>
3415
- </xsl:when>
3416
- <xsl:when test="$norm-label = 'aig'">
3417
- <xsl:value-of select="concat($opft,'GRID')"/>
3418
- </xsl:when>
3419
- <xsl:when test="$norm-label = 'atom'">
3420
- <xsl:value-of select="concat($opft,'ATOM')"/>
3421
- </xsl:when>
3422
- <xsl:when test="$norm-label = 'csv'">
3423
- <xsl:value-of select="concat($opft,'CSV')"/>
3424
- </xsl:when>
3425
- <xsl:when test="$norm-label = 'csw'">
3426
- <!-- PROVISIONAL -->
3427
- <xsl:value-of select="concat($opft,'XML')"/>
3428
- </xsl:when>
3429
- <xsl:when test="$norm-label = 'dbf'">
3430
- <xsl:value-of select="concat($opft,'DBF')"/>
3431
- </xsl:when>
3432
- <xsl:when test="$norm-label = 'dgn'">
3433
- <!-- PROVISIONAL -->
3434
- <xsl:value-of select="concat($opft,'BIN')"/>
3435
- </xsl:when>
3436
- <xsl:when test="$norm-label = 'djvu'">
3437
- <!-- PROVISIONAL -->
3438
- <xsl:value-of select="concat($iana-mt,'image/vn.djvu')"/>
3439
- </xsl:when>
3440
- <xsl:when test="$norm-label = 'doc'">
3441
- <xsl:value-of select="concat($opft,'DOC')"/>
3442
- </xsl:when>
3443
- <xsl:when test="$norm-label = 'docx'">
3444
- <xsl:value-of select="concat($opft,'DOCX')"/>
3445
- </xsl:when>
3446
- <xsl:when test="$norm-label = 'dxf'">
3447
- <!-- PROVISIONAL -->
3448
- <xsl:value-of select="concat($iana-mt,'image/vn.dxf')"/>
3449
- </xsl:when>
3450
- <xsl:when test="$norm-label = 'dwg'">
3451
- <!-- PROVISIONAL -->
3452
- <xsl:value-of select="concat($iana-mt,'image/vn.dwg')"/>
3453
- </xsl:when>
3454
- <xsl:when test="$norm-label = 'ecw'">
3455
- <xsl:value-of select="concat($opft,'ECW')"/>
3456
- </xsl:when>
3457
- <xsl:when test="$norm-label = 'ecwp'">
3458
- <xsl:value-of select="concat($opft,'ECW')"/>
3459
- </xsl:when>
3460
- <xsl:when test="$norm-label = 'elp'">
3461
- <!-- PROVISIONAL -->
3462
- <xsl:value-of select="concat($opft,'EXE')"/>
3463
- </xsl:when>
3464
- <xsl:when test="$norm-label = 'epub'">
3465
- <xsl:value-of select="concat($opft,'EPUB')"/>
3466
- </xsl:when>
3467
- <xsl:when test="$norm-label = 'fgeo'">
3468
- <!-- PROVISIONAL -->
3469
- <xsl:value-of select="concat($opft,'GDB')"/>
3470
- </xsl:when>
3471
- <xsl:when test="$norm-label = 'gdb'">
3472
- <xsl:value-of select="concat($opft,'GDB')"/>
3473
- </xsl:when>
3474
- <xsl:when test="$norm-label = 'geojson'">
3475
- <xsl:value-of select="concat($opft,'GEOJSON')"/>
3476
- </xsl:when>
3477
- <xsl:when test="$norm-label = 'geopackage'">
3478
- <xsl:value-of select="concat($opft,'GPKG')"/>
3479
- </xsl:when>
3480
- <xsl:when test="$norm-label = 'georss'">
3481
- <!-- PROVISIONAL -->
3482
- <xsl:value-of select="concat($opft,'RSS')"/>
3483
- </xsl:when>
3484
- <xsl:when test="$norm-label = 'geotiff'">
3485
- <xsl:value-of select="concat($opft,'TIFF')"/>
3486
- </xsl:when>
3487
- <xsl:when test="$norm-label = 'gif'">
3488
- <xsl:value-of select="concat($opft,'GIF')"/>
3489
- </xsl:when>
3490
- <xsl:when test="$norm-label = 'gml'">
3491
- <xsl:value-of select="concat($opft,'GML')"/>
3492
- </xsl:when>
3493
- <xsl:when test="$norm-label = 'gmz'">
3494
- <xsl:value-of select="concat($opft,'GMZ')"/>
3495
- </xsl:when>
3496
- <xsl:when test="$norm-label = 'gpkg'">
3497
- <xsl:value-of select="concat($opft,'GPKG')"/>
3498
- </xsl:when>
3499
- <xsl:when test="$norm-label = 'gpx'">
3500
- <!-- PROVISIONAL -->
3501
- <xsl:value-of select="concat($opft,'XML')"/>
3502
- </xsl:when>
3503
- <xsl:when test="$norm-label = 'grid'">
3504
- <xsl:value-of select="concat($opft,'GRID')"/>
3505
- </xsl:when>
3506
- <xsl:when test="$norm-label = 'grid_ascii'">
3507
- <xsl:value-of select="concat($opft,'GRID_ASCII')"/>
3508
- </xsl:when>
3509
- <xsl:when test="$norm-label = 'gtfs'">
3510
- <!-- PROVISIONAL -->
3511
- <xsl:value-of select="concat($opft,'CSV')"/>
3512
- </xsl:when>
3513
- <xsl:when test="$norm-label = 'gtiff'">
3514
- <xsl:value-of select="concat($opft,'TIFF')"/>
3515
- </xsl:when>
3516
- <xsl:when test="$norm-label = 'gzip'">
3517
- <xsl:value-of select="concat($opft,'GZIP')"/>
3518
- </xsl:when>
3519
- <xsl:when test="$norm-label = 'html'">
3520
- <xsl:value-of select="concat($opft,'HTML')"/>
3521
- </xsl:when>
3522
- <xsl:when test="$norm-label = 'jpeg'">
3523
- <xsl:value-of select="concat($opft,'JPEG')"/>
3524
- </xsl:when>
3525
- <xsl:when test="$norm-label = 'jpg'">
3526
- <xsl:value-of select="concat($opft,'JPEG')"/>
3527
- </xsl:when>
3528
- <xsl:when test="$norm-label = 'json'">
3529
- <xsl:value-of select="concat($opft,'JSON')"/>
3530
- </xsl:when>
3531
- <xsl:when test="$norm-label = 'json-ld'">
3532
- <xsl:value-of select="concat($opft,'JSON_LD')"/>
3533
- </xsl:when>
3534
- <xsl:when test="$norm-label = 'json_ld'">
3535
- <xsl:value-of select="concat($opft,'JSON_LD')"/>
3536
- </xsl:when>
3537
- <xsl:when test="$norm-label = 'jsonld'">
3538
- <xsl:value-of select="concat($opft,'JSON_LD')"/>
3539
- </xsl:when>
3540
- <xsl:when test="$norm-label = 'kml'">
3541
- <xsl:value-of select="concat($opft,'KML')"/>
3542
- </xsl:when>
3543
- <xsl:when test="$norm-label = 'kmz'">
3544
- <xsl:value-of select="concat($opft,'KMZ')"/>
3545
- </xsl:when>
3546
- <xsl:when test="$norm-label = 'las'">
3547
- <xsl:value-of select="concat($opft,'LAS')"/>
3548
- </xsl:when>
3549
- <xsl:when test="$norm-label = 'laz'">
3550
- <xsl:value-of select="concat($opft,'LAZ')"/>
3551
- </xsl:when>
3552
- <xsl:when test="$norm-label = 'marc'">
3553
- <!-- PROVISIONAL -->
3554
- <xsl:value-of select="concat($iana-mt,'application/marc')"/>
3555
- </xsl:when>
3556
- <xsl:when test="$norm-label = 'mdb'">
3557
- <xsl:value-of select="concat($opft,'MDB')"/>
3558
- </xsl:when>
3559
- <xsl:when test="$norm-label = 'mxd'">
3560
- <xsl:value-of select="concat($opft,'MXD')"/>
3561
- </xsl:when>
3562
- <xsl:when test="$norm-label = 'n-triples'">
3563
- <xsl:value-of select="concat($opft,'RDF_N_TRIPLES')"/>
3564
- </xsl:when>
3565
- <xsl:when test="$norm-label = 'n3'">
3566
- <xsl:value-of select="concat($opft,'N3')"/>
3567
- </xsl:when>
3568
- <xsl:when test="$norm-label = 'netcdf'">
3569
- <xsl:value-of select="concat($opft,'NETCDF')"/>
3570
- </xsl:when>
3571
- <xsl:when test="$norm-label = 'ods'">
3572
- <xsl:value-of select="concat($opft,'ODS')"/>
3573
- </xsl:when>
3574
- <xsl:when test="$norm-label = 'odt'">
3575
- <xsl:value-of select="concat($opft,'ODT')"/>
3576
- </xsl:when>
3577
- <xsl:when test="$norm-label = 'ogc:csw'">
3578
- <!-- PROVISIONAL -->
3579
- <xsl:value-of select="concat($opft,'XML')"/>
3580
- </xsl:when>
3581
- <xsl:when test="$norm-label = 'ogc:sos'">
3582
- <!-- PROVISIONAL -->
3583
- <xsl:value-of select="concat($opft,'XML')"/>
3584
- </xsl:when>
3585
- <xsl:when test="$norm-label = 'ogc:wcs'">
3586
- <!-- PROVISIONAL -->
3587
- <xsl:value-of select="concat($opft,'TIFF')"/>
3588
- </xsl:when>
3589
- <xsl:when test="$norm-label = 'ogc:wfs'">
3590
- <!-- PROVISIONAL -->
3591
- <xsl:value-of select="concat($opft,'GML')"/>
3592
- </xsl:when>
3593
- <xsl:when test="$norm-label = 'ogc:wfs-g'">
3594
- <!-- PROVISIONAL -->
3595
- <xsl:value-of select="concat($opft,'GML')"/>
3596
- </xsl:when>
3597
- <xsl:when test="$norm-label = 'ogc:wmc'">
3598
- <!-- PROVISIONAL -->
3599
- <xsl:value-of select="concat($opft,'XML')"/>
3600
- </xsl:when>
3601
- <xsl:when test="$norm-label = 'ogc:wms'">
3602
- <!-- PROVISIONAL -->
3603
- <xsl:value-of select="concat($opft,'PNG')"/>
3604
- </xsl:when>
3605
- <xsl:when test="$norm-label = 'ogc:wmts'">
3606
- <!-- PROVISIONAL -->
3607
- <xsl:value-of select="concat($opft,'PNG')"/>
3608
- </xsl:when>
3609
- <xsl:when test="$norm-label = 'ogc:wps'">
3610
- <!-- PROVISIONAL -->
3611
- <xsl:value-of select="concat($opft,'GML')"/>
3612
- </xsl:when>
3613
- <xsl:when test="$norm-label = 'oracledump'">
3614
- <!-- PROVISIONAL -->
3615
- <xsl:value-of select="concat($inspire-mt,'application/x-oracledump')"/>
3616
- </xsl:when>
3617
- <xsl:when test="$norm-label = 'pc-axis'">
3618
- <!-- PROVISIONAL -->
3619
- <xsl:value-of select="concat($opft,'TXT')"/>
3620
- </xsl:when>
3621
- <xsl:when test="$norm-label = 'pdf'">
3622
- <xsl:value-of select="concat($opft,'PDF')"/>
3623
- </xsl:when>
3624
- <xsl:when test="$norm-label = 'pgeo'">
3625
- <xsl:value-of select="concat($opft,'MDB')"/>
3626
- </xsl:when>
3627
- <xsl:when test="$norm-label = 'png'">
3628
- <xsl:value-of select="concat($opft,'PNG')"/>
3629
- </xsl:when>
3630
- <xsl:when test="$norm-label = 'rar'">
3631
- <xsl:value-of select="concat($opft,'RAR')"/>
3632
- </xsl:when>
3633
- <xsl:when test="$norm-label = 'rdf/xml'">
3634
- <xsl:value-of select="concat($opft,'RDF_XML')"/>
3635
- </xsl:when>
3636
- <xsl:when test="$norm-label = 'rdf-n3'">
3637
- <xsl:value-of select="concat($opft,'N3')"/>
3638
- </xsl:when>
3639
- <xsl:when test="$norm-label = 'rdf-turtle'">
3640
- <xsl:value-of select="concat($opft,'RDF_TURTLE')"/>
3641
- </xsl:when>
3642
- <xsl:when test="$norm-label = 'rdf-xml'">
3643
- <xsl:value-of select="concat($opft,'RDF_XML')"/>
3644
- </xsl:when>
3645
- <xsl:when test="$norm-label = 'rdf_n_triples'">
3646
- <xsl:value-of select="concat($opft,'RDF_N_TRIPLES')"/>
3647
- </xsl:when>
3648
- <xsl:when test="$norm-label = 'rdf_n3'">
3649
- <xsl:value-of select="concat($opft,'N3')"/>
3650
- </xsl:when>
3651
- <xsl:when test="$norm-label = 'rdf_turtle'">
3652
- <xsl:value-of select="concat($opft,'RDF_TURTLE')"/>
3653
- </xsl:when>
3654
- <xsl:when test="$norm-label = 'rdf_xml'">
3655
- <xsl:value-of select="concat($opft,'RDF_XML')"/>
3656
- </xsl:when>
3657
- <xsl:when test="$norm-label = 'rss'">
3658
- <xsl:value-of select="concat($opft,'RSS')"/>
3659
- </xsl:when>
3660
- <xsl:when test="$norm-label = 'rtf'">
3661
- <xsl:value-of select="concat($opft,'RTF')"/>
3662
- </xsl:when>
3663
- <xsl:when test="$norm-label = 'scorm'">
3664
- <!-- PROVISIONAL -->
3665
- <xsl:value-of select="concat($opft,'ZIP')"/>
3666
- </xsl:when>
3667
- <xsl:when test="$norm-label = 'shp'">
3668
- <xsl:value-of select="concat($opft,'SHP')"/>
3669
- </xsl:when>
3670
- <xsl:when test="$norm-label = 'sos'">
3671
- <!-- PROVISIONAL -->
3672
- <xsl:value-of select="concat($opft,'XML')"/>
3673
- </xsl:when>
3674
- <xsl:when test="$norm-label = 'spatialite'">
3675
- <!-- PROVISIONAL -->
3676
- <xsl:value-of select="concat($iana-mt,'application/vnd.sqlite3')"/>
3677
- </xsl:when>
3678
- <xsl:when test="$norm-label = 'sqlite'">
3679
- <!-- PROVISIONAL -->
3680
- <xsl:value-of select="concat($iana-mt,'application/vnd.sqlite3')"/>
3681
- </xsl:when>
3682
- <xsl:when test="$norm-label = 'sqlite3'">
3683
- <!-- PROVISIONAL -->
3684
- <xsl:value-of select="concat($iana-mt,'application/vnd.sqlite3')"/>
3685
- </xsl:when>
3686
- <xsl:when test="$norm-label = 'svg'">
3687
- <xsl:value-of select="concat($opft,'SVG')"/>
3688
- </xsl:when>
3689
- <xsl:when test="$norm-label = 'text'">
3690
- <xsl:value-of select="concat($opft,'TXT')"/>
3691
- </xsl:when>
3692
- <xsl:when test="$norm-label = 'tiff'">
3693
- <xsl:value-of select="concat($opft,'TIFF')"/>
3694
- </xsl:when>
3695
- <xsl:when test="$norm-label = 'tmx'">
3696
- <xsl:value-of select="concat($opft,'TMX')"/>
3697
- </xsl:when>
3698
- <xsl:when test="$norm-label = 'tsv'">
3699
- <xsl:value-of select="concat($opft,'TSV')"/>
3700
- </xsl:when>
3701
- <xsl:when test="$norm-label = 'ttl'">
3702
- <xsl:value-of select="concat($opft,'RDF_TURTLE')"/>
3703
- </xsl:when>
3704
- <xsl:when test="$norm-label = 'turtle'">
3705
- <xsl:value-of select="concat($opft,'RDF_TURTLE')"/>
3706
- </xsl:when>
3707
- <xsl:when test="$norm-label = 'txt'">
3708
- <xsl:value-of select="concat($opft,'TXT')"/>
3709
- </xsl:when>
3710
- <xsl:when test="$norm-label = 'vcard-json'">
3711
- <!-- PROVISIONAL -->
3712
- <xsl:value-of select="concat($opft,'JSON')"/>
3713
- </xsl:when>
3714
- <xsl:when test="$norm-label = 'vcard-xml'">
3715
- <!-- PROVISIONAL -->
3716
- <xsl:value-of select="concat($opft,'XML')"/>
3717
- </xsl:when>
3718
- <xsl:when test="$norm-label = 'xbrl'">
3719
- <!-- PROVISIONAL -->
3720
- <xsl:value-of select="concat($opft,'XML')"/>
3721
- </xsl:when>
3722
- <xsl:when test="$norm-label = 'xhtml'">
3723
- <xsl:value-of select="concat($opft,'XHTML')"/>
3724
- </xsl:when>
3725
- <xsl:when test="$norm-label = 'xls'">
3726
- <xsl:value-of select="concat($opft,'XLS')"/>
3727
- </xsl:when>
3728
- <xsl:when test="$norm-label = 'xlsx'">
3729
- <xsl:value-of select="concat($opft,'XLSX')"/>
3730
- </xsl:when>
3731
- <xsl:when test="$norm-label = 'xml'">
3732
- <xsl:value-of select="concat($opft,'XML')"/>
3733
- </xsl:when>
3734
- <xsl:when test="$norm-label = 'wcs'">
3735
- <!-- PROVISIONAL -->
3736
- <xsl:value-of select="concat($opft,'TIFF')"/>
3737
- </xsl:when>
3738
- <xsl:when test="$norm-label = 'wfs'">
3739
- <!-- PROVISIONAL -->
3740
- <xsl:value-of select="concat($opft,'GML')"/>
3741
- </xsl:when>
3742
- <xsl:when test="$norm-label = 'wfs-g'">
3743
- <!-- PROVISIONAL -->
3744
- <xsl:value-of select="concat($opft,'GML')"/>
3745
- </xsl:when>
3746
- <xsl:when test="$norm-label = 'wmc'">
3747
- <!-- PROVISIONAL -->
3748
- <xsl:value-of select="concat($opft,'XML')"/>
3749
- </xsl:when>
3750
- <xsl:when test="$norm-label = 'wms'">
3751
- <!-- PROVISIONAL -->
3752
- <xsl:value-of select="concat($opft,'PNG')"/>
3753
- </xsl:when>
3754
- <xsl:when test="$norm-label = 'wmts'">
3755
- <!-- PROVISIONAL -->
3756
- <xsl:value-of select="concat($opft,'PNG')"/>
3757
- </xsl:when>
3758
- <xsl:when test="$norm-label = 'wps'">
3759
- <!-- PROVISIONAL -->
3760
- <xsl:value-of select="concat($opft,'GML')"/>
3761
- </xsl:when>
3762
- <xsl:when test="$norm-label = 'zip'">
3763
- <xsl:value-of select="concat($opft,'ZIP')"/>
3764
- </xsl:when>
3765
- <xsl:otherwise>
3766
- <!--
3767
- <xsl:value-of select="concat($opft,'OP_DATPRO')"/>
3768
- -->
3769
- </xsl:otherwise>
3770
- </xsl:choose>
3771
- </xsl:template>
3772
-
3773
- <!-- Maintenance information -->
3774
-
3775
- <xsl:template name="MaintenanceInformation" match="gmd:MD_MaintenanceInformation/gmd:maintenanceAndUpdateFrequency/gmd:MD_MaintenanceFrequencyCode">
3776
- <!-- The following parameter maps frequency codes used in ISO 19139 metadata to the corresponding ones of the Dublin Core Collection Description Frequency Vocabulary (when available). -->
3777
- <xsl:param name="FrequencyCodeURI">
3778
- <xsl:if test="@codeListValue != ''">
3779
- <xsl:choose>
3780
- <xsl:when test="@codeListValue = 'continual'">
3781
- <!-- DC Freq voc
3782
- <xsl:value-of select="concat($cldFrequency,'continuous')"/>
3783
- -->
3784
- <xsl:value-of select="concat($opfq,'CONT')"/>
3785
- </xsl:when>
3786
- <xsl:when test="@codeListValue = 'daily'">
3787
- <!-- DC Freq voc
3788
- <xsl:value-of select="concat($cldFrequency,'daily')"/>
3789
- -->
3790
- <xsl:value-of select="concat($opfq,'DAILY')"/>
3791
- </xsl:when>
3792
- <xsl:when test="@codeListValue = 'weekly'">
3793
- <!-- DC Freq voc
3794
- <xsl:value-of select="concat($cldFrequency,'weekly')"/>
3795
- -->
3796
- <xsl:value-of select="concat($opfq,'WEEKLY')"/>
3797
- </xsl:when>
3798
- <xsl:when test="@codeListValue = 'fortnightly'">
3799
- <!-- DC Freq voc
3800
- <xsl:value-of select="concat($cldFrequency,'biweekly')"/>
3801
- -->
3802
- <xsl:value-of select="concat($opfq,'BIWEEKLY')"/>
3803
- </xsl:when>
3804
- <xsl:when test="@codeListValue = 'monthly'">
3805
- <!-- DC Freq voc
3806
- <xsl:value-of select="concat($cldFrequency,'monthly')"/>
3807
- -->
3808
- <xsl:value-of select="concat($opfq,'MONTHLY')"/>
3809
- </xsl:when>
3810
- <xsl:when test="@codeListValue = 'quarterly'">
3811
- <!-- DC Freq voc
3812
- <xsl:value-of select="concat($cldFrequency,'quarterly')"/>
3813
- -->
3814
- <xsl:value-of select="concat($opfq,'QUARTERLY')"/>
3815
- </xsl:when>
3816
- <xsl:when test="@codeListValue = 'biannually'">
3817
- <!-- DC Freq voc
3818
- <xsl:value-of select="concat($cldFrequency,'semiannual')"/>
3819
- -->
3820
- <xsl:value-of select="concat($opfq,'ANNUAL_2')"/>
3821
- </xsl:when>
3822
- <xsl:when test="@codeListValue = 'annually'">
3823
- <!-- DC Freq voc
3824
- <xsl:value-of select="concat($cldFrequency,'annual')"/>
3825
- -->
3826
- <xsl:value-of select="concat($opfq,'ANNUAL')"/>
3827
- </xsl:when>
3828
- <xsl:when test="@codeListValue = 'asNeeded'">
3829
- <!-- A mapping is missing in Dublin Core -->
3830
- <!-- A mapping is missing in MDR Freq NAL -->
3831
- <xsl:value-of select="concat($MaintenanceFrequencyCodelistUri,'/',@codeListValue)"/>
3832
- </xsl:when>
3833
- <xsl:when test="@codeListValue = 'irregular'">
3834
- <!-- DC Freq voc
3835
- <xsl:value-of select="concat($cldFrequency,'irregular')"/>
3836
- -->
3837
- <xsl:value-of select="concat($opfq,'IRREG')"/>
3838
- </xsl:when>
3839
- <xsl:when test="@codeListValue = 'notPlanned'">
3840
- <!-- A mapping is missing in Dublin Core -->
3841
- <!-- A mapping is missing in MDR Freq NAL -->
3842
- <xsl:value-of select="concat($MaintenanceFrequencyCodelistUri,'/',@codeListValue)"/>
3843
- </xsl:when>
3844
- <xsl:when test="@codeListValue = 'unknown'">
3845
- <!-- A mapping is missing in Dublin Core -->
3846
- <!-- INSPIRE Freq code list (not yet available)
3847
- <xsl:value-of select="concat($MaintenanceFrequencyCodelistUri,'/',@codeListValue)"/>
3848
- -->
3849
- <xsl:value-of select="concat($opfq,'UNKNOWN')"/>
3850
- </xsl:when>
3851
- </xsl:choose>
3852
- </xsl:if>
3853
- </xsl:param>
3854
- <xsl:if test="$FrequencyCodeURI != ''">
3855
- <dct:accrualPeriodicity>
3856
- <dct:Frequency rdf:about="{$FrequencyCodeURI}"/>
3857
- </dct:accrualPeriodicity>
3858
- </xsl:if>
3859
- </xsl:template>
3860
-
3861
- <!-- Coordinate and temporal reference system (tentative) -->
3862
-
3863
- <xsl:template name="ReferenceSystem" match="gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier">
3864
- <xsl:param name="MetadataLanguage"/>
3865
- <xsl:param name="code" select="gmd:code/*[self::gco:CharacterString|gmx:Anchor]"/>
3866
- <xsl:param name="link" select="gmd:code/gmx:Anchor/@xlink:href"/>
3867
- <xsl:param name="codespace" select="gmd:codeSpace/*[self::gco:CharacterString|gmx:Anchor]"/>
3868
- <xsl:param name="version" select="gmd:version/*[self::gco:CharacterString|gmx:Anchor]"/>
3869
- <xsl:param name="version-statement">
3870
- <xsl:if test="$profile = $extended">
3871
- <xsl:if test="$version != ''">
3872
- <owl:versionInfo xml:lang="{$MetadataLanguage}"><xsl:value-of select="$version"/></owl:versionInfo>
3873
- </xsl:if>
3874
- </xsl:if>
3875
- </xsl:param>
3876
-
3877
- <xsl:choose>
3878
- <xsl:when test="starts-with($link, 'http://') or starts-with($link, 'https://')">
3879
- <dct:conformsTo>
3880
- <rdf:Description rdf:about="{$link}">
3881
- <rdf:type rdf:resource="{$dct}Standard"/>
3882
- <dct:type rdf:resource="{$INSPIREGlossaryUri}SpatialReferenceSystem"/>
3883
- </rdf:Description>
3884
- </dct:conformsTo>
3885
- </xsl:when>
3886
- <xsl:when test="starts-with($code, 'http://') or starts-with($code, 'https://')">
3887
- <dct:conformsTo>
3888
- <rdf:Description rdf:about="{$code}">
3889
- <rdf:type rdf:resource="{$dct}Standard"/>
3890
- <dct:type rdf:resource="{$INSPIREGlossaryUri}SpatialReferenceSystem"/>
3891
- </rdf:Description>
3892
- </dct:conformsTo>
3893
- </xsl:when>
3894
- <xsl:when test="starts-with($code, 'urn:')">
3895
- <xsl:variable name="srid">
3896
- <xsl:if test="starts-with(translate($code,$uppercase,$lowercase), translate($EpsgSrsBaseUrn,$uppercase,$lowercase))">
3897
- <xsl:value-of select="substring-after(substring-after(substring-after(substring-after(substring-after(substring-after($code,':'),':'),':'),':'),':'),':')"/>
3898
- </xsl:if>
3899
- </xsl:variable>
3900
- <xsl:variable name="sridVersion" select="substring-before(substring-after(substring-after(substring-after(substring-after(substring-after($code,':'),':'),':'),':'),':'),':')"/>
3901
- <xsl:choose>
3902
- <xsl:when test="$srid != '' and string(number($srid)) != 'NaN'">
3903
- <dct:conformsTo>
3904
- <rdf:Description rdf:about="{$EpsgSrsBaseUri}/{$srid}">
3905
- <rdf:type rdf:resource="{$dct}Standard"/>
3906
- <rdf:type rdf:resource="{$skos}Concept"/>
3907
- <dct:type rdf:resource="{$INSPIREGlossaryUri}SpatialReferenceSystem"/>
3908
- <dct:identifier rdf:datatype="{$xsd}anyURI"><xsl:value-of select="$code"/></dct:identifier>
3909
- <skos:notation rdf:datatype="{$xsd}anyURI"><xsl:value-of select="$code"/></skos:notation>
3910
- <skos:inScheme>
3911
- <skos:ConceptScheme rdf:about="{$EpsgSrsBaseUri}">
3912
- <dct:title xml:lang="en">
3913
- <xsl:value-of select="$EpsgSrsName"/>
3914
- </dct:title>
3915
- </skos:ConceptScheme>
3916
- </skos:inScheme>
3917
- <xsl:copy-of select="$version-statement"/>
3918
- </rdf:Description>
3919
- </dct:conformsTo>
3920
- </xsl:when>
3921
- <xsl:otherwise>
3922
- <dct:conformsTo rdf:parseType="Resource">
3923
- <rdf:type rdf:resource="{$dct}Standard"/>
3924
- <dct:type rdf:resource="{$INSPIREGlossaryUri}SpatialReferenceSystem"/>
3925
- <dct:identifier rdf:datatype="{$xsd}anyURI"><xsl:value-of select="$code"/></dct:identifier>
3926
- <xsl:if test="$codespace != ''">
3927
- <rdf:type rdf:resource="{$skos}Concept"/>
3928
- <skos:notation rdf:datatype="{$xsd}anyURI"><xsl:value-of select="$code"/></skos:notation>
3929
- <skos:inScheme>
3930
- <skos:ConceptScheme>
3931
- <dct:title xml:lang="{$MetadataLanguage}">
3932
- <xsl:value-of select="$codespace"/>
3933
- </dct:title>
3934
- </skos:ConceptScheme>
3935
- </skos:inScheme>
3936
- </xsl:if>
3937
- <xsl:copy-of select="$version-statement"/>
3938
- </dct:conformsTo>
3939
- </xsl:otherwise>
3940
- </xsl:choose>
3941
- </xsl:when>
3942
- <xsl:otherwise>
3943
- <xsl:choose>
3944
- <xsl:when test="$code = number($code) and (translate($codespace,$uppercase,$lowercase) = 'epsg' or starts-with(translate($codespace,$uppercase,$lowercase),translate($EpsgSrsBaseUrn,$uppercase,$lowercase)))">
3945
- <dct:conformsTo>
3946
- <rdf:Description rdf:about="{$EpsgSrsBaseUri}/{$code}">
3947
- <rdf:type rdf:resource="{$dct}Standard"/>
3948
- <rdf:type rdf:resource="{$skos}Concept"/>
3949
- <dct:type rdf:resource="{$INSPIREGlossaryUri}SpatialReferenceSystem"/>
3950
- <dct:identifier rdf:datatype="{$xsd}anyURI"><xsl:value-of select="concat($EpsgSrsBaseUrn,':',$version,':',$code)"/></dct:identifier>
3951
- <skos:notation rdf:datatype="{$xsd}anyURI"><xsl:value-of select="concat($EpsgSrsBaseUrn,':',$version,':',$code)"/></skos:notation>
3952
- <skos:inScheme>
3953
- <skos:ConceptScheme rdf:about="{$EpsgSrsBaseUri}">
3954
- <dct:title xml:lang="en">
3955
- <xsl:value-of select="$EpsgSrsName"/>
3956
- </dct:title>
3957
- </skos:ConceptScheme>
3958
- </skos:inScheme>
3959
- <xsl:copy-of select="$version-statement"/>
3960
- </rdf:Description>
3961
- </dct:conformsTo>
3962
- </xsl:when>
3963
- <xsl:when test="translate(normalize-space(translate($code,$uppercase,$lowercase)),': ','') = 'etrs89'">
3964
- <dct:conformsTo>
3965
- <rdf:Description rdf:about="{$Etrs89Uri}">
3966
- <rdf:type rdf:resource="{$dct}Standard"/>
3967
- <rdf:type rdf:resource="{$skos}Concept"/>
3968
- <dct:type rdf:resource="{$INSPIREGlossaryUri}SpatialReferenceSystem"/>
3969
- <dct:identifier rdf:datatype="{$xsd}anyURI"><xsl:value-of select="$Etrs89Urn"/></dct:identifier>
3970
- <skos:notation rdf:datatype="{$xsd}anyURI"><xsl:value-of select="$Etrs89Urn"/></skos:notation>
3971
- <dct:title xml:lang="en">ETRS89 - European Terrestrial Reference System 1989</dct:title>
3972
- <skos:prefLabel xml:lang="en">ETRS89 - European Terrestrial Reference System 1989</skos:prefLabel>
3973
- <skos:inScheme>
3974
- <skos:ConceptScheme rdf:about="{$EpsgSrsBaseUri}">
3975
- <dct:title xml:lang="en">
3976
- <xsl:value-of select="$EpsgSrsName"/>
3977
- </dct:title>
3978
- </skos:ConceptScheme>
3979
- </skos:inScheme>
3980
- <xsl:copy-of select="$version-statement"/>
3981
- </rdf:Description>
3982
- </dct:conformsTo>
3983
- </xsl:when>
3984
- <xsl:when test="translate(normalize-space(translate($code,$uppercase,$lowercase)),': ','') = 'crs84'">
3985
- <dct:conformsTo>
3986
- <rdf:Description rdf:about="{$Crs84Uri}">
3987
- <rdf:type rdf:resource="{$dct}Standard"/>
3988
- <rdf:type rdf:resource="{$skos}Concept"/>
3989
- <dct:type rdf:resource="{$INSPIREGlossaryUri}SpatialReferenceSystem"/>
3990
- <dct:identifier rdf:datatype="{$xsd}anyURI"><xsl:value-of select="$Crs84Urn"/></dct:identifier>
3991
- <skos:notation rdf:datatype="{$xsd}anyURI"><xsl:value-of select="$Crs84Urn"/></skos:notation>
3992
- <dct:title xml:lang="en">CRS84</dct:title>
3993
- <skos:prefLabel xml:lang="en">CRS84</skos:prefLabel>
3994
- <skos:inScheme>
3995
- <skos:ConceptScheme rdf:about="{$OgcSrsBaseUri}">
3996
- <dct:title xml:lang="en">
3997
- <xsl:value-of select="$OgcSrsName"/>
3998
- </dct:title>
3999
- </skos:ConceptScheme>
4000
- </skos:inScheme>
4001
- <xsl:copy-of select="$version-statement"/>
4002
- </rdf:Description>
4003
- </dct:conformsTo>
4004
- </xsl:when>
4005
- <xsl:otherwise>
4006
- <dct:conformsTo rdf:parseType="Resource">
4007
- <rdf:type rdf:resource="{$dct}Standard"/>
4008
- <rdf:type rdf:resource="{$skos}Concept"/>
4009
- <dct:type rdf:resource="{$INSPIREGlossaryUri}SpatialReferenceSystem"/>
4010
- <dct:title xml:lang="{$MetadataLanguage}">
4011
- <xsl:value-of select="$code"/>
4012
- </dct:title>
4013
- <xsl:if test="$codespace != ''">
4014
- <skos:prefLabel xml:lang="{$MetadataLanguage}">
4015
- <xsl:value-of select="$code"/>
4016
- </skos:prefLabel>
4017
- <skos:inScheme>
4018
- <skos:ConceptScheme>
4019
- <dct:title xml:lang="{$MetadataLanguage}">
4020
- <xsl:value-of select="$codespace"/>
4021
- </dct:title>
4022
- </skos:ConceptScheme>
4023
- </skos:inScheme>
4024
- </xsl:if>
4025
- <xsl:copy-of select="$version-statement"/>
4026
- </dct:conformsTo>
4027
- </xsl:otherwise>
4028
- </xsl:choose>
4029
- </xsl:otherwise>
4030
- </xsl:choose>
4031
- </xsl:template>
4032
-
4033
- <!-- Spatial representation type (tentative) -->
4034
-
4035
- <xsl:template name="SpatialRepresentationType" match="gmd:identificationInfo/*/gmd:spatialRepresentationType/gmd:MD_SpatialRepresentationTypeCode">
4036
- <adms:representationTechnique rdf:resource="{$SpatialRepresentationTypeCodelistUri}/{@codeListValue}"/>
4037
- </xsl:template>
4038
-
4039
- <!-- Multilingual text -->
4040
-
4041
- <xsl:template name="LocalisedString">
4042
- <xsl:param name="term"/>
4043
- <xsl:for-each select="gmd:PT_FreeText/*/gmd:LocalisedCharacterString">
4044
- <xsl:variable name="value" select="normalize-space(.)"/>
4045
- <xsl:variable name="langs">
4046
- <xsl:call-template name="Alpha3-to-Alpha2">
4047
- <xsl:with-param name="lang" select="translate(translate(@locale, $uppercase, $lowercase), '#', '')"/>
4048
- </xsl:call-template>
4049
- </xsl:variable>
4050
- <xsl:if test="$value != ''">
4051
- <xsl:element name="{$term}">
4052
- <xsl:attribute name="xml:lang"><xsl:value-of select="$langs"/></xsl:attribute>
4053
- <xsl:value-of select="$value"/>
4054
- </xsl:element>
4055
- </xsl:if>
4056
- </xsl:for-each>
4057
- </xsl:template>
4058
-
4059
- <xsl:template name="Alpha3-to-Alpha2">
4060
- <xsl:param name="lang"/>
4061
- <xsl:choose>
4062
- <xsl:when test="$lang = 'bul'">
4063
- <xsl:text>bg</xsl:text>
4064
- </xsl:when>
4065
- <xsl:when test="$lang = 'cze'">
4066
- <xsl:text>cs</xsl:text>
4067
- </xsl:when>
4068
- <xsl:when test="$lang = 'dan'">
4069
- <xsl:text>da</xsl:text>
4070
- </xsl:when>
4071
- <xsl:when test="$lang = 'ger'">
4072
- <xsl:text>de</xsl:text>
4073
- </xsl:when>
4074
- <xsl:when test="$lang = 'gre'">
4075
- <xsl:text>el</xsl:text>
4076
- </xsl:when>
4077
- <xsl:when test="$lang = 'eng'">
4078
- <xsl:text>en</xsl:text>
4079
- </xsl:when>
4080
- <xsl:when test="$lang = 'spa'">
4081
- <xsl:text>es</xsl:text>
4082
- </xsl:when>
4083
- <xsl:when test="$lang = 'est'">
4084
- <xsl:text>et</xsl:text>
4085
- </xsl:when>
4086
- <xsl:when test="$lang = 'fin'">
4087
- <xsl:text>fi</xsl:text>
4088
- </xsl:when>
4089
- <xsl:when test="$lang = 'fre'">
4090
- <xsl:text>fr</xsl:text>
4091
- </xsl:when>
4092
- <xsl:when test="$lang = 'gle'">
4093
- <xsl:text>ga</xsl:text>
4094
- </xsl:when>
4095
- <xsl:when test="$lang = 'hrv'">
4096
- <xsl:text>hr</xsl:text>
4097
- </xsl:when>
4098
- <xsl:when test="$lang = 'ita'">
4099
- <xsl:text>it</xsl:text>
4100
- </xsl:when>
4101
- <xsl:when test="$lang = 'lav'">
4102
- <xsl:text>lv</xsl:text>
4103
- </xsl:when>
4104
- <xsl:when test="$lang = 'lit'">
4105
- <xsl:text>lt</xsl:text>
4106
- </xsl:when>
4107
- <xsl:when test="$lang = 'hun'">
4108
- <xsl:text>hu</xsl:text>
4109
- </xsl:when>
4110
- <xsl:when test="$lang = 'mlt'">
4111
- <xsl:text>mt</xsl:text>
4112
- </xsl:when>
4113
- <xsl:when test="$lang = 'dut'">
4114
- <xsl:text>nl</xsl:text>
4115
- </xsl:when>
4116
- <xsl:when test="$lang = 'pol'">
4117
- <xsl:text>pl</xsl:text>
4118
- </xsl:when>
4119
- <xsl:when test="$lang = 'por'">
4120
- <xsl:text>pt</xsl:text>
4121
- </xsl:when>
4122
- <xsl:when test="$lang = 'rum'">
4123
- <xsl:text>ru</xsl:text>
4124
- </xsl:when>
4125
- <xsl:when test="$lang = 'slo'">
4126
- <xsl:text>sk</xsl:text>
4127
- </xsl:when>
4128
- <xsl:when test="$lang = 'slv'">
4129
- <xsl:text>sl</xsl:text>
4130
- </xsl:when>
4131
- <xsl:when test="$lang = 'swe'">
4132
- <xsl:text>sv</xsl:text>
4133
- </xsl:when>
4134
- <xsl:otherwise>
4135
- <xsl:value-of select="$lang"/>
4136
- </xsl:otherwise>
4137
- </xsl:choose>
4138
- </xsl:template>
4139
-
4140
- <!-- Templates for services and distributions pointing to services -->
4141
-
4142
- <xsl:template name="detect-service">
4143
- <xsl:param name="function"/>
4144
- <xsl:param name="protocol"/>
4145
- <xsl:param name="url"/>
4146
- <xsl:choose>
4147
- <xsl:when test="contains(substring-after(translate($url, $uppercase, $lowercase), '?'), 'request=getcapabilities')">
4148
- <xsl:text>yes</xsl:text>
4149
- </xsl:when>
4150
- <xsl:otherwise>
4151
- <xsl:text>no</xsl:text>
4152
- </xsl:otherwise>
4153
- </xsl:choose>
4154
- </xsl:template>
4155
-
4156
- <xsl:template name="service-protocol-code">
4157
- <xsl:param name="function"/>
4158
- <xsl:param name="protocol"/>
4159
- <xsl:param name="url"/>
4160
- <xsl:choose>
4161
- <xsl:when test="contains(substring-after(translate($url, $uppercase, $lowercase), '?'), 'service=csw')">
4162
- <xsl:text>csw</xsl:text>
4163
- </xsl:when>
4164
- <xsl:when test="translate($protocol, $uppercase, $lowercase) = 'ogc:csw'">
4165
- <xsl:text>csw</xsl:text>
4166
- </xsl:when>
4167
- <xsl:when test="contains(substring-after(translate($url, $uppercase, $lowercase), '?'), 'service=sos')">
4168
- <xsl:text>sos</xsl:text>
4169
- </xsl:when>
4170
- <xsl:when test="translate($protocol, $uppercase, $lowercase) = 'ogc:sos'">
4171
- <xsl:text>sos</xsl:text>
4172
- </xsl:when>
4173
- <xsl:when test="contains(substring-after(translate($url, $uppercase, $lowercase), '?'), 'service=sps')">
4174
- <xsl:text>sps</xsl:text>
4175
- </xsl:when>
4176
- <xsl:when test="translate($protocol, $uppercase, $lowercase) = 'ogc:sps'">
4177
- <xsl:text>sps</xsl:text>
4178
- </xsl:when>
4179
- <xsl:when test="contains(substring-after(translate($url, $uppercase, $lowercase), '?'), 'service=wcs')">
4180
- <xsl:text>wcs</xsl:text>
4181
- </xsl:when>
4182
- <xsl:when test="translate($protocol, $uppercase, $lowercase) = 'ogc:wcs'">
4183
- <xsl:text>wcs</xsl:text>
4184
- </xsl:when>
4185
- <xsl:when test="contains(substring-after(translate($url, $uppercase, $lowercase), '?'), 'service=wfs')">
4186
- <xsl:text>wfs</xsl:text>
4187
- </xsl:when>
4188
- <xsl:when test="translate($protocol, $uppercase, $lowercase) = 'ogc:wfs'">
4189
- <xsl:text>wfs</xsl:text>
4190
- </xsl:when>
4191
- <xsl:when test="contains(substring-after(translate($url, $uppercase, $lowercase), '?'), 'service=wms')">
4192
- <xsl:text>wms</xsl:text>
4193
- </xsl:when>
4194
- <xsl:when test="translate($protocol, $uppercase, $lowercase) = 'ogc:wms'">
4195
- <xsl:text>wms</xsl:text>
4196
- </xsl:when>
4197
- <xsl:when test="contains(substring-after(translate($url, $uppercase, $lowercase), '?'), 'service=wmts')">
4198
- <xsl:text>wmts</xsl:text>
4199
- </xsl:when>
4200
- <xsl:when test="translate($protocol, $uppercase, $lowercase) = 'ogc:wmts'">
4201
- <xsl:text>wmts</xsl:text>
4202
- </xsl:when>
4203
- <xsl:when test="contains(substring-after(translate($url, $uppercase, $lowercase), '?'), 'service=wps')">
4204
- <xsl:text>wps</xsl:text>
4205
- </xsl:when>
4206
- <xsl:when test="translate($protocol, $uppercase, $lowercase) = 'ogc:wps'">
4207
- <xsl:text>wps</xsl:text>
4208
- </xsl:when>
4209
- </xsl:choose>
4210
- </xsl:template>
4211
-
4212
- <xsl:template name="service-protocol-url">
4213
- <xsl:param name="protocol"/>
4214
- <xsl:choose>
4215
- <xsl:when test="$protocol = 'csw'">
4216
- <xsl:text>http://www.opengeospatial.org/standards/cat</xsl:text>
4217
- </xsl:when>
4218
- <xsl:when test="$protocol = 'sos'">
4219
- <xsl:text>http://www.opengeospatial.org/standards/sos</xsl:text>
4220
- </xsl:when>
4221
- <xsl:when test="$protocol = 'sps'">
4222
- <xsl:text>http://www.opengeospatial.org/standards/sps</xsl:text>
4223
- </xsl:when>
4224
- <xsl:when test="$protocol = 'wcs'">
4225
- <xsl:text>http://www.opengeospatial.org/standards/wcs</xsl:text>
4226
- </xsl:when>
4227
- <xsl:when test="$protocol = 'wfs'">
4228
- <xsl:text>http://www.opengeospatial.org/standards/wfs</xsl:text>
4229
- </xsl:when>
4230
- <xsl:when test="$protocol = 'wms'">
4231
- <xsl:text>http://www.opengeospatial.org/standards/wms</xsl:text>
4232
- </xsl:when>
4233
- <xsl:when test="$protocol = 'wmts'">
4234
- <xsl:text>http://www.opengeospatial.org/standards/wmts</xsl:text>
4235
- </xsl:when>
4236
- <xsl:when test="$protocol = 'wps'">
4237
- <xsl:text>http://www.opengeospatial.org/standards/wps</xsl:text>
4238
- </xsl:when>
4239
- </xsl:choose>
4240
- </xsl:template>
4241
-
4242
- <xsl:template name="service-protocol">
4243
- <xsl:param name="function"/>
4244
- <xsl:param name="protocol"/>
4245
- <xsl:param name="url"/>
4246
- <xsl:param name="protocol-url">
4247
- <xsl:call-template name="service-protocol-url">
4248
- <xsl:with-param name="protocol">
4249
- <xsl:call-template name="service-protocol-code">
4250
- <xsl:with-param name="function" select="$function"/>
4251
- <xsl:with-param name="protocol" select="$protocol"/>
4252
- <xsl:with-param name="url" select="$url"/>
4253
- </xsl:call-template>
4254
- </xsl:with-param>
4255
- </xsl:call-template>
4256
- </xsl:param>
4257
- <xsl:if test="$protocol-url != ''">
4258
- <dct:conformsTo>
4259
- <dct:Standard rdf:about="{$protocol-url}"/>
4260
- </dct:conformsTo>
4261
- </xsl:if>
4262
- </xsl:template>
4263
-
4264
- <xsl:template name="service-endpoint">
4265
- <xsl:param name="function"/>
4266
- <xsl:param name="protocol"/>
4267
- <xsl:param name="url"/>
4268
- <xsl:param name="endpoint-url">
4269
- <xsl:choose>
4270
- <xsl:when test="contains($url, '?')">
4271
- <xsl:value-of select="substring-before($url, '?')"/>
4272
- </xsl:when>
4273
- <xsl:otherwise>
4274
- <xsl:value-of select="$url"/>
4275
- </xsl:otherwise>
4276
- </xsl:choose>
4277
- </xsl:param>
4278
- <xsl:param name="endpoint-description">
4279
- <xsl:choose>
4280
- <xsl:when test="contains(substring-after(translate($url, $uppercase, $lowercase), '?'), 'request=getcapabilities')">
4281
- <xsl:value-of select="$url"/>
4282
- </xsl:when>
4283
- <xsl:otherwise>
4284
- <xsl:value-of select="$url"/>
4285
- </xsl:otherwise>
4286
- </xsl:choose>
4287
- </xsl:param>
4288
- <xsl:param name="service-type">
4289
- </xsl:param>
4290
- <xsl:if test="$endpoint-url != ''">
4291
- <dcat:endpointURL rdf:resource="{$endpoint-url}"/>
4292
- </xsl:if>
4293
- <xsl:if test="$endpoint-description != ''">
4294
- <dcat:endpointDescription rdf:resource="{$endpoint-description}"/>
4295
- </xsl:if>
4296
- </xsl:template>
4297
-
4298
- </xsl:transform>