Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 12-02-2010, 09: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
Advert
Old 12-03-2010, 05: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,034
Karma: 9174633
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, 04: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,272
Karma: 115718139
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 02:43 AM.


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