openpreserve / odf-validator

Open source Open Document Format (ODF) validation
http://odf.openpreservation.org/
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

DOC-2 and DOC-3 (INFO) not reported consistently #156

Closed maria-messerschmidt closed 3 weeks ago

maria-messerschmidt commented 5 months ago

The two info messages for mimetype and version (DOC-2 and DOC-3) are not reported consistently, and I am not sure of the pattern of when they are and are not reported.

DOC-3 is reported in most cases regardless of other output and regardless of whether the validator is run with or without -p. However, occassionally as in example 1, it is not reported. The scenario is a basic .fods file which should validate correctly without -p and should fail validation with -p.

DOC-2 is not reported very often. In fact, this same .fods file is the only place I have managed to trigger it so far, and then only when run without -p (example 2).

Example 1: Run with -p C:\odf\odf-validator-main>odf-validator.bat -p "filer/testfiler/T001.fods" APP-1: [INFO] Validating filer\testfiler\T001.fods. APP-5: [INFO] DNA ODF Spreadsheets Preservation Specification Profile report for filer\testfiler\T001.fods. PKG-1: T001.fods [ERROR] An OpenDocument Package SHALL be a well formed Zip Archive. POL_2: T001.fods [ERROR] Standard Compliance | The file MUST comply with the standard "OASIS Open Document Format for Office Applications (OpenDocument) v1.3". NOT VALID, 2 errors, 0 warnings and 0 info messages.

Example 2: Run without -p C:\odf\odf-validator-main>odf-validator.bat "filer/testfiler/T001.fods" APP-1: [INFO] Validating filer\testfiler\T001.fods. APP-4: [INFO] Validation report for filer\testfiler\T001.fods. DOC-2: filer\testfiler\T001.fods [INFO] OpenDocument version 1.3 detected. DOC-3: filer\testfiler\T001.fods [INFO] OpenDocument MIMETYPE application/vnd.oasis.opendocument.spreadsheet detected VALID, no errors, no warnings and 2 info message found.

carlwilson commented 4 months ago

Hi @maria-messerschmidt. I'll take a look at this and see if I can reproduce it and fix quickly if possible.

maria-messerschmidt commented 4 months ago

Thanks! Let me know if you need anything from me.

maria-messerschmidt commented 3 weeks ago

Tested. Works ok. Closing

maria-messerschmidt commented 3 weeks ago

...