epubveri 0.8.2 released
Everything in this one came from reports in this thread.
Fixed
- An attribute selector inside a grouping at-rule is no longer reported as a CSS syntax error. `@media print { a[href^="http"] { … } }` drew CSS-008: the code walking the at-rule's block treated the "[…]" of a selector as a rule body and read its contents as declarations. Doitsu reported it with a namespaced selector, but the namespace was incidental — every attribute selector in that position was affected.
- NAV-001 is no longer emitted. If you validated an EPUB 2 book carrying a navigation document and saw "the navigation document is not supported in EPUB 2", that error was ours and epubcheck does not make it. The ID is unreachable in epubcheck: its only call site needs an EPUB 2 book whose manifest item carries "properties", and only the EPUB 3 handler parses that attribute. Such a book is still reported here — through the content model, where <nav> is not part of XHTML 1.1, which is how epubcheck reports it.
- epub:type and meta@charset are now rejected in EPUB 2 documents. Both are EPUB 3 spellings; the EPUB 2 branch had been reusing the EPUB 3 attribute lists.
- An EPUB 2 package document is now checked against the EPUB 2 shapes: a <meta> needs "name" and "content" and must be empty, and "properties" is not an attribute of <item> or <itemref>. That grammar had no version switch at all, so an EPUB 2 package was being held to EPUB 3's rules.
- An EPUB 2 <body> must hold at least one block element, so a document whose every child is rejected now says so, instead of listing only the children.
- Attributes are named in full in the output. epub:type was reported as attribute "type", which on an <a> element points at an attribute that is perfectly legal there.
Added
- ADV-004 (advisory, requires --advisory): a package document that declares EPUB 2 but is written in EPUB 3. It does not detect anything the other checks miss — such a book already draws a pile of accurate findings — it names the one cause behind them, listing the EPUB 3 constructs it counted in the package document.
With thanks
- Doitsu, for the CSS report.
- DNSB, for posting epubcheck's output next to epubveri's on the same book. Four of the five fixes above are from that comparison, including the NAV-001 removal, which nothing in my own test suite could have found. Most of the difference on that book is closed as of this release; what is left is tracked as issue #65.
- JSWolf, for the version-detection suggestion behind ADV-004.
Download: https://github.com/veripublica/epubv...ses/tag/v0.8.2
Binaries for Linux, macOS and Windows on x86_64 and ARM; the Linux musl builds are static. No JVM required.