From 6835275408e1629f450d163e0cc5221c977e87d2 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 13 Sep 2026 20:53:26 -0400 Subject: epub and html: no errors left over the sample set epubcheck 5.3.0 over the 35 sample epubs went from 1302 remaining errors to none. The six causes for those remaining errors fixed here. most of the count was one of them: - Tables (1123 errors, 86%) where the writer emitted obsolete attributes, removed in 2014; table also now in div instead of a paragraph. also fixed: - Navigation (115). Every level 4 heading's nav entry ended "#0", the ocn of an object that has no ocn and so no id. - Duplicate ids (37). (from three unrelated sources). - The publication identifier (27 warnings). dc:identifier was a hardcoded hex string, not a UUID, and the same one in all 35 files, so two documents in one library collided. It is now UUID v5 over the document's own uid: a real RFC 4122 identifier, stable across builds and distinct per document. - Image manifest entries (15). media-type was "image/" plus the file extension, giving "image/jpg", which is not a media type; epubcheck reads it as a foreign resource and wants a fallback. There is now a mapping, which also covers svg and webp. Item ids came from the file basename, and "2bits_02_01-100.png" gave an id starting with a digit, which is not an XML name; ids are now prefixed and sanitised. - An ocn resolving to no segment (9). A poem block and its first verse share one ocn; the verses are written into a segment and the block itself is not. Also dropped from the package document: an xmlns:xsi that nothing used, and a prefix declaration for the rendition vocabulary, which is a reserved prefix and needed no declaring. The package now carries xml:lang. test-epub-validity.sh now allows no fatal and no error. Two NAV-011 warnings remain and are described in it. Three reference .ssp files change, all of them the anchor tag disambiguation above. (assisted by Claude-Code) --- org/tests_for_document_abstraction_shell_scripts.org | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'org/tests_for_document_abstraction_shell_scripts.org') diff --git a/org/tests_for_document_abstraction_shell_scripts.org b/org/tests_for_document_abstraction_shell_scripts.org index a70a5f4..369a7f6 100644 --- a/org/tests_for_document_abstraction_shell_scripts.org +++ b/org/tests_for_document_abstraction_shell_scripts.org @@ -1278,13 +1278,17 @@ SPINE_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" # markup and left an unbalanced behind - was a url boundary defect in # the abstraction, and is fixed. # -# The errors that remain are, in order of how many: -# the table writer's obsolete presentational attributes, width on every -# cell and summary/border/cellpadding/align on the table; the navigation -# document linking to "#0", a fragment that is never defined; duplicate -# ids; a table inside a

; an opf id containing a colon. +# No error is allowed either, and none is outstanding. Both numbers being +# zero is the point: anything at all that epubcheck calls an error is a +# regression, and there is no list to add to. +# +# Two warnings remain and are not counted here. Both are NAV-011 in the +# same shape, in two documents: the navigation document lists one file +# twice, and the repeat is behind the previous entry in spine order. It +# comes from how the endnotes part and section headings are ordered, not +# from the navigation writer. FATALS_ALLOWED=${SpineEpubFatalsAllowed:-0} -ERRORS_ALLOWED=${SpineEpubErrorsAllowed:-1312} +ERRORS_ALLOWED=${SpineEpubErrorsAllowed:-0} if [ -z "$SpinePOD" ]; then echo "ERROR: \$SpinePOD is not set." >&2 -- cgit v1.2.3