How to get the exact reason why a file is being told as corrupted when opened?

For reports, we generate odt files from (many) templates from an oracle database.
All those outputs are perfectly compatible with OpenOffice 2.4.

We are trying to make our reports compliant with LibreOffice 4.2+.
Most are working fine, but some are deemed “corrupted”, with Writer proposing to repair them. And they seem to work fine after repair.

Is there some kind of verbose/debug way of opening those odt documents in writer ? So that we could see the underlying reason (in the content.xml or else) why it says that they are corrupted. This way we could correct our report generators.

Thanks in advance.

In what way (words) exactly is the “corruption” inicated?

You did already check the wrapped-in XML files with a syntax sensitive editor for conspicious symptoms? We had some “error on loading” topics here that got fixed this way.

PS If you find an XSD file usable for syntactical verification of content.xml, please tell me.

The wording is :

The file '14A821_9.odt' is corrupt and therefore cannot be opened. LibreOffice can try to repair the file.

The corruption could be the result of document manipulation or of structural document damage due to data transmission.

We recommend that you do not trust the content of the repaired document.
Execution of macros is disabled for this document.

Should LibreOffice repair the file?

I did check my xml files with Jing against the published NG for ODF 1.0
As described here : How_to_Validate_an_ODF_document - Office Wiki

they are ODF1 compliant, And it does not bother LOO4.3 to open some of them as such without any issues. Only a few are “corrupted”.

OOo 2.4.1 was released 2008-06-10. This was when ODF V1.1 specifications. 1st release, were in force. Might your “corrupted” templates also be created relying on OOo V2.4.1?

There was a rectified release of ODF V1.1 on 2013-07-22. There might be a source of errors in the original release of ODF 1.1.

LibO is relying on ODF specifications V1.2 and LibO V4.x may assume older documents based on ODF 1.1 rectified release.