Here is the git patches that solve this issue. The patches make `texi2any --epub` create a valid EPUB according to the latest version (3.3).
This can be checked by using the `epubcheck` program with the EPUB file.
>From f2fe59894c86e72939b42749a5e479a96c1795c5 Mon Sep 17 00:00:00 2001 From: Daniel Cerqueira <dan....@lispclub.com> Date: Tue, 20 Aug 2024 21:08:10 +0100 Subject: [PATCH 1/2] tp/ext/epub.pm: add mandatory tag of dcterms:modified - fix validity of EPUB file, adding the mandatory dcterms:modified meta tag Signed-off-by: Daniel Cerqueira <dan....@lispclub.com> --- tp/ext/epub3.pm | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/tp/ext/epub3.pm b/tp/ext/epub3.pm index d2bf751ff8..8ba930fc96 100644 --- a/tp/ext/epub3.pm +++ b/tp/ext/epub3.pm @@ -98,6 +98,9 @@ use Texinfo::Common; use Texinfo::Convert::Utils; use Texinfo::Convert::Text; +# for the meta dcterms:modified tag +use Time::Piece; + # try to load here, but only complain and return an error later # when the customization variables are known. eval { require Archive::Zip; }; @@ -754,16 +757,9 @@ EOT my $unique_uid = 'texi-uid'; # TODO to discuss on bug-texinfo my $identifier = 'texinfo:'.$document_name; - # FIXME the dcterms:modified is mandatory, and it is also mandatory that it is a date: - # each Rendition MUST include exactly one [DCTERMS] modified property containing its last modification date. The value of this property MUST be an [XMLSCHEMA-2] dateTime conformant date of the form: - - # CCYY-MM-DDThh:mm:ssZ - # - # The last modification date MUST be expressed in Coordinated Universal Time (UTC) and MUST be terminated by the "Z" (Zulu) time zone indicator. - # - # <meta property="dcterms:modified">2012-03-05T12:47:00Z</meta> - # to discuss - # <dc:rights> + # the [XMLSCHEMA-2] dateTime ( CCYY-MM-DDThh:mm:ssZ ) + my $datetime_zulu = gmtime()->strftime("%Y-%m-%dT%TZ"); + my $opf_file_path_name = File::Spec->catfile($epub_destination_directory, $epub_document_dir_name, $opf_filename); my ($encoded_opf_file_path_name, $opf_path_encoding) @@ -784,6 +780,7 @@ EOT <metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:identifier id="$unique_uid">$identifier</dc:identifier> <dc:title>$title</dc:title> + <meta property="dcterms:modified">$datetime_zulu</meta> EOT my @relevant_commands = ('author', 'documentlanguage'); my $collected_commands = Texinfo::Common::collect_commands_list_in_tree( base-commit: 01c47c76d65aa86dbd38d8bb969b1a511b7258d8 -- 2.45.2
>From 1b437c711aecd0a4c8255d127a84467bfb3f3256 Mon Sep 17 00:00:00 2001 From: Daniel Cerqueira <dan....@lispclub.com> Date: Tue, 20 Aug 2024 21:51:19 +0100 Subject: [PATCH 2/2] tp/Texinfo/Convert/HTML.pm: Fix EPUB validity on table border - fix `epubchecker` error thrown on checking for validity of an EPUB file. This addresses the index <table ... border=...> element and property. Signed-off-by: Daniel Cerqueira <dan....@lispclub.com> --- tp/Texinfo/Convert/HTML.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm index 5901e0db53..ed31b145bc 100644 --- a/tp/Texinfo/Convert/HTML.pm +++ b/tp/Texinfo/Convert/HTML.pm @@ -5978,7 +5978,7 @@ sub _convert_printindex_command($$$$) # now format the index entries $result .= $self->html_attribute_class('table', ["$index_name-entries-$cmdname"]) - ." border=\"0\">\n" . '<tr><td></td>' + ." border=\"\">\n" . '<tr><td></td>' . $self->html_attribute_class('th', ["entries-header-$cmdname"]).'>' # TRANSLATORS: index entries column header in index formatting . $self->convert_tree($self->gdt('Index Entry')) .'</th>' -- 2.45.2