Skip to content

Commit

Permalink
Ensure the 'xsi' prefix is included in your namespaces dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbie1977 authored Mar 19, 2024
1 parent 969b685 commit c812902
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/scripts/process_xmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ def parse_xmi(file_path):
with open(file_path, 'rb') as file:
tree = etree.parse(file)
root = tree.getroot()
return root, {'xmi': 'http://www.omg.org/XMI', 'ecore': 'http://www.eclipse.org/emf/2002/Ecore'}
namespaces = {
'xmi': 'http://www.omg.org/XMI',
'ecore': 'http://www.eclipse.org/emf/2002/Ecore',
'xsi': 'http://www.w3.org/2001/XMLSchema-instance' # Adding the 'xsi' namespace
}
return root, namespaces

def list_queries_under_data_sources(root, namespaces):
data_sources = root.findall('.//dataSources', namespaces=namespaces)
Expand Down

0 comments on commit c812902

Please sign in to comment.