Skip to content
Snippets Groups Projects
Commit e3a491c2 authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

For the internal XSD version, prefer the entry "schemaVersion"

parent 37aa9ef0
Branches
Tags 0.6.3
No related merge requests found
......@@ -40,11 +40,16 @@ def get_xsd(cfg, xsd_version=None, xml_str = None):
url = baseURL + 'v' + xsd_version + '/' + filename
else:
root = parse(xml_str)
for item in root.attrib.items():
x = item[1].split()
for url in x:
if url.endswith(filename):
break
item = root.attrib.get('schemaVersion')
if item:
url = baseURL + 'v' + item + '/' + filename
else:
for key in root.attrib:
if key.endswith('schemaLocation'):
x = root.attrib.get(key).split()
for url in x:
if url.endswith(filename):
break
if uri_validator(url):
try:
r = requests.get(url)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment