Commit 574d45a6 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

recent LibreOffice uses extended odf format by default, that does not pass the RelaxNG validation.

parent 818785a2
......@@ -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