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

PKG-2 not detected #69

Closed dewhattens closed 8 months ago

dewhattens commented 9 months ago

File with missing mimetype not detecting PKG-2

Testing D:\ODS1\TestCorpusV2\PKG-2\MimeTypeMissing.ods APP-1: [INFO] Validating D:\ODS1\TestCorpusV2\PKG-2\MimeTypeMissing.ods. APP-4: [INFO] Validation report for D:\ODS1\TestCorpusV2\PKG-2\MimeTypeMissing.ods. PKG-10: mimetype [ERROR] An OpenDocument package manifest SHALL contain a mimetype file IF a root "/" entry is present. XML-4: META-INF\manifest.xml [ERROR] Not a valid XML document. Validation exception at line 2 and column 88: element "manifest:manifest" missing required attribute "manifest:version". PKG-18: Thumbnails\thumbnail.png [WARNING] An OpenDocument package SHOULD contain a preview image Thumbnails/thumbnail.png. NOT VALID, 2 errors, 1 warnings and 0 info messages.

carlwilson commented 8 months ago

This result is correct, see dewhattens/TestCorpus#2 to see the details. This requires a few test files and the result depends on the interplay between the root "/" element in META-INF/manifest.xml and the presence/contents of the mimetype file. The following error messages are all relevant to the various cases:

This may need further discussion for clarification but I'm fairly confident in the interpretation of the specification here.