05-23-2014, 02:40 AM | #1 | |
Zealot
Posts: 110
Karma: 972092
Join Date: Jan 2012
Device: iPhone
|
"HTML files that are not well formed"
Quote:
|
|
05-23-2014, 02:55 AM | #2 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Exactly what it says. Apparently you have an issue in one or more of your HTML files according to Sigil. If you save, it will be fixed automatically based on your settings. However, be careful, since the fix is sometimes worse than the cure.
|
Advert | |
|
05-23-2014, 11:14 AM | #3 |
Well trained by Cats
Posts: 29,820
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
06-04-2014, 01:44 PM | #4 |
Writer
Posts: 101
Karma: 590630
Join Date: Mar 2011
Location: Munich, Germany
Device: none
|
whitespace expected
When trying to import an html file into Sigil, I get the message
line1: whitespace expected and the file will not be imported. This is line 1: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> There is no problem with Calibre. So what's wrong? (It is possible to copy the html code, paste it into Sigil and then let it be fixed automatically, but it is not the fastest way if you have many files.) George |
06-05-2014, 05:29 AM | #5 | |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Calibre accepts pretty much any file. OTOH, Sigil is more strict in its interpretation of standards.
Most likely Sigil expects a space and a dtd reference. Quote:
Code:
# sed -f sigil.sed -i *.html s/<!DOCTYPE html PUBLIC "-\/\/W3C\/\/DTD HTML 4\.01 Transitional\/\/EN">/<\?xml version="1\.0" encoding="utf-8" standalone="no"\?>\n<!DOCTYPE html PUBLIC "-\/\/W3C\/\/DTD XHTML 1\.1\/\/EN"\n "http:\/\/www\.w3\.org\/TR\/xhtml11\/DTD\/xhtml11\.dtd">/g Code:
sed -f sigil.sed -i *.html *If you have a Mac or a Linux machine you won't have to install sed. |
|
Advert | |
|
06-05-2014, 02:34 PM | #6 |
Writer
Posts: 101
Karma: 590630
Join Date: Mar 2011
Location: Munich, Germany
Device: none
|
Thanks so far. But it's useless, to change just the doctype declaration. I have tried it. You have to edit the rest of the document too until it fits.
I found out, that "Line 1: whitespace expected" means, that Sigil wants an empty line instead of the doctype declaration. But then all the other messages follow. So in short: Calibre converts old style html files, Sigil does not. They must be in UTF-8 format, you have to convert them first to the xml type and they have to be well formatted. Otherwise they will be rejected. Or, as I have done: Create the epub with Calibre, then clean the CSS code in Sigil if wanted. George |
06-10-2014, 11:25 AM | #7 | |
Guru
Posts: 787
Karma: 1575310
Join Date: Jul 2009
Device: Moon+ Pro
|
Quote:
<p> stuff /p> When looking at tags I find myself looking at the content & not the entire tag. Particularly 'complex' tags (<p class="calibre" stuff</p>) |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
KT "Ghost covers/files" again at 670 books, "stale" image entries in firmware | VirgoGirl | Kobo Reader | 4 | 04-06-2012 02:10 PM |
Fixed Layout Sample ".mobi" file with package(html, css, opf, ncx files). | Sushil | Kindle Fire | 1 | 01-13-2012 07:16 AM |
MS Word "crap" at beginning of html files | PatNY | Sigil | 23 | 10-21-2010 06:22 PM |
Sigil 024 and regular expressions on "all HTML files" | WS64 | Sigil | 4 | 08-13-2010 07:33 PM |