Skip to content

v0.9.19

Choose a tag to compare

@github-actions github-actions released this 17 Aug 10:45
· 8 commits to main since this release

Seven fixes, and what they have in common is how they were found rather than
what they touch: none was reachable by the instruments that run on every
release. Five came from cross-checking against epubcheck over 156 books newly
added to the real-book shelf, one from a stylesheet shape that shelf turned
up, and one from a reader on the MobileRead thread who sent epubcheck's output
beside ours. The corpus was byte-identical through all seven.

Most of them are EPUB 2 rules where XHTML 1.1 is stricter than HTML5, so the
EPUB 3 column is asserted alongside the EPUB 2 one in every test: tightening
the shared grammar instead of the EPUB 2 one would invent errors on every
modern book.

CSS-001 is EPUB 3 only. direction and unicode-bidi drew an error at
any version, and epubcheck guards the rule with version == VERSION_3
(CSSHandler.java), keeping its fixtures under epub3/. A real EPUB 2 book
with <h1 style="direction: inherit"> was therefore told it had an error it
did not have. The neighbouring CSS-006 (position: fixed) is not guarded
there and is unchanged here — checked in the same pass, so this is the whole
class rather than a sample of it.

ol@start, ol@type and li@value are now rejected in EPUB 2. XHTML
1.1 gives ol.attlist, ul.attlist and li.attlist exactly Common.attrib;
all three attributes come from legacy.rng, which OPS 2.0.1's content.rng
never includes — the same reason align and clear are already errors.
epubcheck reports one RSC-005 each and we reported none, on 4 shelf books.
EPUB 3 is untouched: HTML5 has all three, so the tightening applies only to
the EPUB 2 grammar, and a test asserts both columns plus a clean control.

data-* attributes are now rejected in EPUB 2. The grammar cannot express
a prefix wildcard, so a data- name is suppressed at the report level; that
suppression applied at every version. data-* is an HTML5 family and XHTML
1.1 has no such concept, so epubcheck gives a plain RSC-005 in a
version="2.0" book. A malformed name (data-) still produces exactly one
finding, not one per owning check — HTM-061 also covers that case and
epubcheck reports it once.

An empty <tr> or row group is now an error in EPUB 2. XHTML 1.1 makes
tr oneOrMore (th|td) and thead/tfoot/tbody oneOrMore tr; HTML5
permits all of them empty, so this joins ol/ul/dl as an EPUB 2-only
content-model rule and EPUB 3 is untouched.

Consumers keying on message IDs: no ID changed meaning, and no ID was split.
The EPUB 2 changes add RSC-005 findings on books that previously reported
none of them; measured across the 336-book shelf they move 9 books, all in
the same direction, and two of those books go from a clean verdict to two
findings each — both of which epubcheck was already reporting.

A stylesheet's stray declaration no longer draws four CSS-008 findings
(styloria #3, picked up
here as styloria 0.9.1). A file beginning with text-indent:1.5em; outside
any rule became one qualified rule's prelude, and the selector walk reported
every token it could not accept — the :, the 1.5em, the ;, and the
@page of the next rule, which is well-formed CSS. epubcheck reports one.
The reporting unit upstream is now the comma-separated selector, so the pile
collapses to a single finding while the deliberate difference is untouched:
. h-100, . y-100 { } is two genuinely broken selectors and still reports
two. docs/COVERAGE.md now separates the two cases, because they look
identical in a count diff and only one of them is a defect.

EPUB 3 package metadata is checked at all now (MobileRead, thread page
13). A reader sent epubcheck's output beside ours for the same book: 13
findings against our 7, and all six we missed were OPF 2 attributes left on
Dublin Core elements by a converted book — opf:role, opf:file-as,
opf:scheme, opf:event. EPUB 3 replaced every one of them with
<meta refines>, and our <metadata> content model was fully permissive, so
no attribute on any metadata element was being checked.

The two attribute lists are now what package-30.rnc specifies and are
deliberately not the same: dc:title, dc:creator, dc:contributor,
dc:subject, dc:description, dc:publisher, dc:relation, dc:coverage,
dc:rights and dc:source take id, dir and xml:lang, while
dc:identifier, dc:language, dc:date, dc:type and dc:format take
id alone — so xml:lang is valid on dc:title and an error on
dc:language. <meta>, <link> and foreign metadata elements stay
unconstrained, and EPUB 2 packages are untouched, where these attributes are
legitimate.

An OPF-namespaced attribute is now named in full in the message. We
reported attribute "file-as" is not allowed here for opf:file-as, naming
something that appears nowhere in the reader's file — and we were already
inconsistent with ourselves, since epub:type on the same book was reported
with its prefix. Consumers reading the params of an
opf.package.schema_violation finding will now see opf:file-as rather than
file-as; the message shape is unchanged. No book on the 336-book shelf
produces such a message today.

All seven fixes leave the corpus exactly where it was: 606/607 exact-ID recall,
0 false positives on 355 should-be-clean cases. Across the 336-book shelf,
329 books agree with epubcheck on the ID set exactly and not one ID is
reported by epubveri alone.