LessWrong-Portable icon indicating copy to clipboard operation
LessWrong-Portable copied to clipboard

Chapter template and XML schema errors

Open gavento opened this issue 4 years ago • 1 comments

While building the ebook multi-agent-model with the current version (086aca65f389641701000253f05124e45d94475f), the epub is not a valid XML which breaks my reader (OReader at C-Tech Lexis; works for ~99% other epubs).

The issues reported by Calibre book editor (in calibre: edit imported book -> check book) are abount an undefined namespace. Indeed the header of chapter files is:

<html xmlns="http://www.w3.org/1999/xhtml"><head/><body><section epub:type="chapter" id="chapter">
    <!-- Your contents here -->
  <h1>Against "System 1" and "System 2" (subagent sequence) </h1><div><p>The terms System 1 and System 2 [...]

This is weird since the template for a chapter (templates/chapter.xhtml) has a different structure and does declare the namespace ... Perhaps the template is not used, or the EPUB library silently does something weird to it afterwards?

Errors from calibre. Manually removing the namespace epub: fixed this for my reader.

ERROR: Parsing failed: Namespace prefix epub for type on section is not defined, line 1, column 98    [OEBPS/chapter-10.xhtml]
ERROR: Parsing failed: Namespace prefix epub for type on section is not defined, line 1, column 98    [OEBPS/chapter-11.xhtml]
ERROR: Parsing failed: Namespace prefix epub for type on section is not defined, line 1, column 98    [OEBPS/chapter-12.xhtml]
ERROR: Parsing failed: Namespace prefix epub for type on section is not defined, line 1, column 98    [OEBPS/chapter-13.xhtml]
ERROR: Parsing failed: Namespace prefix epub for type on section is not defined, line 1, column 98    [OEBPS/chapter-14.xhtml]
ERROR: Parsing failed: Namespace prefix epub for type on section is not defined, line 1, column 98    [OEBPS/chapter-15.xhtml]
ERROR: Parsing failed: Namespace prefix epub for type on section is not defined, line 1, column 98    [OEBPS/chapter-16.xhtml]
ERROR: Parsing failed: Namespace prefix epub for type on section is not defined, line 1, column 98    [OEBPS/chapter-17.xhtml]
ERROR: Parsing failed: Namespace prefix epub for type on section is not defined, line 1, column 98    [OEBPS/chapter-18.xhtml]
ERROR: Parsing failed: Namespace prefix epub for type on section is not defined, line 1, column 98    [OEBPS/chapter-2.xhtml]
ERROR: Parsing failed: Namespace prefix epub for type on section is not defined, line 1, column 98    [OEBPS/chapter-3.xhtml]
ERROR: Parsing failed: Namespace prefix epub for type on section is not defined, line 1, column 98    [OEBPS/chapter-4.xhtml]
ERROR: Parsing failed: Namespace prefix epub for type on section is not defined, line 1, column 98    [OEBPS/chapter-5.xhtml]
ERROR: Parsing failed: Namespace prefix epub for type on section is not defined, line 1, column 98    [OEBPS/chapter-6.xhtml]
ERROR: Parsing failed: Namespace prefix epub for type on section is not defined, line 1, column 98    [OEBPS/chapter-7.xhtml]
ERROR: Parsing failed: Namespace prefix epub for type on section is not defined, line 1, column 98    [OEBPS/chapter-8.xhtml]
ERROR: Parsing failed: Namespace prefix epub for type on section is not defined, line 1, column 98    [OEBPS/chapter-9.xhtml]

gavento avatar Jul 26 '20 15:07 gavento

Thanks @gavento! Looking in to it...

AABoyles avatar Jul 27 '20 13:07 AABoyles