Commit 66daf423 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Merge remote-tracking branch 'origin/erp5-component'

parents 16541d16 e9f4aa9d
......@@ -72,6 +72,10 @@ 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)))
return []
# The following is the past implementation that validates with
# RelaxNG schema. But recent LibreOffice uses extended odf
# format by default, that does not pass the RelaxNG validation.
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