Closed dewhattens closed 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:
mimetype
file present AND META-INF/manifest.xml
has NO root "/" entry. (PKG-2 and PKG-20 will always be fired together and might be combined)mimetype
file present AND META-INF/manifest.xml
has a root entry.mimetype
file is present and `META-INF/manifest.xml' has no root "/" entry.mimetype
file is present and META-INF/manifest.xml' has a root "/" entry BUT the value of the root entry's
media-typeattribute differs from the contents of
mimetype`.mimetype
file present AND META-INF/manifest.xml
has NO root "/" entry. (PKG-2 and PKG-20 will always be fired together and might be combined)This may need further discussion for clarification but I'm fairly confident in the interpretation of the specification here.
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.