mirror of
https://github.com/Theodor-Springmann-Stiftung/lenz-briefe.git
synced 2025-10-28 16:45:31 +00:00
BUGFIX: namespaces in linter
This commit is contained in:
@@ -259,14 +259,14 @@
|
||||
|
||||
<personDef index="83" name="Eina [Julie von Albedyll] " ref="http://d-nb.info/gnd/116275359"
|
||||
vorname="Julie" nachname="von Albedyll" komm="albedyll" />
|
||||
|
||||
|
||||
<personDef index="84" name="Gerhard Friedrich Müller" ref="http://d-nb.info/gnd/118953362"
|
||||
vorname="Gerhard Friedrich" nachname="Müller" komm="gf-müller" />
|
||||
|
||||
<personDef index="85" name="Carl Heinrich Gottlob Lenz"
|
||||
|
||||
<personDef index="85" name="Carl Heinrich Gottlob Lenz"
|
||||
vorname="Carl Heinrich Gottlob" nachname="Lenz" komm="chg-lenz" />
|
||||
|
||||
<personDef index="86" name="Unbekannter Freund"
|
||||
|
||||
<personDef index="86" name="Unbekannter Freund"
|
||||
vorname="NN" nachname="NN" komm="freund" />
|
||||
|
||||
</personDefs>
|
||||
|
||||
@@ -41,19 +41,19 @@ def get_person_def_ids(ref_root):
|
||||
If references.xml is un-namespaced, we can use a non-namespace XPath: //personDef
|
||||
Adjust if references.xml also has a namespace.
|
||||
"""
|
||||
return set(elem.get("index") for elem in ref_root.xpath("//personDef"))
|
||||
return set(elem.get("index") for elem in ref_root.xpath("//lenz:personDef", namespaces=NAMESPACE_MAP))
|
||||
|
||||
def get_location_def_ids(ref_root):
|
||||
"""
|
||||
Retrieve all 'index' attributes from <locationDef index="..."> in references.xml.
|
||||
"""
|
||||
return set(elem.get("index") for elem in ref_root.xpath("//locationDef"))
|
||||
return set(elem.get("index") for elem in ref_root.xpath("//lenz:locationDef", namespaces=NAMESPACE_MAP))
|
||||
|
||||
def get_app_def_ids(ref_root):
|
||||
"""
|
||||
Retrieve all 'index' attributes from <appDef index="..."> in references.xml.
|
||||
"""
|
||||
return set(elem.get("index") for elem in ref_root.xpath("//appDef"))
|
||||
return set(elem.get("index") for elem in ref_root.xpath("//lenz:appDef", namespaces=NAMESPACE_MAP))
|
||||
|
||||
def check_references(root, reference_data, filepath):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user