![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
A DTD bug with 9.2?
Hi
When I export to EPUB3 an odt file using my converter, it looks like this and it is EPUB3 compliant (according to Epubcheck 3.0.1.) Code:
<!DOCTYPE html> <html lang="fr-FR" xml:lang="fr-FR" xmlns="http://www.w3.org/1999/xhtml"> <!-- This file was converted to xhtml by Writer2xhtml ver. 1.5.2. See http://writer2latex.sourceforge.net for more info. --> <head> After this work, my EPUB looks like this but it still is EPUB3 compliant. Code:
<?xml version='1.0' encoding='utf-8'?> <html xmlns="http://www.w3.org/1999/xhtml" lang="fr-FR" xml:lang="fr-FR"> <!-- This file was converted to xhtml by Writer2xhtml ver. 1.5.2. See http://writer2latex.sourceforge.net for more info. --> <head> (I ask Preferences to check on "exit") It looks now like this Code:
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="fr-FR" xml:lang="fr-FR"> <!-- This file was converted to xhtml by Writer2xhtml ver. 1.5.2. See http://writer2latex.sourceforge.net for more info. --> <head> gives me this error report for each html file. Code:
ERROR: bugreport.epub/OEBPS/Text/chapter1.html: Obsolete or irregular DOCTYPE statement. External DTD entities are not allowed. Use '<!DOCTYPE html>' instead. Last edited by roger64; 12-22-2015 at 05:37 PM. |
![]() |
![]() |
![]() |
#2 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,295
Karma: 20171067
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
As far as I understand, Sigil does not - yet - open and work with epub 3 files. There is a plugin to save-as an epub3...but not to open and work with one natively. They are working on adding more epub3 support.
|
![]() |
![]() |
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
The point is that now Sigil should take care of the EPUB version before changing a DTD.
|
![]() |
![]() |
![]() |
#4 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
It does allow either epub2 or epub3 doctypes but if you give it no doctype it will default to generating an epub2 doctyp.
So supply the proper doctype and it will keep it. Give it no doctype, it will default to epub2 since most users are epub2 since Sigil's epub3 support is limited. KevinH |
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
I see your point, but this blind behaviour may confuse some users. To be right for "most users" is not really satisfactory. It means you are wrong for a small but growing minority.
![]() Anyway, I felt compelled to report about it but it's easy to deal with once you are warned about this behaviour. |
![]() |
![]() |
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Thanks for bringing this to our attention.
If a file has a valid html5 doctype, Sigil will leave it alone. If a file has a valid xhtml doctype, Sigil will leave it alone. If a file has an irregular or missing doctype, then Sigil will give it an xhtml (epub2) doctype (at least that is my understanding, Kevin will be able to better answer this). This was done to fix a bug where files with irregular doctypes couldn't be opened by Sigil at all. If EpubCheck is OK with no doctype (which is what the calibre editor is producing), then we'll probably need to add an additional check for files with no doctype to determine if they are part of an epub3 or not. The problem is that html files can be imported into Sigil with no opf file to indicate epub2 vs epub3. For now, your best bet is to make sure your html files already have the correct doctype before opening them with Sigil until we can see if there's a better way to handle files with no doctype. EDIT: Kevin obviously responded while I was composing. ![]() Last edited by DiapDealer; 12-22-2015 at 06:15 PM. |
![]() |
![]() |
![]() |
#7 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
It is not blind. It is just that Sigil is not completely epub3 aware yet. You can easily mess up an epub3 in Sigil using the Index generator, using the MetaData gui, using the glossary generator, by adding an empty xhtml file via the gui, using the ncx generator, even just by using a named entity such as a nbsp, etc. Sigil's epub3 support is a work in progress that is just starting. The main work so far has been in tearing out almost all of the internals and then rebuilding them from pieces that support html5 natively.
At some point not too far down the road, there will be a Sigil preference setting that will determine if things default to epub2 (like now) or epub3. That change has simply not happened yet. Hope this explains things. KevinH |
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Sorry for the word "blind" which may look unpleasant. I did not mean to be.
![]() To answer to DiapDealer, the EPUB3 produced with writer2xhtml 1.5.2. have an EPUB3 dc format line written in the metadata (opf file) which makes easy to identify their version. |
![]() |
![]() |
![]() |
#9 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
I think you'll notice that if you open your original writer2xhtml epub3 output directly with Sigil, that there's no problem. It's only after calibre removes the doctype that Sigil corrupts it (note: I'm not finger-pointing. I'm well aware of Kovid's decision to not use doctypes in calibre's editor and I respect his decision). This will not be an issue when Sigil is fully epub3-"aware." Until it is, you should avoid doing anything other than the very simplest editing of epub3's using Sigil. And you should avoid opening files that have no doctype (unless it's an epub2) until that time as well. |
|
![]() |
![]() |
![]() |
#10 | |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
Surely, everyone knows that Sigil's official stance on EPUB3 is currently "we do not support it, sorry"? The fact that Sigil is in the process of incorporating features that make it less likely to trample on an EPUB3, does not mean that Sigil actually supports EPUB3 (yet). Blindly trusting an EPUB3 that has been edited with Sigil to pass Epubcheck seems to me to be optimistic to the point of foolishness. For now, one should *expect* odd errors to crop up when editing EPUB3, and know how to deal with them. Or use the EPUB3 export plugin. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[BUG] - M96 out of memory - [BUG] | Alf77 | Onyx Boox | 5 | 02-05-2015 11:47 AM |
Aura HD Possible 2.8.1 bug | jackastor | Kobo Reader | 46 | 08-18-2013 04:22 PM |
DR800 Help, I've got a bug!! A bug on my screen!! | Franky | iRex | 4 | 06-21-2011 11:45 AM |
Embedded font bug or CSS bug in ADE | JSWolf | ePub | 10 | 06-11-2011 02:34 PM |
PRS-505 bug or eBookLib bug? | porkupan | Sony Reader | 3 | 10-07-2007 10:44 PM |