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

ODS-6 not detected #61

Closed dewhattens closed 9 months ago

dewhattens commented 11 months ago

File with embedded word document not detected

Testing D:\ODS1\TestCorpusV2\ODS-6\WithEmbeddedwordDoc.ods APP-1: [INFO] Validating D:\ODS1\TestCorpusV2\ODS-6\WithEmbeddedwordDoc.ods. APP-4: [INFO] Validation report for D:\ODS1\TestCorpusV2\ODS-6\WithEmbeddedwordDoc.ods. XML-4: Object 1\styles.xml [ERROR] Not a valid XML document. Validation exception at line 2 and column 3882: attribute "loext:opacity" not allowed here; expected attribute "fo:background-color", "fo:color", "fo:country", "fo:font-family", "fo:font-size", "fo:font-style", "fo:font-variant", "fo:font-weight", "fo:hyphenate", "fo:hyphenation-push-char-count", "fo:hyphenation-remain-char-count", "fo:language", "fo:letter-spacing", "fo:script", "fo:text-shadow", "fo:text-transform", "style:country-asian", "style:country-complex", "style:font-charset", "style:font-charset-asian", "style:font-charset-complex", "style:font-family-asian", "style:font-family-complex", "style:font-family-generic", "style:font-family-generic-asian", "style:font-family-generic-complex", "style:font-name", "style:font-name-asian", "style:font-name-complex", "style:font-pitch", "style:font-pitch-asian", "style:font-pitch-complex", "style:font-relief", "style:font-size-asian", "style:font-size-complex", "style:font-size-rel", "style:font-size-rel-asian", "style:font-size-rel-complex", "style:font-style-asian", "style:font-style-complex", "style:font-style-name", "style:font-style-name-asian", "style:font-style-name-complex", "style:font-weight-asian", "style:font-weight-complex", "style:language-asian", "style:language-complex", "style:letter-kerning", "style:rfc-language-tag", "style:rfc-language-tag-asian", "style:rfc-language-tag-complex", "style:script-asian", "style:script-complex", "style:script-type", "style:text-blinking", "style:text-combine", "style:text-combine-end-char", "style:text-combine-start-char", "style:text-emphasize", "style:text-line-through-color", "style:text-line-through-mode", "style:text-line-through-style", "style:text-line-through-text", "style:text-line-through-text-style", "style:text-line-through-type", "style:text-line-through-width", "style:text-outline", "style:text-overline-color", "style:text-overline-mode", "style:text-overline-style", "style:text-overline-type", "style:text-overline-width", "style:text-position", "style:text-rotation-angle", "style:text-rotation-scale", "style:text-scale", "style:text-underline-color", "style:text-underline-mode", "style:text-underline-style", "style:text-underline-type", "style:text-underline-width", "text:condition" or "text:display". XML-4: Object 1\styles.xml [ERROR] Not a valid XML document. Validation exception at line 2 and column 4713: attribute "loext:opacity" not allowed here; expected attribute "fo:background-color", "fo:color", "fo:country", "fo:font-family", "fo:font-size", "fo:font-style", "fo:font-variant", "fo:font-weight", "fo:hyphenate", "fo:hyphenation-push-char-count", "fo:hyphenation-remain-char-count", "fo:language", "fo:letter-spacing", "fo:script", "fo:text-shadow", "fo:text-transform", "style:country-asian", "style:country-complex", "style:font-charset", "style:font-charset-asian", "style:font-charset-complex", "style:font-family-asian", "style:font-family-complex", "style:font-family-generic", "style:font-family-generic-asian", "style:font-family-generic-complex", "style:font-name", "style:font-name-asian", "style:font-name-complex", "style:font-pitch", "style:font-pitch-asian", "style:font-pitch-complex", "style:font-relief", "style:font-size-asian", "style:font-size-complex", "style:font-size-rel", "style:font-size-rel-asian", "style:font-size-rel-complex", "style:font-style-asian", "style:font-style-complex", "style:font-style-name", "style:font-style-name-asian", "style:font-style-name-complex", "style:font-weight-asian", "style:font-weight-complex", "style:language-asian", "style:language-complex", "style:letter-kerning", "style:rfc-language-tag", "style:rfc-language-tag-asian", "style:rfc-language-tag-complex", "style:script-asian", "style:script-complex", "style:script-type", "style:text-blinking", "style:text-combine", "style:text-combine-end-char", "style:text-combine-start-char", "style:text-emphasize", "style:text-line-through-color", "style:text-line-through-mode", "style:text-line-through-style", "style:text-line-through-text", "style:text-line-through-text-style", "style:text-line-through-type", "style:text-line-through-width", "style:text-outline", "style:text-overline-color", "style:text-overline-mode", "style:text-overline-style", "style:text-overline-type", "style:text-overline-width", "style:text-position", "style:text-rotation-angle", "style:text-rotation-scale", "style:text-scale", "style:text-underline-color", "style:text-underline-mode", "style:text-underline-style", "style:text-underline-type", "style:text-underline-width", "text:condition" or "text:display". XML-4: Object 1\styles.xml [ERROR] Not a valid XML document. Validation exception at line 2 and column 4713: attribute "loext:hyphenation-no-caps" not allowed here; expected attribute "fo:background-color", "fo:color", "fo:font-family", "fo:font-style", "fo:font-variant", "fo:font-weight", "fo:letter-spacing", "fo:script", "fo:text-shadow", "fo:text-transform", "style:font-charset", "style:font-charset-asian", "style:font-charset-complex", "style:font-family-asian", "style:font-family-complex", "style:font-family-generic", "style:font-family-generic-asian", "style:font-family-generic-complex", "style:font-pitch", "style:font-pitch-asian", "style:font-pitch-complex", "style:font-relief", "style:font-size-rel", "style:font-size-rel-asian", "style:font-size-rel-complex", "style:font-style-asian", "style:font-style-complex", "style:font-style-name", "style:font-style-name-asian", "style:font-style-name-complex", "style:font-weight-asian", "style:font-weight-complex", "style:rfc-language-tag", "style:rfc-language-tag-asian", "style:rfc-language-tag-complex", "style:script-asian", "style:script-complex", "style:script-type", "style:text-blinking", "style:text-combine", "style:text-combine-end-char", "style:text-combine-start-char", "style:text-emphasize", "style:text-line-through-color", "style:text-line-through-mode", "style:text-line-through-style", "style:text-line-through-text", "style:text-line-through-text-style", "style:text-line-through-type", "style:text-line-through-width", "style:text-outline", "style:text-overline-color", "style:text-overline-mode", "style:text-overline-style", "style:text-overline-type", "style:text-overline-width", "style:text-position", "style:text-rotation-angle", "style:text-rotation-scale", "style:text-scale", "style:text-underline-color", "style:text-underline-mode", "style:text-underline-style", "style:text-underline-type", "style:text-underline-width", "text:condition" or "text:display". DOC-3: mimetype [INFO] OpenDocument MIMETYPE application/vnd.oasis.opendocument.spreadsheet detected NOT VALID, 3 errors, 0 warnings and 1 info messages.

carlwilson commented 10 months ago

This is potentially slightly trickier. My current understanding is that we will simply list the files found in the manifest that aren't on the permitted formats list. The decision will be made by using the media-type attribute of each file found in the manifest. This will cover all files as all file MUST be listed in the manifest. Files that don't meet this criteria will fail core validation. It may be a good idea to list the files that are acceptable as well.

carlwilson commented 9 months ago

Created new issue for ODF_6: #94