diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e135422..bf441d5 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,6 +8,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +[v0.4.2] - 2023-09-14 +--------------------- + +Fixed +~~~~~ + +* removes specific xpath of `_hierachy_level` which depends on `codeList` attribute to collect the codeListValue anyway + [v0.4.1] - 2023-05-26 --------------------- diff --git a/ows_lib/__init__.py b/ows_lib/__init__.py index 914505a..48fcd7c 100644 --- a/ows_lib/__init__.py +++ b/ows_lib/__init__.py @@ -1,2 +1,2 @@ -__version__ = "0.4.1" +__version__ = "0.4.2" VERSION = __version__ # synonym diff --git a/ows_lib/xml_mapper/iso_metadata/iso_metadata.py b/ows_lib/xml_mapper/iso_metadata/iso_metadata.py index b5688c6..e8e5a18 100644 --- a/ows_lib/xml_mapper/iso_metadata/iso_metadata.py +++ b/ows_lib/xml_mapper/iso_metadata/iso_metadata.py @@ -289,8 +289,15 @@ class MdMetadata(BaseIsoMetadata): file_identifier = xmlmap.StringField( xpath="gmd:fileIdentifier/gco:CharacterString") # language = xmlmap.StringField(xpath=f"{NS_WC}identificationInfo']//{NS_WC}language']/{NS_WC}LanguageCode']") + + # TODO: add a default value such as http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_ScopeCode for example? + _hierarchy_level_code_list = xmlmap.StringField( + xpath="gmd:hierarchyLevel/gmd:MD_ScopeCode/@codeList" + + ) _hierarchy_level = xmlmap.StringField( - xpath="gmd:hierarchyLevel/gmd:MD_ScopeCode[@codeList='http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#MD_ScopeCode']/@codeListValue") + xpath="gmd:hierarchyLevel/gmd:MD_ScopeCode/@codeListValue") + _date_stamp_date = xmlmap.DateField(xpath="gmd:dateStamp/gco:Date") _date_stamp_date_time = xmlmap.DateTimeField( xpath="gmd:dateStamp/gco:DateTime")