From: Robert BÅ‚aut Date: Tue, 28 Jan 2014 13:46:26 +0000 (+0100) Subject: [ePub] Fix for error validation with epubcheck 3.0.1 in multi-volume books X-Git-Tag: 1.7~104^2~16 X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/a2d21637276d0386412ca17316d6624f0a3105ab [ePub] Fix for error validation with epubcheck 3.0.1 in multi-volume books ERROR: example.epub/OPS/toc.ncx(24,47): assertion failed: different playOrder values for navPoint/navTarget/pageTarget that refer to same target --- diff --git a/librarian/epub.py b/librarian/epub.py index fa15920..2f7bbec 100644 --- a/librarian/epub.py +++ b/librarian/epub.py @@ -311,7 +311,9 @@ def transform_chunk(chunk_xml, chunk_no, annotations, empty=False, _empty_html_s toc = TOC() for element in chunk_xml[0]: - if element.tag in ("naglowek_czesc", "naglowek_rozdzial", "naglowek_akt", "srodtytul"): + if element.tag in ("naglowek_czesc"): + toc.add(node_name(element), "part%d.html#book-text" % chunk_no) + elif element.tag in ("naglowek_rozdzial", "naglowek_akt", "srodtytul"): toc.add(node_name(element), "part%d.html" % chunk_no) elif element.tag in ('naglowek_podrozdzial', 'naglowek_scena'): subnumber = toc.add(node_name(element), "part%d.html" % chunk_no, level=1, is_part=False)