|
|
#361 | |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 54,834
Karma: 182340541
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
I do not mind using multiple tools to check my ePubs—perhaps my age is showing there since I like small tools that do one job and do it well. Quality Check is just one of the tools I use on my Intake library and I neither expect nor want epubveri to replace all of them. |
|
|
|
|
|
|
#362 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,191
Karma: 153791427
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I found an issue with both epubckeck and epubvari. This happens with both ePub2 and ePub3.
The content in the meta name="cover" is supposed to be the id of the cover image. But it it isn't and both epubckeck and epubvari don't report this error. Code:
<meta name="cover" content="fig_backad"/> <item href="images/cover.jpg" id="cover_image" media-type="image/jpeg"/> Last edited by JSWolf; 09-26-2026 at 08:34 PM. |
|
|
|
|
|
#363 |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 54,834
Karma: 182340541
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Not even the obsolete meta element for ePub3?
|
|
|
|
|
|
#364 |
|
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,602
Karma: 22000001
Join Date: Jan 2008
Location: Spaniard in Germany
Device: Cybook Orizon, Kobo Aura
|
I believe the ePub2 spec says nothing about covers. The meta name="cover" tag is just an arbitrary tag that can contain whatever, it's up to reading systems to decide what to do with it. The de facto (calibre) standard may be having the file id, but nothing in the spec mandates it.
|
|
|
|
|
|
#365 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 222
Karma: 363834
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
|
@JSWolf, @Jellby, @DNSB: Jellby is right. Neither EPUB 2 nor EPUB 3 defines <meta name="cover">; it's a convention that calibre and Kindle use. epubcheck has no rule for it, which I checked in its source, so it isn't an error, and neither tool should report it as one. DNSB, in EPUB 3 epubveri reports the element itself as outdated (OBS-001, as a usage), but that says nothing about what it points to.
Still, a cover meta that names nothing is a real defect for the readers that rely on it. So it's a candidate for an advisory, which is off by default and never changes the verdict. On my shelf, 436 of 474 books carry this meta, and every one points at an existing image. So it would only fire on books that are actually broken, like the one you found. I'll look at it before promising anything, mainly to see whether some tools write a file path there instead of an id. |
|
|
|
|
|
#366 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,191
Karma: 153791427
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
The file path is not part of the meta name="cover". content points to the ID of the cover.
If there is a file path, then it's an error. Here is a link from The Daisy Consortium showing this is how you define a cover for ePub2. https://kb.daisy.org/publishing/docs/epub/cover.html Last edited by JSWolf; 09-27-2026 at 06:41 AM. |
|
|
|
|
|
#367 | ||
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 54,834
Karma: 182340541
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Quote:
|
||
|
|
|
|
|
#368 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,191
Karma: 153791427
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
But without <meta name="cover"... some programs won't know the cover. So it is rather important to have this be correct.
|
|
|
|
|
|
#369 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 222
Karma: 363834
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
|
Thanks for the Daisy link, that's the useful part: it shows where the convention comes from.
I went to the specs to see what they say, EPUB 2 included, since that's where this convention lives.
So you're right that a content value naming no manifest item is a broken reference by the convention calibre, Kindle and Adobe use, and DNSB and Jellby are right that no spec, EPUB 2 or 3, defines that convention, so it can't be an error or a warning. What that leaves is an optional note. I'd word it as "the cover meta names no manifest item", and I wouldn't claim what a given reader will do with it. Before I decide anything, I'd like some real cases from you. Is it always an id that doesn't exist (like your fig_backad), or have you seen a file name or a path in content? And roughly how many books in your library does it hit? On my own shelf of 524 books, 490 carry the meta and all 490 name an existing manifest item, so a check would fire on none of them, which tells me nothing about libraries like yours. I'm not promising it yet, but a few real examples would settle it. Last edited by Kayadelenium; 09-30-2026 at 07:21 AM. |
|
|
|
|
|
#370 |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 54,834
Karma: 182340541
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
I did a search on 17758 ePubs for '<meta name="cover"' in the .opf file. The search returned 17192 results.
The results were: 14,270 had '<meta name="cover" content="cover"/>' 741 had '<meta name="cover" content="cover" />' 539 had '<meta name="cover" content="cover-image"/>' 59 had '<meta name="cover" content="my-cover-image"/>' 52 had '<meta name="cover" content="cover_img" />' 48 had '<meta name="cover" content="my-cover-image" />' 43 had '<meta name="cover" content="cover_img"/>' 35 had ''<meta name="cover" content="x_cover-image" />' For a total of 15,787 though some of those variants were from placing a space before the closing /. The rest were a mix of filenames (cover.jpg was popular) and what looked like random IDs/ISBNs/book titles/etc. There was only 11 examples where the contents= did not match the ID in the file. As far as I could tell, those were from I had replaced a cover image and the ID was not updated. I randomly checked the remaining block of ePubs where the '<meta name="cover"' search string was not found and they were a mix of old ePub2 files and ePub3 files. The joys of sucking a text file into a spreadsheet and then sorting wildly. |
|
|
|
|
|
#371 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 222
Karma: 363834
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
|
epubveri 0.19.0 is out: GitHub release, crates.io and npm. The Sigil and calibre plugins pick it up on their own.
This release is about references: links, table-of-contents entries, media overlay text links and the like, and how each of them is counted. A user on Reddit ran epubcheck and epubveri side by side on 100 of their own books and shared the results. Of the 99 books epubcheck could finish, the two tools agreed on 98. The one disagreement was an extra error from epubveri, and tracing it led me through every place epubveri resolves a reference. I compared each one with epubcheck on a small test book of its own. What this means for your books:
That means a book may now get errors it did not get before. They are errors epubcheck already reports, which is why this is 0.19 and not 0.18.1. Two wrong findings are gone. The RSC-007 described above, which the Reddit comparison found. And a media overlay that reached a chapter only through epub:textref made epubveri report MED-013 on that chapter, which epubcheck does not do. It is also faster. Following the profile raeq posted on GitHub (#137), I profiled the two slowest books on my shelf. Validation of those 544 books now takes 9% less CPU time than without these changes. The speed changes did not change a single report, on any of those books or on W3C's 209 conformance publications. How much you gain depends on your books. One more thing came out of that check. A few findings about remote resources and standalone SVG files were printed in a different order on each run, so two runs of the same book could look different when nothing had changed. They are now always in the same order. epubveri and epubcheck still give the same message IDs on all 687 expected messages in epubcheck's own test suite. DNSB, thank you for the cover numbers (#370). That answers the question I put to JSWolf in #369 better than my own shelf could: in 17,192 books carrying the cover meta, 11 had a content value naming no manifest item, and those came from covers replaced without updating the id. So a note for that case would be true every time it fired and would fire rarely, which is what an optional note needs. I haven't decided on it yet. Last edited by Kayadelenium; 09-30-2026 at 10:33 AM. |
|
|
|
|
|
#372 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 222
Karma: 363834
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
|
epubveri 0.21.0 — CSS errors that say what is wrong, two CSS false positives gone, and the two releases I did not announce here (0.19.1, 0.20.0).
https://github.com/veripublica/epubv...es/tag/v0.21.0 If you use one of the plugins, there is nothing to do: all three fetch the latest release on their own. What can change on your books. Two CSS shapes that epubcheck passes were errors here, and now pass: an unquoted url() with a quote or a parenthesis in it that names a file the book really has, such as url(q'q.png), and a declaration written directly inside @media, as in @media print { color: red }. Two shapes epubcheck reports were missed here, and are now CSS-008 as there: a rule inside @font-face, and a value holding a { } block, as in p { color: red {} }. That second pair is why this is a minor release: a book with either can now fail where it passed. A book epubcheck passes still passes here. CSS-008 now says what is wrong, and quotes it. It used to read "CSS syntax error" whatever the problem was, while epubcheck names the token it stopped at. A reader comparing the two tools on Reddit pointed that out, and they were right. It now reads like this, with the line and column as before:
A broken url() is now read the way epubcheck reads it. CSS says an unquoted url() cannot contain a space, a quote or a parenthesis, and a browser never loads one that does. epubcheck takes everything up to the first ) as the address instead, and the verdict follows epubcheck, so url(a b.png) is now RSC-020 as there. What CSS says about it is the new ADV-015, shown only with --advisory and never part of the verdict. From 0.19.1: ADV-014, with --advisory. A <meta name="cover"> whose content is not the id of any manifest item. This is the check JSWolf asked for in #362, and DNSB's count in #370 (11 such books among 17,192 that carry the meta) is why I was comfortable adding it: it is rare, and true every time it fires. From 0.20.0: PKG-021 for an image whose header stops before its width and height, which epubveri used to pass in silence. Reported with a sample on GitHub (issue 138). It reads the same header epubcheck reads and nothing more, so it is never stricter than epubcheck. Speed and repeatability. A file with very many findings no longer slows down out of proportion: 100,000 broken selectors in one stylesheet took 23 seconds and now take under one. And the same book now gives the same report on every run. Findings at the same spot could come out in a different order from one run to the next, which made two reports hard to compare. That is fixed, and every release is now checked for it before it goes out. A correction to #371. The "15% less CPU" there was measured against a build that already contained 0.19.0's changes. Against 0.18.0 the figure was 9%, and 0.19.0 made a few books with many links in one large file slower, the worst from 0.11 s to 0.37 s. 0.19.1 fixed that. Since then every release is timed book by book against the previous release before it ships, and 0.21.0 passed that check on all 544 books on my shelf. If a CSS-008 reads wrong on one of your books, the quoted text should make it quick to show me where. |
|
|
|
|
|
#373 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 222
Karma: 363834
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
|
How epubveri reads CSS now, and the CSS specification that changed on 1 October.
The CSS changes in 0.21.0 come from somewhere specific, so a few words on it. On 1 October 2026 the W3C published a new draft of CSS Syntax Level 3, the specification that says how a stylesheet is parsed. Its main change is how a block is read: a style rule's { } now holds declarations and nested rules side by side, which is how browsers already read CSS nesting. CSS Syntax Module Level 3, Candidate Recommendation Draft of 1 October 2026 epubveri does not parse CSS itself. It uses styloria, a separate pure-Rust CSS parser I also write, published as its own library. styloria 0.12.0 follows that draft, and it came out the day after it. epubveri 0.21.0 is built on it. https://github.com/veripublica/styloria What that gives epubveri: the whole stylesheet comes back as one tree, with every block read by the same rules. Before, each at-rule's block had to be looked up in a table of which at-rules hold rules and which hold declarations. That table is where @media print { color: red } went wrong, and it is gone. The new reading also catches the two shapes I mentioned in #372 that were missed before, a rule inside @font-face and p { color: red {} }. Why nested CSS is still an error. The parser now understands nesting, but EPUB decides whether it is allowed. EPUB 3.3 supports CSS "as defined by the CSS Working Group Snapshot". The 2026 Snapshot lists CSS Syntax in its official definition of CSS, and lists CSS Nesting in a separate section, among modules that are widely deployed but not yet part of that definition. So epubveri reports a nested rule as CSS-008, as epubcheck does. If a future Snapshot moves nesting into the definition, that answer changes with it. One place I follow the specification rather than epubcheck. A string broken by a line break, as in content: "abc with the closing quote on the next line, ends at the line break in CSS. The quote that was meant to close it then opens a new string, and that one swallows the rest of its line, closing brace included. epubveri reports what that reading gives: the broken string, the second one, and the block that is now never closed. epubcheck skips ahead to the next ; { or } instead and reports one finding. Both call the book invalid, so the verdict is the same, but if you compare the two tools line by line, that is why the count differs there. |
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Plugin] epubveri - Simple epubveri wrapper | Doitsu | Plugins | 59 | 09-26-2026 06:36 AM |
| kepubify v4: A fast, standalone EPUB to Kobo EPUB converter | geek1011 | Kobo Reader | 49 | 12-30-2023 03:37 PM |
| Epub:type not allowed in epub validator | wDr | Editor | 0 | 07-01-2016 09:03 PM |
| ePub Validator | odedta | ePub | 9 | 06-01-2014 03:35 AM |
| epub validator | fiona86 | Conversion | 2 | 06-24-2011 11:34 AM |