From 6d29b2f7830b0bb577c37e609e2e02fb74e629ee Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Tue, 4 Mar 2025 16:27:21 +0100 Subject: [PATCH 1/3] Fix incorrect TIME Namespace in ckanext-dcat --- ckanext/dcat/profiles/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext/dcat/profiles/base.py b/ckanext/dcat/profiles/base.py index 4496c50f..29802793 100644 --- a/ckanext/dcat/profiles/base.py +++ b/ckanext/dcat/profiles/base.py @@ -23,7 +23,7 @@ VCARD = Namespace("http://www.w3.org/2006/vcard/ns#") FOAF = Namespace("http://xmlns.com/foaf/0.1/") SCHEMA = Namespace("http://schema.org/") -TIME = Namespace("http://www.w3.org/2006/time") +TIME = Namespace("http://www.w3.org/2006/time#") LOCN = Namespace("http://www.w3.org/ns/locn#") GSP = Namespace("http://www.opengis.net/ont/geosparql#") OWL = Namespace("http://www.w3.org/2002/07/owl#") From 3f10de66a5218b4a9654e4193226ceb995345648 Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Wed, 5 Mar 2025 10:58:01 +0000 Subject: [PATCH 2/3] Fix TIME namespace in tests --- .../dcat/tests/profiles/base/test_base_profile.py | 14 +++++++------- .../dcat_ap_2/test_euro_dcatap_2_profile_parse.py | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ckanext/dcat/tests/profiles/base/test_base_profile.py b/ckanext/dcat/tests/profiles/base/test_base_profile.py index 42d36f78..da280132 100644 --- a/ckanext/dcat/tests/profiles/base/test_base_profile.py +++ b/ckanext/dcat/tests/profiles/base/test_base_profile.py @@ -500,7 +500,7 @@ def test_time_interval_w3c_time_inXSDDateTime(self): data = ''' @@ -538,7 +538,7 @@ def test_time_interval_w3c_time_inXSDDateTimeStamp(self): data = ''' @@ -576,7 +576,7 @@ def test_time_interval_w3c_time_inXSDDate(self): data = ''' @@ -617,7 +617,7 @@ def test_time_interval_multiple_w3c_time(self): data = ''' @@ -696,7 +696,7 @@ def test_time_interval_all_dcat_ap_2_dcat_found(self): xmlns:dct="http://purl.org/dc/terms/" xmlns:dcat="http://www.w3.org/ns/dcat#" xmlns:schema="http://schema.org/" - xmlns:time="http://www.w3.org/2006/time" + xmlns:time="http://www.w3.org/2006/time#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> @@ -753,7 +753,7 @@ def test_time_interval_all_dcat_ap_1_schema_org_found(self): xmlns:dct="http://purl.org/dc/terms/" xmlns:dcat="http://www.w3.org/ns/dcat#" xmlns:schema="http://schema.org/" - xmlns:time="http://www.w3.org/2006/time" + xmlns:time="http://www.w3.org/2006/time#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> @@ -811,7 +811,7 @@ def test_time_interval_all_dcat_ap_2_w3c_time_found(self): xmlns:dct="http://purl.org/dc/terms/" xmlns:dcat="http://www.w3.org/ns/dcat#" xmlns:schema="http://schema.org/" - xmlns:time="http://www.w3.org/2006/time" + xmlns:time="http://www.w3.org/2006/time#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> diff --git a/ckanext/dcat/tests/profiles/dcat_ap_2/test_euro_dcatap_2_profile_parse.py b/ckanext/dcat/tests/profiles/dcat_ap_2/test_euro_dcatap_2_profile_parse.py index 04363e2f..8573cbab 100644 --- a/ckanext/dcat/tests/profiles/dcat_ap_2/test_euro_dcatap_2_profile_parse.py +++ b/ckanext/dcat/tests/profiles/dcat_ap_2/test_euro_dcatap_2_profile_parse.py @@ -44,7 +44,7 @@ def test_dataset_all_fields(self): xmlns:dcat="http://www.w3.org/ns/dcat#" xmlns:dcatap="http://data.europa.eu/r5r/" xmlns:schema="http://schema.org/" - xmlns:time="http://www.w3.org/2006/time" + xmlns:time="http://www.w3.org/2006/time#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> @@ -171,7 +171,7 @@ def test_availability_distibutions_without_uri(self): xmlns:dcat="http://www.w3.org/ns/dcat#" xmlns:dcatap="http://data.europa.eu/r5r/" xmlns:schema="http://schema.org/" - xmlns:time="http://www.w3.org/2006/time" + xmlns:time="http://www.w3.org/2006/time#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> @@ -217,7 +217,7 @@ def test_availability_multiple_distibutions(self): xmlns:dcat="http://www.w3.org/ns/dcat#" xmlns:dcatap="http://data.europa.eu/r5r/" xmlns:schema="http://schema.org/" - xmlns:time="http://www.w3.org/2006/time" + xmlns:time="http://www.w3.org/2006/time#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> @@ -283,7 +283,7 @@ def test_dataset_all_fields_literal(self): xmlns:dcat="http://www.w3.org/ns/dcat#" xmlns:dcatap="http://data.europa.eu/r5r/" xmlns:schema="http://schema.org/" - xmlns:time="http://www.w3.org/2006/time" + xmlns:time="http://www.w3.org/2006/time#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> @@ -401,7 +401,7 @@ def test_high_value_datasets(self): xmlns:dcat="http://www.w3.org/ns/dcat#" xmlns:dcatap="http://data.europa.eu/r5r/" xmlns:schema="http://schema.org/" - xmlns:time="http://www.w3.org/2006/time" + xmlns:time="http://www.w3.org/2006/time#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> @@ -510,7 +510,7 @@ def test_dataset_distribution_access_service_list_values_only(self): xmlns:dcat="http://www.w3.org/ns/dcat#" xmlns:dcatap="http://data.europa.eu/r5r/" xmlns:schema="http://schema.org/" - xmlns:time="http://www.w3.org/2006/time" + xmlns:time="http://www.w3.org/2006/time#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> @@ -620,7 +620,7 @@ def _run_parse_access_service(self, expected_access_services): xmlns:dcat="http://www.w3.org/ns/dcat#" xmlns:dcatap="http://data.europa.eu/r5r/" xmlns:schema="http://schema.org/" - xmlns:time="http://www.w3.org/2006/time" + xmlns:time="http://www.w3.org/2006/time#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> From 4a47c101d17cfb48ba2c1d4230ca7b12141ad853 Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Fri, 14 Mar 2025 12:04:01 +0100 Subject: [PATCH 3/3] Update changelog. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6193607..bbfa3e50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## [Unreleased](https://github.com/ckan/ckanext-dcat/compare/v2.3.0...HEAD) +* Fix TIME namespace definition to include trailing hash (`#`), ensuring compliance with W3C Time Ontology and DCAT-AP. This may require updates for custom profiles relying on the old variant. ([#344](https://github.com/ckan/ckanext-dcat/pull/344)) * Add missing URIRefOrLiteral import in profiles module. ([#343](https://github.com/ckan/ckanext-dcat/pull/343)) ## [v2.3.0](https://github.com/ckan/ckanext-dcat/compare/v2.2.0...v2.3.0) - 2025-02-25