Skip to content

Commit

Permalink
lxml doesn't have xpath.execute() any more.
Browse files Browse the repository at this point in the history
Suggestion from the lxml mailing list.
  • Loading branch information
luciansmith committed Feb 16, 2024
1 parent ea6fd5f commit 60b1a0c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions biosimulators_utils/sedml/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1663,10 +1663,9 @@ def validate_target(target, namespaces, context, language, model_id, model_etree
namespaces.pop(None, None)

try:
xpath = lxml.etree.XPath(target, namespaces=namespaces)
root = lxml.etree.Element("root")
try:
xpath.evaluate(root)
xpath = root.xpath(target, namespaces=namespaces)

if model_etree and check_in_model_source:
if context == DataGenerator and '/@' in target:
Expand Down

0 comments on commit 60b1a0c

Please sign in to comment.