![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,624
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
EPUB3 and DOCTYPE
Hi
I just produced an EPUB3. The xhtml files began this way: Code:
<!DOCTYPE html> <html lang="fr-FR" xml:lang="fr-FR" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Title</title> <meta charset="UTF-8" /> <link href="styles/styles.css" rel="stylesheet" type="text/css" /> </head> Once "beautified" with the Calibre editor, it looks this way: Code:
<?xml version='1.0' encoding='utf-8'?> <html xmlns="http://www.w3.org/1999/xhtml" lang="fr-FR" xml:lang="fr-FR"> <head> <title>Title</title> <link href="styles/styles.css" rel="stylesheet" type="text/css"/> </head> Both files agree on utf8. However, I would have rather, for EPUB3 files, let this part untouched, as it looks correct (even if the second one is correct too). Would it be possible to make the above change optional for EPUB3 files? |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,365
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Calibre doesn't do doctypes. Your choices are to not use Beautify, or to create a regex function/plugin to put them (doctypes) back after Beautifying/Fixing, or to get used to them not being there. The editor's not really epub3 aware to begin with, it just doesn't break an epub3 if you're careful.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,624
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
I know Calibre did not do Doctype for EPUB2. I think one of the points was to get rid of entities which had bothered Sigil users some time and to use utf-8 only. This is the past.
But maybe, it could offer an option for EPUB3 where entities cannot be used? I read this comment from a qualified representative of the IDPF : Quote:
Last edited by roger64; 05-05-2015 at 05:43 PM. |
|
![]() |
![]() |
![]() |
#4 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,365
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
There is no: Code:
if is epub3: blah, blah else: blah Last edited by DiapDealer; 05-05-2015 at 06:31 PM. |
|
![]() |
![]() |
![]() |
#5 |
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)
|
Since the editor doesn't recognize EPUB3 and aparently EPUB3 doesn't recognize doctypes, what is the problem?
(Did EPUB2 recognize them? ![]() Wouldn't be the first time missing doctypes irritated calibre users, and calibre still doesn't care. They are unnecessary and their only purpose is basically as a security blanket, so... ignore them? That was the general idea in EPUB2 as well! Honestly I don't quite understand what this has to do with EPUB3 specifically anyway, can we file this under "calibre eats my doctypes and I like them so please hands off"? |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,624
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
@echwartz
I am sorry you do not understand and I hope I don't offend anyone. @DiapDealer Quote:
I just ask an "EPUB3 related" question... Last edited by roger64; 05-06-2015 at 01:56 AM. |
|
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,365
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
No, not impossible at all. I was just addressing your wish to have calibre's editor treat epub3's differently. The simple answer is that the editor doesn't speak epub3 (other than being able to handle html5 and css3). Until it does officially support epub3, there's little point in asking for it to treat epub3s differently.
|
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,624
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Open-source EPUB3 converters begin to appear (I use one, even if it is still in beta). It's seems natural for me to open the newly created EPUB3 in the Calibre editor.
It's about time to define an EPUB3 policy as there are significant differences in some fields between EPUB3 and EPUB2 (and very few in others). Maybe my question is the first of many others which will come soon. |
![]() |
![]() |
![]() |
#9 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,199
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
As I have said before, you do not need doctypes in your ebooks. They serve no useful purpose. That remains just as true for EPUB 3 as it is for EPUB 2. The HTML standard has moved away from DTD (A DTD is what a doctype declares). As such I have no intentions of supporting doctype in calibre, regardless of versions of epub.
|
![]() |
![]() |
![]() |
#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:
![]() Quote:
![]() After all, its not like EPUB3 treats them differently than EPUB2 so why would it make a difference? |
||
![]() |
![]() |
![]() |
#11 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,624
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
@eschwartz Quote:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> Code:
<!DOCTYPE html> - with the first (old) one, you can use named entities. - with the second (new - html5), you can't. But don't worry, I understand that the Calibre way will just stay the same. ![]() Last edited by roger64; 05-06-2015 at 10:39 AM. |
||
![]() |
![]() |
![]() |
#12 |
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)
|
They are the same except one includes a reference to the xhtml specifications.
Both are declaring the file to be of type="html" -- useful, that. ![]() |
![]() |
![]() |
![]() |
#13 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,624
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Hi
@eschwartz I am sorry to disagree again with your previous comment. In this precise context, the word html does not mean the same thing: its meaning is related to the Doctype you use <!DOCTYPE html> goes at the top of every HTML5 page. The HTML5 word <!DOCTYPE html> means "this page is written in HTML5" as opposed to, say HTML 4.01. (and its three different former Doctypes). It may be useless for EPUB3 purposes, but it's different. ![]() Last edited by roger64; 05-07-2015 at 01:59 AM. Reason: purpose |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
ePub3-3D | odedta | ePub | 4 | 08-13-2014 09:02 AM |
Epub3 XHTML Validation epub3 | Ramesh Arpitha | ePub | 5 | 06-30-2014 08:32 PM |
New Errors Converting epub3 -> zip -> epub3 | Lola25 | ePub | 2 | 11-12-2013 09:37 PM |
DOCTYPE ERROR | Zenphobia | ePub | 15 | 09-20-2013 07:45 PM |
Bad DOCTYPE declaration causes BS to crash | macpablus | Recipes | 7 | 09-04-2011 03:41 PM |