@@ -414,7 +414,7 @@ def __init__(self, md=None, identtype=None):
414
414
namespaces ))
415
415
for i in _values :
416
416
val = util .testXMLValue (i )
417
- if val is not None :
417
+ if val not in [ None , '' ] :
418
418
self .uricode .append (val )
419
419
420
420
_values = md .findall (util .nspath_eval (
@@ -424,17 +424,31 @@ def __init__(self, md=None, identtype=None):
424
424
'gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:RS_Identifier/gmd:code/gmx:Anchor' ,
425
425
namespaces ))
426
426
for i in _values :
427
- val = util .testXMLValue (i .attrib .get ('xlink:href' ), True )
428
- if val is not None :
427
+ val = util .testXMLValue (i )
428
+ val1 = i .attrib .get (util .nspath_eval ('xlink:href' , namespaces ))
429
+ if val1 not in [None ,'' ]:
430
+ self .uricode .append (val1 )
431
+ elif val not in [None ,'' ]:
429
432
self .uricode .append (val )
433
+
430
434
431
435
self .uricodespace = []
432
436
for i in md .findall (util .nspath_eval (
433
437
'gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:RS_Identifier/gmd:codeSpace/gco:CharacterString' ,
434
438
namespaces )):
435
439
val = util .testXMLValue (i )
436
- if val is not None :
440
+ if val not in [ None , '' ] :
437
441
self .uricodespace .append (val )
442
+ for i in md .findall (util .nspath_eval (
443
+ 'gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:RS_Identifier/gmd:codeSpace/gmx:Anchor' ,
444
+ namespaces )):
445
+ val = util .testXMLValue (i )
446
+ val1 = i .attrib .get (util .nspath_eval ('xlink:href' , namespaces ))
447
+ if val1 not in [None ,'' ]:
448
+ self .uricode .append (val1 )
449
+ elif val not in [None ,'' ]:
450
+ self .uricode .append (val )
451
+
438
452
439
453
self .date = []
440
454
self .datetype = []
0 commit comments