05-30-2012, 11:47 AM | #1 |
Zealot
Posts: 101
Karma: 202774
Join Date: Apr 2012
Device: none
|
Trying to understand error messages
Hello
I am in the stage of checking my book to see if it is built okay. This by several methods: Sigil´s own "Validate epub". Epub check I could not make heads or tails of. ePubChecker. Plus a program called FlightCrew. However, I frankly do not understand the error messages that come up, getting more and more confused. I have Googled for a catalog of error messages that tells us laymen what these messages mean and what I should I do about them. "is not declared for element" "is not allowed for content model" "no declaration found for element" "element "center" is not allowed for content model" "attribute "caption" is not declared for element ´img´" "ID value "heading_id_13" is not unique" "attribute points to file <> which does not exist " I do not wish for you the explain all this, but could you point me to a good tutorial? |
05-30-2012, 12:03 PM | #2 |
Grand Sorcerer
Posts: 27,551
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
There is no tutorial that will explain those errors for you. You just need to learn how to decipher them... with the help of people who've run into them and fixed them before. Flight Crew (which I believe is the validation engine Sigil uses) gives clearer (less cryptic) responses, IMHO. Also pay attention to the line number/file name given. That will help locate the problem area.
Some are fairly self-explanatory... like: "attribute "caption" is not declared for element ´img´" Somewhere (hopefully the filename/line number narrows it down), an img tag has a 'caption="blah, blah"' attribute. Get rid of that. It doesn't belong. "ID value "heading_id_13" is not unique" Element IDs (id="something") must be unique for that entire (x)html document. Change them so they are each unique, or delete them if you won't be linking to those elements (including NCX entries) or applying special css to them based on that ID. Last edited by DiapDealer; 05-30-2012 at 12:09 PM. |
Advert | |
|
05-30-2012, 12:15 PM | #3 |
Well trained by Cats
Posts: 29,807
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
"is not declared for element"
styling exists within a tag that is not preceded by style=" the style " IMHO all styling belongs in a stylesheet or the styles section in the <head> "is not allowed for content model" The rules of placement have bee violated Usually naked objects (not surrounded by valid object type tags) "no declaration found for element" "element "center" is not allowed for content model" "attribute "caption" is not declared for element ´img´" "ID value "heading_id_13" is not unique" There are 2 or more lines with the same id="xx" value: edit out all but the one you want any link to hit (includes the TOC). Sigil will duplicate these if you split a line that has one in it. IMHO this is a feature as the part you really want is NOT the original beginning "attribute points to file <> which does not exist " Guessing. Typo/incomplete filename referenced. common : src="../Text/#idvalue" which happens after a delete of the referenced file. there should have been a filename.(x)html before the # |
06-12-2012, 08:04 AM | #4 |
Zealot
Posts: 101
Karma: 202774
Join Date: Apr 2012
Device: none
|
Thanks folks.
Finally it is getting clean. One message I don´t get is this: duplicate id: heading_id_15 In that file I have both a H3 and H4 with <heading_id_15>. I thought it was ok as long as it is different size headings...? |
06-12-2012, 08:40 AM | #5 | |
Grand Sorcerer
Posts: 27,551
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Think of it this way... if I created a link and added your ID to the href as an url fragment: Code:
<a href="../Text/chapter1.xhtml#heading_id_15">Link text.</a> |
|
Advert | |
|
06-12-2012, 08:45 AM | #6 |
Zealot
Posts: 101
Karma: 202774
Join Date: Apr 2012
Device: none
|
Thanks folks.
Finally it is getting clean. One message I don´t get is this: duplicate id: heading_id_15 In that file I have both a H3 and H4 with <heading_id_15>. I thought it was ok as long as it is different size headings...? |
06-12-2012, 09:02 AM | #7 |
Grand Sorcerer
Posts: 27,551
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Uhhhh... should I post my response again to keep some sort of cosmic balance?
|
06-12-2012, 11:52 AM | #8 | |
Well trained by Cats
Posts: 29,807
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
BTW (In Sigil) If you place the Cursor at the end of a line (in BV) that has an id, the hit enter to open up some lines, the ID will be duplicated and you MUST switch to CV and clean up. |
|
06-13-2012, 02:48 AM | #9 |
Sigil developer
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Duplicate heading ids are always appearing for me - definitely need to keep re-Validating to check for them.
The Book View editor in the beta release doesn't seem to add heading_id's when you hit Return on a line that has an id. But they may appear in other ways. FYI the User Guide now lists a number of the common error messages with descriptions in its Validation chapter. |
06-13-2012, 09:24 AM | #10 | |
Well trained by Cats
Posts: 29,807
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
|
|
06-13-2012, 03:32 PM | #11 |
Zealot
Posts: 101
Karma: 202774
Join Date: Apr 2012
Device: none
|
|
10-29-2012, 07:13 AM | #12 |
Zealot
Posts: 101
Karma: 202774
Join Date: Apr 2012
Device: none
|
Still struggling with the "heading ID is not unique"-error.
Not sure I didn´t really understand your explanations before. So let me take it from the start: If I have two identical ID-s in the same xhtml file (my book has one file for each chapter) than I should change the repeating ID. But, does it matter to what? The ID-s are in numerical order (1,2,3,4). My non-unique ID-3 comes right after another ID-3. ID-4 and ID-5 are already taken. So should I just change the second ID-3 to ID-6, or 31, or what? Is it okay to disrupt the order of the ID-s? Is it okay to have this order: ID-3, ID-6, ID-4, ID-5? |
10-29-2012, 08:18 AM | #13 |
Guru
Posts: 718
Karma: 1085610
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-T1, 1825PT, Galaxy Tab, One X, TF700T, Aura HD, Nexus 7
|
It doesn't matter what you use for the ID's as long as you are not repeating them in the same file.
I personally don't use anything that doesn't have a meaning. i.e. I use things like: Code:
<h2 id="ch01">Chapter One</h2> Code:
<h2 id="pt01">Part One</h2> Code:
<h2 id="bk01">Book One</h2> Code:
<h2 id="contents">Contents</h2> etc. This way they are all unique throughout the epub and I can instantly know what the ID will be for. |
10-29-2012, 08:38 AM | #14 |
Grand Sorcerer
Posts: 27,551
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Just keep in mind when changing IDs that you may want to verify that any links in the ebook that use that ID as an anchor in an href, get updated properly to reflect the change.
It doesn't matter what you use for an ID (though I don't believe they can begin with a number) ... but what you use does matter for the rest of the epub that may want to use that ID. The changes should propagate automatically when using something like Sigil, but it doesn't hurt to check. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error Messages in Calibre | didiyy | Devices | 17 | 01-11-2013 03:31 PM |
Do not understand error message. | dmcd | Calibre | 10 | 02-07-2012 07:21 PM |
frustrating error messages | patrickyoung | Sigil | 8 | 01-31-2012 09:51 AM |
error messages on new PC | huskerruth | Devices | 1 | 02-16-2011 11:56 AM |
Help with resolving error messages? | zebedee | Introduce Yourself | 10 | 01-02-2011 05:34 PM |