diff --git a/owslib/iso.py b/owslib/iso.py index d1d191d9..dcc54b9e 100644 --- a/owslib/iso.py +++ b/owslib/iso.py @@ -502,6 +502,15 @@ def __init__(self, md=None, identtype=None): val = util.testXMLValue(i) if val is not None: self.otherconstraints.append(val) + for i in md.findall(util.nspath_eval( + 'gmd:resourceConstraints/gmd:MD_LegalConstraints/gmd:otherConstraints/gmx:Anchor', + namespaces)): + val = util.testXMLAttribute(i, util.nspath('href', namespaces["xlink"])) + if val is None: + val = util.testXMLValue(i) + if val is not None: + self.otherconstraints.append(val) + self.securityconstraints = [] for i in md.findall(util.nspath_eval( diff --git a/tests/resources/csw_dov_getrecordbyid.xml b/tests/resources/csw_dov_getrecordbyid.xml index a78c2930..24635e44 100644 --- a/tests/resources/csw_dov_getrecordbyid.xml +++ b/tests/resources/csw_dov_getrecordbyid.xml @@ -1,6 +1,6 @@ - + 6c39d716-aecc-4fbc-bac8-4f05a49a78d5 @@ -470,6 +470,9 @@ Data beschikbaar voor hergebruik volgens de Modellicentie Gratis Hergebruik. Toelichting beschikbaar op https://www.dov.vlaanderen.be/page/gebruiksvoorwaarden-dov-services + + Geen beperkingen + @@ -841,4 +844,3 @@ - diff --git a/tests/test_iso_parsing.py b/tests/test_iso_parsing.py index 737539ee..cb0e2cbc 100644 --- a/tests/test_iso_parsing.py +++ b/tests/test_iso_parsing.py @@ -137,7 +137,9 @@ def test_md_parsing_dov(): assert_list(iden.classification, 0) - assert_list(iden.otherconstraints, 1) + assert_list(iden.otherconstraints, 2) + assert iden.otherconstraints[ + 1] == "https://inspire.ec.europa.eu/metadata-codelist/ConditionsApplyingToAccessAndUse/noConditionsApply" assert iden.otherconstraints[ 0] == "Data beschikbaar voor hergebruik volgens de " \ "Modellicentie Gratis Hergebruik. Toelichting " \