-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR value of "severity" attribute in XML output conflicts with WARNING message #789
Comments
Indeed, the main issue is that the schema jhove.xsd allows only two values for the severity attribute <xs:attribute name="severity" use="optional">
<xs:simpleType
<xs:restriction base="xs:string">
<xs:enumeration value="error"/>
<xs:enumeration value="info"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute> So I had to decide how to map from the levels of epubcheck to these two values.
Maybe I should have made another choice? Should I lower the warn to info? |
Hmm, tricky one. I'm not in favour of mapping the Epubcheck Warning level to jhove's "error" level, b/c epubcheck being a validator most users will expect this to be something that causes the validation to fail (which it doesn't). Another option would be to add a "warning" level to the JHOVE schema and see if that gets accepted by the JHOVE maintainers (OPF). That change wouldn't cause any existing (valid) JHOVE output files to fail validating against its schema, and I think this could be useful for JHOVE as well. Not sure if they'd be open to this but perhaps worth a try? |
Ah, well, I remember the discussion about that, @tledoux. Personally I'm not very happy with the JHOVE schema anyway and would suggest to implement a EpubCheck prorietary schema once in a while. But for now we should stick to the JHOVE and do our best. Should we remove the |
Any comments on that topic? Shall we remove the severity attribute or leave it as it currently is? |
Any suggestions? I'm voting for removing the |
I'd be in favor of keeping it as-is for 4.1, and maybe document this particularity (which can be confusing I agree). In a next version however, we should revamp the XML format entirely, and we could possibly use a custom XML flavor (based on EARL?) on which we would have better control. People can always contribute XSLTs to convert to their flavor of choice. |
See issue #816 for further discussing a new XML output schema. |
Since this is a breaking change, and most publishing workflow reject EPUBs with warnings, and we didn't receive that much feedback about this, I will leave this issue open and remove it from the v4.1 milestone. Thank you @tledoux in any case for the PR, let's keep it open as well until we decide how to further proceed! |
In order to fix the issue w3c#789, the new jhove schema is implemented. Indeed, this new schema has been published and includes an 'id' attribute as well as a 'warning' level. So the alignment between the severity attribute and the level is now straightforward. EpubCheck level | severity attribute ----------------| ------------------ fatal error | error error | error warn | warning hint | info
In order to fix the issue w3c#789, the new jhove schema is implemented. Indeed, this new schema has been published and includes an 'id' attribute as well as a 'warning' level. So the alignment between the severity attribute and the level is now straightforward. EpubCheck level | severity attribute ----------------| ------------------ fatal error | error error | error warn | warning hint | info
As described in the PR, the new jhove schema allows for a 'warning' level which allows to map directly epubcheck levels with severity. I hope this PR could really fix this issue. |
Looking at the XML output of Epubcheck 4.0.2, sometimes the value of the "severity" attribute in a message element contradicts the actual warning/error message. To illustrate this see below EPUB:
epub20_crazy_columns.epub
I run this through Epubcheck using:
The output contains a validation message about about the use of absolute positions:
It is strange that the severity attribute states that this is an error, whereas the text message says it is a warning. Seeing that this file passed validation I'm assuming that internally Epubcheck considers this to be a warning.
Another example is this file:
epub20_encryption_binary_content.epub
Here Epubcheck reports:
Which again shows the same problem.
The text was updated successfully, but these errors were encountered: