Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-22-2015, 05:28 PM   #1
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
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>
However I need to add some homework with the Calibre Editor.
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>
When I open it with Sigil 9.2 (to add an index for example) and saves it
(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>
The problem is that it seems to be no more EPUB3 compliant because Epubcheck 3.0.1.
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.
Unless I'm mistaken for some reason, I think that Sigil should check the opf to see if it is dealing with an EPUB2 or EPUB3 before changing the DTD

Last edited by roger64; 12-22-2015 at 05:37 PM.
roger64 is online now   Reply With Quote
Old 12-22-2015, 05:35 PM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
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.
Turtle91 is offline   Reply With Quote
Old 12-22-2015, 05:45 PM   #3
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by Turtle91 View Post
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.
The point is that now Sigil should take care of the EPUB version before changing a DTD.
roger64 is online now   Reply With Quote
Old 12-22-2015, 05:52 PM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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
KevinH is offline   Reply With Quote
Old 12-22-2015, 06:12 PM   #5
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
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.
roger64 is online now   Reply With Quote
Old 12-22-2015, 06:13 PM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
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.
DiapDealer is offline   Reply With Quote
Old 12-22-2015, 06:27 PM   #7
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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
KevinH is offline   Reply With Quote
Old 12-22-2015, 07:36 PM   #8
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
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.
roger64 is online now   Reply With Quote
Old 12-22-2015, 08:43 PM   #9
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by roger64 View Post
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.
It's not that easy for Sigil. As I said, it needs to be able to parse html and doctypes properly even when no opf is present.

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.
DiapDealer is offline   Reply With Quote
Old 12-22-2015, 09:56 PM   #10
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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:
Originally Posted by roger64 View Post
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.
I am not sure I understand the problem.
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.
eschwartz is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 12:06 PM.


MobileRead.com is a privately owned, operated and funded community.