|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#16 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,828
Karma: 206879174
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
![]() It's not Kovid's duty to change things in Calibre just because Sigil handles things differently. Nor are we going to worry about accommodating every single thing that Calibre does differently. Calibre (and the Modify Epub plugin is using calibre's own code to generate the Jacket) doesn't use (and will sometimes omit or remove) doctypes and xml declarations. Sigil uses (and will want to insert) doctypes and xml declarations. Those who use both programs for editing epubs are simply going to have to get used to seeing Sigil's warning about missing doctypes. There are some differences in the two programs that are simple and unobtrusive to accommodate, but doctypes (and doctype insertions) vs no doctypes (and doctype omission/removal) is not one of them. Last edited by DiapDealer; 09-14-2022 at 04:23 PM. |
|
![]() |
![]() |
![]() |
#17 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 47,741
Karma: 172313956
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
You will also see this with Modify Epub and insert/replace cover.
I just live with the error. |
![]() |
![]() |
![]() |
#18 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
![]() Quote:
I haven't seen you post about those in a while. |
||
![]() |
![]() |
![]() |
#19 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,960
Karma: 30277294
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
For years I've been assuming it was something to do with conversion from DOCX, I then use Modify to strip non-dc metadata and covers, and add a jacket (at the back) of EPUBs.
BR |
![]() |
![]() |
![]() |
#20 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
|
Quote:
I was about to updateby saying it happens with any random book in my library so no value in puloading specific books. Don't use epub3 , so it's an 3pub2 issue for me I do use the plugin to deal with covers. I need proper covers or things go bad when covered and read as kepub. So should I make a request for a fix somewhere and should that be in sigil or in the plug in |
|
![]() |
![]() |
![]() |
#21 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,828
Karma: 206879174
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Sigil is not going to stop warning about missing doctypes if that helps. Nor is it going to go back to silently making changes to epub code in the background.
|
![]() |
![]() |
![]() |
#22 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
|
Quote:
I looked for any easy way to log what changes were being made which were upsetting sigil but no joy. Could not find any helpful logs to upload. It happens, on my modify settings, with any randomly chosen epub2 from my library so uploading one of those did not seem useful The books render ok on all my devices even if I ignore the error report and just read them. I am happy to log a proper update or fix request cnce advised whether it's sigil needs updating to ignore error or modify epub need updating to stop it upsetting sigil. Meanwhile yes I can tweak my workflow. It's not understanding what's happening at code level that bugs me. Usually, I am only tweaking an epub2 format so that it will navigate well when converted to kepub, so I am making sure there is exactly one header tag per file and that there is a cover in the expected place to keep kobo renderer and navigation happy |
|
![]() |
![]() |
![]() |
#23 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
|
Quote:
Out of interest, could I have gotten sigil to tell me where in the book it was seeing the missing doctype? I did not see any way to force a detailed report I looked at all the files in app data but none seemed to be detailed logs. |
|
![]() |
![]() |
![]() |
#24 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,006
Karma: 6361444
Join Date: Nov 2009
Device: many
|
Yes use Sigil's built in Checkpointing and Diffing features. Load the epub and tell it to make no changes. Make a Checkpoint. Reload the epub and allow it to auto fix things. Then compare it against the Checkpoint using the Compare/Diff command of Checkpointing.
To prevent this cycle you need to change your workflow or you will need to get the author of modify epub to add the proper doctype to both the jacket and cover it creates. Or just let Sigil auto fix the missing doctypes and be done with it. Last edited by KevinH; 09-15-2022 at 06:44 PM. |
![]() |
![]() |
![]() |
#25 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
|
Thanks again.
Maybe I should read an idiots guide to doc types and why they matter, or don't matter , in epub? |
![]() |
![]() |
![]() |
#26 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
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">
- - - Note: In your very specific Modify EPUB example, there's a single file—the new cover file—that's missing this DOCTYPE. - - - What's That DOCTYPE Code Saying? "Hey! I'm written in XHTML 1.1." Programs can use this to determine what the heck is in the file, instead of trying to completely guess. Reason 1: Rules This then sets up some "rules" the program can follow. For example:
If the DOCTYPE is missing, the program will have to guess based on filenames... or just assume it's HTML. - - - Sigil, when opening and popping up that warning, is saying: "Hey! This thing isn't 100% correct according to the specs. Add a DOCTYPE!" Calibre is saying: "Meh, it's just HTML or XHTML." - - - Reason 2: Named (or Numbered) Entities "Named Entities" are stuff like:
"Numbered Entities" are stuff like:
In EPUB2, both versions are allowed. In EPUB3, only the numbers are allowed. What Sigil/Calibre do, when fixing your files, is: 1. Convert all entities into their proper Unicode characters. 2. In EPUB3, convert to the numbered version if needed. So everything changes into Unicode Characters:
And only a few change to numbered form. The most famous one is:
That's pretty much the major code changes that Sigil/Calibre do when you say "Fix my files." - - - Note: If you want to read even more of the technical details on DOCTYPE, see the HTML specs: - - - Side Note: There's also been tons of topics over the years where we've discussed stuff like:
Just type into your favorite search engine: Code:
whatever term you want Tex2002ans site:mobileread.com ![]() Quote:
It's like going from 99.999% correct to 100% correct. KevinH (+ Sigil) says follow the specs. Kovid (+ Calibre) says that .001% doesn't matter in reality. (This is all going based off memory. It's buried somewhere in those previous DOCTYPE MobileRead topics.) Last edited by Tex2002ans; 09-16-2022 at 02:05 AM. |
||
![]() |
![]() |
![]() |
#27 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,492
Karma: 150249619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
If ePub is not correct with the doctype, why doesn't epubcheck flag a missing doctype as an error?
|
![]() |
![]() |
![]() |
#28 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Spoiler:
You also have a few comments in there like: Code:
// for heritage content collections, dont warn about this, as its not // explicitly forbidden by the spec Code:
<!DOCTYPE html> Code:
// warn for obsolete or unknown doctypes Sigil and Calibre create perfectly valid EPUBs, and have forever. As I explained, it's like a 99.999% vs. 100% thing. No normal human will ever have to worry about this DOCTYPE stuff. Just press "Fix", and Sigil/Calibre will take care of it for you. ![]() Last edited by Tex2002ans; 09-16-2022 at 06:07 AM. |
|
![]() |
![]() |
![]() |
#29 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 47,741
Karma: 172313956
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
At this point, I just live with the problem since it is not a showstopper and it is a lot faster to ModifyEpub or Polish to add the cover and then open in Sigil and mend to fix the issue. |
|
![]() |
![]() |
![]() |
#30 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,492
Karma: 150249619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
This could be the code causing the problem for jackets. It's at the end of jacket.py.
Code:
def is_legacy_jacket(html): nodes = html.xpath('//x:h1[starts-with(@class,"calibrerescale")]', namespaces={'x':'http://www.w3.org/1999/xhtml'}) if not nodes: nodes = html.xpath('//x:h2[starts-with(@class,"calibrerescale")]', namespaces={'x':'http://www.w3.org/1999/xhtml'}) return len(nodes) > 0 def is_current_jacket(html): nodes = html.xpath('//x:meta[@name="calibre-content" and @content="jacket"]', namespaces={'x':'http://www.w3.org/1999/xhtml'}) return len(nodes) > 0 |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
missing html files in a edited epub | woooz | Editor | 4 | 05-18-2020 02:11 PM |
Epub Doctype, Schema and Metadata? | Clancolin | Sigil | 8 | 01-12-2016 06:15 AM |
"HTML files that are not well formed" | automa | Sigil | 6 | 06-10-2014 11:25 AM |
ePub to HTML conversion missing links | trevgrif | Conversion | 7 | 03-04-2014 09:47 PM |
Missing epub package files | Jbraunag | ePub | 3 | 02-13-2012 01:25 PM |