Skip to content

Commit

Permalink
adds support for gmx:anchor in gmd:identifier, fixes #946
Browse files Browse the repository at this point in the history
  • Loading branch information
pvgenuchten committed Oct 4, 2024
1 parent f620405 commit a8b0a2c
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions owslib/iso.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,15 +407,26 @@ def __init__(self, md=None, identtype=None):

self.uricode = []
_values = md.findall(util.nspath_eval(
'gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:RS_Identifier/gmd:code/gco:CharacterString',
'gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:MD_Identifier/gmd:code/gco:CharacterString',
namespaces))
_values += md.findall(util.nspath_eval(
'gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:MD_Identifier/gmd:code/gco:CharacterString',
'gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:RS_Identifier/gmd:code/gco:CharacterString',
namespaces))
for i in _values:
val = util.testXMLValue(i)
if val is not None:
self.uricode.append(val)

_values = md.findall(util.nspath_eval(
'gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:MD_Identifier/gmd:code/gmx:Anchor',
namespaces))
_values += md.findall(util.nspath_eval(
'gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:RS_Identifier/gmd:code/gmx:Anchor',
namespaces))
for i in _values:
val = util.testXMLValue(i.attrib.get('xlink:href'), True)
if val is not None:
self.uricode.append(val)

self.uricodespace = []
for i in md.findall(util.nspath_eval(
Expand Down

0 comments on commit a8b0a2c

Please sign in to comment.