Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 12-02-2010, 08:29 PM   #1
a-name4epub
Junior Member
a-name4epub began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Dec 2010
Device: none
Problems with ePub validation

I'm looking for advice on a couple of errors I'm seeing. One is " exists in the zip file, but is not declared in the OPF file" but the files in question Are declared and I've checked, rechecked, and even renamed some files in both the opf and nxc files and still they show up as errors. Similar errors for (mostly) the same files is "referenced resource exists, but not declared in the OPF file" - how does this happen?

Another is "hyperlink to resource outside spine" but these are links to files within the epub. I read elsewhere on this forum that "id" works as links within the epub. I tried that and got "elements must consist of well-formed character data or markup." Is something more needed? I put /> where normally there would be </a>.

One file gives me "text not allowed here" but it is xhtml the same as all the others (this is an epub with many xhtml files).

Thanks for any assistance with this. I thought I had it figured out before epubcheck!
a-name4epub is offline   Reply With Quote
Old 12-03-2010, 04:55 AM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by a-name4epub View Post
I'm looking for advice on a couple of errors I'm seeing. One is " exists in the zip file, but is not declared in the OPF file" but the files in question Are declared and I've checked, rechecked, and even renamed some files in both the opf and nxc files and still they show up as errors. Similar errors for (mostly) the same files is "referenced resource exists, but not declared in the OPF file" - how does this happen?
Have you renamed them to filenames with no spaces or funny characters (like "test.xhtml")? Are the files referenced in the <manifest> section of the OPF? Try to post a minimal example that gives the problem.

Quote:
Another is "hyperlink to resource outside spine" but these are links to files within the epub.
But the linked file must be listed in the <spine> section of the OPF, otherwise the system won't know what to do when you page forward/backward after following the link.

Quote:
I read elsewhere on this forum that "id" works as links within the epub. I tried that and got "elements must consist of well-formed character data or markup." Is something more needed? I put /> where normally there would be </a>.
The "id" works as <a name="whatever"> in HTML. You can put an "id" attribute in any element and link to it with <a href="#whatever"> normally. For example:

Code:
<p id="first">This is a paragraph with an "id" attribute, so we can link to it elsewhere.</p>

<p>This is a second paragraph with a <a href="#first">link</a> to the first paragraph</p>
Quote:
One file gives me "text not allowed here" but it is xhtml the same as all the others (this is an epub with many xhtml files).
You probably have some text or <img> directly under <body>, not inside any block element (<p> or <div>). Put <div> and </div> around the problem text and the error should disappear.
Jellby is offline   Reply With Quote
Old 12-03-2010, 03:20 PM   #3
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Did you try Flightcrew as validation tool? It usually gives better info. The message "referenced resource exists, but not declared in the OPF file" can point to a reference of a file which is not present in the OPF or even the epub. Also keep the case in mind with the files. Do not change upper- and lowercase between references.
Toxaris is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ePub validation problems robcub ePub 12 02-04-2011 05:04 AM
ePub Validation Problem rlarrett ePub 14 10-07-2010 01:06 AM
ePub Validation Error mrbillb ePub 6 09-28-2010 02:14 PM
Epub validation problem silentobserver ePub 3 08-16-2010 12:51 AM
Epub Validation Problems crestfalleen Calibre 6 08-02-2010 09:43 PM


All times are GMT -4. The time now is 11:40 PM.


MobileRead.com is a privately owned, operated and funded community.