Skip to content

Commit

Permalink
add tests for anchor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pvgenuchten committed Oct 8, 2024
1 parent a8b0a2c commit 06261a5
Show file tree
Hide file tree
Showing 3 changed files with 645 additions and 3 deletions.
13 changes: 10 additions & 3 deletions owslib/iso.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ def __init__(self, md=None, identtype=None):
namespaces))
for i in _values:
val = util.testXMLValue(i)
if val is not None:
if val not in [None,'']:
self.uricode.append(val)

_values = md.findall(util.nspath_eval(
Expand All @@ -425,17 +425,24 @@ def __init__(self, md=None, identtype=None):
namespaces))
for i in _values:
val = util.testXMLValue(i.attrib.get('xlink:href'), True)
if val is not None:
if val not in [None,'']:
self.uricode.append(val)

self.uricodespace = []
for i in md.findall(util.nspath_eval(
'gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:RS_Identifier/gmd:codeSpace/gco:CharacterString',
namespaces)):
val = util.testXMLValue(i)
if val is not None:
if val not in [None,'']:
self.uricodespace.append(val)
for i in md.findall(util.nspath_eval(
'gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:RS_Identifier/gmd:codeSpace/gmx:Anchor',
namespaces)):
val = util.testXMLValue(i.attrib.get('xlink:href'), True)
if val not in [None,'']:
self.uricodespace.append(val)


self.date = []
self.datetype = []

Expand Down
Loading

0 comments on commit 06261a5

Please sign in to comment.