Skip to content

Commit

Permalink
Merge pull request #81 from meaningfy-ws/feature/TED-296
Browse files Browse the repository at this point in the history
form number xpath and notices without namespaces
  • Loading branch information
Dragos0000 authored Apr 26, 2022
2 parents bd22467 + 7e05ada commit fa9b745
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def _get_normalised_namespaces(self):
namespaces = dict([node for _, node in ET.iterparse(source=StringIO(self.xml_manifestation.object_data),
events=['start-ns'])])

namespaces["manifestation_ns"] = namespaces.pop("")
namespaces["manifestation_ns"] = namespaces.pop("") if "" in namespaces.keys() else ""

tmp_dict = namespaces.copy()
items = tmp_dict.items()
Expand Down
2 changes: 1 addition & 1 deletion ted_sws/metadata_normaliser/services/xpath_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def xpath_legal_basis_directive_third(self):

@property
def xpath_form_number(self):
return "manifestation_ns:FORM_SECTION/*[1]"
return ".//*[@FORM]"

@property
def xpath_notice_type(self):
Expand Down

0 comments on commit fa9b745

Please sign in to comment.