![]() |
#1 |
Read, don't parrot.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
Bug in 9.1 not adding title to head
Hi,
Just finished a file in the newest version and ePubChecked it, and it failed validation because, when splitting a document, Sigil is failing to add title information: Code:
<title></title> Code:
<title>Section0008.xhtml</title> ERROR: OpenBook.epub/OEBPS/Text/Section0008.xhtml(10,8): element "head" incomplete; missing required element "title" for every section. Last edited by eggheadbooks1; 12-04-2015 at 02:34 PM. Reason: addition |
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,506
Karma: 5703586
Join Date: Nov 2009
Device: many
|
If you split a file you must supply the title for the new file created and possibly revise the title of the old file given its contents have changed. Using the name of the file as a "title" is not a good idea to say the least.
KevinH |
![]() |
![]() |
![]() |
#3 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
|
The content of the title-element is not used at all and meaningless, just the standard says its mandatory. so why not just use <title /> ?
|
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Exactly, the title is allowed to be empty since it has no meaning in an ePUB.
|
![]() |
![]() |
![]() |
#5 | |
Read, don't parrot.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
Quote:
1. the new section simply had <title></title> in the head. 2. Sigil placed the name of the section in the <title></title> and I got what I wrote in my previous post. Either way, when splitting into sections now using Ctrl+Enter, Sigil is creating the new section but not putting <title></title> in the head, and thus the file is failing validation. I have never in the past manually made any adjustments regarding <title></title>. |
|
![]() |
![]() |
![]() |
#6 |
Read, don't parrot.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
I misspoke: the program that put a title into the <title> head was InDesign. Books made with Sigil left the field blank.
|
![]() |
![]() |
![]() |
#7 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
|
I'm using Sigil 091 @ Win7/64
I used 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"> <head> <title>1</title> </head> <body> <p>lorem</p> <p>ipsum</p> </body> </html> 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"> <head> <title>1</title> </head> <body> <p>lorem</p> </body> </html> 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"> <head> <title>1</title> </head> <body> <p>ipsum</p> </body> </html> |
![]() |
![]() |
![]() |
#8 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,394
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm not following at all.
When splitting a file that has title tags, the result (with Sigil 0.9.1) will be two files with the exact same title tags (blank or otherwise). Sigil neither removes nor adds nor changes their contents. If your file has no title tags to begin with, then that's invalid. You need to add them. Sigil is no longer the invasive "Fixer of all invalid code." Its clean-source settings are mainly concerned with code being well-formed. Last edited by DiapDealer; 12-04-2015 at 03:50 PM. |
![]() |
![]() |
![]() |
#9 |
Read, don't parrot.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
I cannot say what is happening. Just that I built a book by importing an HTML file and split it at the cursor (Ctrl+Enter). When I went to validate it, it failed due to missing <title> information. I had to manually add
Code:
<title></title> But I think I may have a clue: when I open the HTML file in Sigil, there is no title element in it. So when I split it at the cursor, Sigil is just replicating what is already there and not adding the missing element. In previous versions, when I imported an HTML file (it's my usual process: Word > Save as Web Page, Filtered > Open in Sigil), Sigil added the <title> element. It must have, because I have never before had a file fail validation due to this missing element. It's not something I was therefore even aware of. |
![]() |
![]() |
![]() |
#10 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,394
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
![]() HTMLTidy; that element of Sigil which was the Great Fixer of all things wrong (which unfortunately came at the cost of drastic changes to many things that weren't), is gone. I'm almost positive there's a way to get Word to add a title for you. Take a close look at the "Save as Web Page, Filtered" dialog options. Last edited by DiapDealer; 12-04-2015 at 04:20 PM. |
|
![]() |
![]() |
![]() |
#11 | |
Read, don't parrot.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
Quote:
(I figured out how to fix the problem by reading the error, looking at the header code of older ebooks that passed validation, and seeing what the difference was between them and my new file. I could not fix it simply by reading the error message and knowing instinctively what the error was referring to.) I looked at the Word options both for general Save and for Web Options. There is nothing there that seems to speak to adding the title. I have attached screen shots of the web defaults in case I am missing something. Perhaps Sigil could be programmed to check the header for the title element and, if it is missing, add it. (Perhaps some kind of element of the import filter?) If not, a warning would be good, perhaps in the user manual. The path of Word to HTML to Sigil to ePub is a popular one. Perhaps not as popular as automated programs like Calibre, but still popular among those of us who want to build our own books but who are not professional coders. |
|
![]() |
![]() |
![]() |
#12 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,394
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
It's on the Save as HTML, Filtered dialog. The one the prompts you for the location you're saving it to. There may be other ways to make your Word documents have default titles, but I'm not a Word user myself. |
|
![]() |
![]() |
![]() |
#13 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
As far as I know, there is no way to have Word insert the title tag there.
@eggheadbooks1: You could try my add-in if you have Word 2007 or up and running on Windows. It will produce a valid ePUB which you can edit/refine as much as you want. |
![]() |
![]() |
![]() |
#14 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,394
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
![]() On the Save As dialog, when I change to Web Page, Filtered, a "Change Title" button appears. If I click it and enter something, title tags with that something are added to the html output. Why on earth does Word create html with no title tags anyway? ![]() Last edited by DiapDealer; 12-04-2015 at 05:55 PM. |
|
![]() |
![]() |
![]() |
#15 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,689
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
@eggheadbooks1: You'll need to click the Change Title... button and enter a title before you save your book.
However, you're probably much better off using Toxaris's plugin or Calibre's docx to epub converter. @DiapDealer: it does write the title to the html file, at least in my version. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Possible bug report - adding books | kacir | Development | 3 | 11-19-2014 11:21 AM |
Glo [Bug?][Video] Adding Books to Collections | tnforpaul45 | Kobo Reader | 10 | 11-09-2014 01:22 AM |
Bug - Calibre confused by books with the same title | HarryT | Calibre | 5 | 01-02-2014 12:24 PM |
Metadata BUG adding books | Giuseppe Chillem | Calibre | 3 | 10-08-2010 05:13 PM |
Adding the same title, but different formats... | Frodolass | Calibre | 3 | 12-13-2009 05:44 AM |