Skip to content

Commit

Permalink
Some ids are xml:ids
Browse files Browse the repository at this point in the history
  • Loading branch information
kthoden committed Mar 3, 2020
1 parent 442e8a3 commit 55447a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tei2imxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,8 @@ def update_ids(xml_tree, ignore_ref_errors):
eoa_id_element = corresponding_eoa_id_element[0]
if eoa_id_element.get("id"):
eoa_id = eoa_id_element.get("id")
elif eoa_id_element.xpath("@xml:id", namespaces=NS_MAP):
eoa_id = eoa_id_element.xpath("@xml:id", namespaces=NS_MAP)[0]
else:
logging.warning(f"{eoa_id_element.tag} has no id")
eoa_reference.set("target", eoa_id)
Expand Down

0 comments on commit 55447a3

Please sign in to comment.