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
No related branches found
No related tags found
No related merge requests found
...@@ -40,11 +40,16 @@ def get_xsd(cfg, xsd_version=None, xml_str = None): ...@@ -40,11 +40,16 @@ def get_xsd(cfg, xsd_version=None, xml_str = None):
url = baseURL + 'v' + xsd_version + '/' + filename url = baseURL + 'v' + xsd_version + '/' + filename
else: else:
root = parse(xml_str) root = parse(xml_str)
for item in root.attrib.items(): item = root.attrib.get('schemaVersion')
x = item[1].split() if item:
for url in x: url = baseURL + 'v' + item + '/' + filename
if url.endswith(filename): else:
break 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): if uri_validator(url):
try: try:
r = requests.get(url) 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