What steps will reproduce the problem?
1. Generate EPUB output, e.g., "python downaloder.py
http://www.fanfiction.net/s/5782108/1/ epub".
2. Test it with epubcheck or http://threepress.org/document/epub-validate/. The
following error will sometimes appear: "ERROR:
Harry_Potter_and_the_Methods_of_Rationality.epub/OEBPS/MTEuIE9tYWtlIEZpbGVzIDEgY
W5kIDI=.xhtml(45): unknown element "u" from namespace
"http://www.w3.org/1999/xhtml"".
What is the expected output? What do you see instead?
The EPUB output is invalid. While it may work on some devices, it may fail on
others.
What version of the product are you using? On what operating system?
I'm using current tip (26:54fc9b30ced5) on Python 2.6.4 (Ubuntu 9.10), plus the
patches from issue 6, issue 7, issue 8 and issue 9 (which don't affect this
issue, though the patch is made on top of the patch for issue 9).
Please provide any additional information below.
The EPUB standard specifies a particular subset of XHTML 1.1 which is part of
the standard. While readers may support more modules, only the modules
specified in the standard are guaranteed to be present.
http://www.idpf.org/doc_library/epub/OPS_2.0.1_draft.htm#Section2.2
Specifically, the "u" element--underlined text--is not included. It needs to be
replaced with a CSS element. The "stylesheet.css" defined in constants.py
already includes a "u" class which sets "text-decoration: underline";
therefore, replacing "u" elements with "span class='u'" elements retains the
meaning in a specification-compliant fashion.
The attached patch, which is written on top of the patch for issue 9 and may
not apply without it, makes this modification.
Original issue reported on code.google.com by adam.buc...@gmail.com on 20 Sep 2010 at 2:15
Original issue reported on code.google.com by
adam.buc...@gmail.com
on 20 Sep 2010 at 2:15Attachments: