05-10-2011, 09:48 AM | #1 |
Fanatic
Posts: 541
Karma: 1152752
Join Date: Aug 2010
Location: Evansville, IN, USA
Device: Samsung Galaxy Tab 4 Nook & Samsung Galaxy Tab S 10.5
|
Help, I can't figure out this epub validation error
I've gotten used to using the Validate Epub option in Sigil. I believe it uses the Flightcrew validator. Occasionally I'll find an error and am able to fix it fairly easily. More often I'm thrilled to see No Errors Found displayed.
I've run an error now and I cannot figure it out for the life of me. I have an image that appears under the chapter number on every chapter header. This is the error I'm receiving: value 'id=' does not match regular expression facet '\c+' and this is the code for every one of these instances: Code:
<p class="tightgraphic2"><img alt="" height="79" src="../Images/EmpireEmblem.jpg" width="30" /></p> Thanks. - Byron Followell |
05-10-2011, 10:50 AM | #2 |
Wizard
Posts: 4,332
Karma: 4000000
Join Date: Oct 2008
Location: Paris
Device: Cybooks; Sony PRS-T1
|
it looks like it expects an "id" attribute on either the paragraph or images.
Someting like : <p id="image_p" class="tightgraphic2"><img alt="" id="myimage" height="79" src="../Images/EmpireEmblem.jpg" width="30" /></p> |
Advert | |
|
05-10-2011, 10:58 AM | #3 | |
Fanatic
Posts: 541
Karma: 1152752
Join Date: Aug 2010
Location: Evansville, IN, USA
Device: Samsung Galaxy Tab 4 Nook & Samsung Galaxy Tab S 10.5
|
Quote:
I tried adding an id to the paragraph and the img tags individually and to both but it didn't fix anything. Thanks for the reply though. Does anyone have any other ideas? - Byron |
|
05-10-2011, 11:18 AM | #4 |
Guru
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
|
This is kind of grasping at straws, but are you sure you're looking at the right line? Sometimes the way epubcheck counts lines is different from the way the code is displayed in Sigil, for example. So, maybe the actual error is on some other line nearby?
Like I said, a wild guess... |
05-10-2011, 11:29 AM | #5 | |
Fanatic
Posts: 541
Karma: 1152752
Join Date: Aug 2010
Location: Evansville, IN, USA
Device: Samsung Galaxy Tab 4 Nook & Samsung Galaxy Tab S 10.5
|
Quote:
It's probably something really silly or simple or both but I can't see anything wrong. - Byron |
|
Advert | |
|
05-10-2011, 11:59 AM | #6 |
Wizard
Posts: 2,251
Karma: 3720310
Join Date: Jan 2009
Location: USA
Device: Kindle, iPad (not used much for reading)
|
Did you customize anything in the way of regexes? I'm not familiar with \c. I'm a Perl person, not a Python person, but I looked it up in the Python manual, and I don't see \c as a regex atom. In perl, there is a \cx for a control character 'x', but I can't imagine that parsing an id element is looking for a control character.
Could there possibly be an opening or closing quote above the line somewhere that has the wrong quote? E.g. single quote instead of double-quote. Maybe the parser is lost? |
05-10-2011, 01:01 PM | #7 |
Fanatic
Posts: 541
Karma: 1152752
Join Date: Aug 2010
Location: Evansville, IN, USA
Device: Samsung Galaxy Tab 4 Nook & Samsung Galaxy Tab S 10.5
|
^^^
Nope, I haven't cutomized anything, intentionally anyway. I have a regex cheatsheet and I couldn't find anything listed for \c either. Like you, all I saw was the \cx control character listing. No wrong quotes anywhere they shouldn't be. I've searched all over my code and text, five or six lines in either direction from the line in question and I can find absolutely nothing wrong; nothing I haven't done a hundred times over in other ebooks. I really have absolutely no idea what could possibly be causing this error. - Byron |
05-10-2011, 01:13 PM | #8 | |
Fanatic
Posts: 541
Karma: 1152752
Join Date: Aug 2010
Location: Evansville, IN, USA
Device: Samsung Galaxy Tab 4 Nook & Samsung Galaxy Tab S 10.5
|
Quote:
I spoke too soon. I pulled one of the html files in question out of the epub manually and dumped it into Notepad++. The lines were numbered differently and when I looked at the line in question, line 18, I saw this: Code:
<h2 class="chaptertitle1 id=" id="nov01ch01">1</h2> I'm sure when I go back and remove all of the extra id=" references, everything will be right with the world. Thanks for the suggestions and helping me step through it. Sometimes you just look at something so much, it's easy to miss something that is obviously staring you right in the face. - Byron |
|
05-11-2011, 12:11 PM | #9 |
Guru
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
|
That's the issue I was getting at in my post above. I don't know why the line numbers appear to be different in Sigil code view vs. an external text editor, but I see it sometimes myself.
|
05-11-2011, 03:12 PM | #10 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
That is easy. Valloric explained it in another part. When you press validate, the epub is created and the epub is then validated. However, the post generation while creating the epub will change the line numbers. That is the reason that the line numbers do not match. It is a known issue.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Epub validation Error | fiona86 | ePub | 3 | 06-25-2011 12:57 AM |
epub validation error | drwinn | Workshop | 17 | 03-22-2011 05:10 PM |
epub validation error | sassanik | Sigil | 19 | 12-08-2010 05:46 AM |
ePub validation error | sk19.gupta | Introduce Yourself | 6 | 10-19-2010 10:53 PM |
ePub Validation Error | mrbillb | ePub | 6 | 09-28-2010 02:14 PM |