Commit f643bb61 authored by Jérome Perrin's avatar Jérome Perrin

set URL to the name of the file, to have it included in error message


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36848 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ac641e7e
......@@ -72,6 +72,7 @@ if lxml:
def _validateXML(self, odf_file, content_file_name):
zfd = zipfile.ZipFile(odf_file)
doc = lxml.etree.parse(StringIO(zfd.read(content_file_name)))
doc.docinfo.URL = content_file_name
self.relaxng.validate(doc)
return [error for error in str(self.relaxng.error_log).splitlines(True)]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment