View Full Version : validation - 59 errors OPF file


LostSock
06-24-2011, 06:13 PM
I must be missing a checkbox or something, because this is happening with every bloody book I've tried to export. I'd very much appreciate anyone's help, as I'm ready to smash something.

I'm using InDesign CS5 and am exporting a book as epub. I unzip and open the content.opf, and change the date. The only other change I make is to substitute the ISBN for the unique identifier. that's it. And when I go to validate, I get this message:

WARNING: dancedance.epub: item (OEBPS/._copyright.xhtml) exists in the zip file, but is not declared in the OPF file
WARNING: dancedance.epub: item (OEBPS/._2 - ch 2.xhtml) exists in the zip file, but is not declared in the OPF file

...59 different times.

It's like my OPF file acknowledges they're in the epub, but refuses to correctly 'see' them. What have I done wrong?


This is part of my OPF:


<?xml version="1.0"?> <package xmlns="http://www.idpf.org/2007/opf"
xmlns:dc="http://purl.org/dc/elements/1.1/" unique-identifier="bookid"
version="2.0"><metadata><meta name="generator" content="Adobe
InDesign"/><dc:title/><dc:creator/><dc:subject/><dc:description/><dc:publisher>LittleRed</dc:publisher><dc:date>2011-06-24</dc:date><dc:source/><dc:relation/><dc:
coverage/><dc:rights/><dc:identifier
id="bookid">isbnnumbers</dc:identifier><dc:language>en</dc:language></metadata><manifest><item id="ncx"
href="toc.ncx" media-type="application/x-dtbncx+xml"/><item id="cover"
href="Cover.xhtml" media-type="application/xhtml+xml"/><item
id="title-page" href="Title%20Page.xhtml"
media-type="application/xhtml+xml"/><item id="dedication"
href="Dedication.xhtml" media-type="application/xhtml+xml"/>

eping
06-25-2011, 12:43 AM
Is there error messages when you validate the ePub from InDesign before your edit?
They seem all warnings, not errors. You may leave them there.

By the way, I suggest create a sub forum for InDesign, there're too much similar questions about InDesign here.

LostSock
06-25-2011, 10:53 AM
The only error I get before my edits is about the date being wrong, which is an Indesign bug. And yeah, sorry. I tried searching for this issue, but all the solutions I found didn't work for me.

SamL
06-25-2011, 11:35 AM
just a thought

"OEBPS/._copyright.xhtml"

looks to me like a ghost file, which would explain why they aren't declared in the OPF. Does there seem to be two of each XHTML file, one with the correct name (copyright.xhtml), and one with it starting differently (._copyright.xhtml)?

LostSock
06-25-2011, 11:48 AM
Oh, very good point! I didn't catch that. I've just check the folder now, but it doesn't have those files in there. The only hidden file is .ds_store, which is normal. I wonder why it would still be seeing them.

Maybe I'll try copying the xhtml files to a new folder and replacing the epub's one with that.

LostSock
06-25-2011, 11:55 AM
That got rid of half of the errors. Thanks for pointing that out! It's still not reading the original files that it should be, however. It's like my content.opf is being snobbish.

Example:

WARNING: dancedance.epub: item (OEBPS/template.css) exists in the zip file, but is not declared in the OPF file
WARNING: dancedance.epub: item (OEBPS/Authors Note.xhtml) exists in the zip file, but is not declared in the OPF file
WARNING: dancedance.epub: item (OEBPS/Acknowledgements.xhtml) exists in the zip file, but is not declared in the OPF file
WARNING: dancedance.epub: item (OEBPS/Chapter Two.xhtml) exists in the zip file, but is not declared in the OPF file

SamL
06-25-2011, 01:05 PM
That got rid of half of the errors. Thanks for pointing that out! It's still not reading the original files that it should be, however. It's like my content.opf is being snobbish.

Example:

WARNING: dancedance.epub: item (OEBPS/template.css) exists in the zip file, but is not declared in the OPF file
WARNING: dancedance.epub: item (OEBPS/Authors Note.xhtml) exists in the zip file, but is not declared in the OPF file
WARNING: dancedance.epub: item (OEBPS/Acknowledgements.xhtml) exists in the zip file, but is not declared in the OPF file
WARNING: dancedance.epub: item (OEBPS/Chapter Two.xhtml) exists in the zip file, but is not declared in the OPF file

From here this is an easy fix, you just need to declare these in your .opf file. Specifically within the <manifest> tags.

It should look something like this:

<item id="chapter1" href="chapter1.xhtml" media-type="application/xhtml"/>

for each file you have. Every jpeg and XHTML file that is in your epub, will have to be declared like this in the manifest of your content.opf file.

You can see some more code of a sample .opf file here:
http://en.wikipedia.org/wiki/EPUB

LostSock
06-25-2011, 02:28 PM
Sadly, it's already set up like that.

Here is the opf file I get from Indesign. Do you think it's the space in the chapter name causing the trouble? Although, I get the same error for chapters that just have one word in the title and no spaces.


<?xml version="1.0"?> <package xmlns="http://www.idpf.org/2007/opf"
xmlns:dc="http://purl.org/dc/elements/1.1/" unique-identifier="bookid"
version="2.0"><metadata><meta name="generator" content="Adobe
InDesign"/><dc:title/><dc:creator/><dc:subject/><dc:description/><dc:publisher>LittleRed</dc:publisher><dc:date>2011-06-24<dc:date>2011-06-20</dc:date><dc:source/><dc:relation/><dc:
coverage/><dc:rights/><dc:identifier
id="bookid">ISBNnumber</dc:identifier><dc:language>en</dc:language></metadata><manifest><item id="ncx"
href="toc.ncx" media-type="application/x-dtbncx+xml"/><item id="cover"
href="Cover.xhtml" media-type="application/xhtml+xml"/><item
id="title-page" href="Title%20Page.xhtml"
media-type="application/xhtml+xml"/><item id="dedication"
href="Dedication.xhtml" media-type="application/xhtml+xml"/><item
id="acknowledgements" href="Acknowledgements.xhtml"
media-type="application/xhtml+xml"/><item id="article"
href="Article.xhtml" media-type="application/xhtml+xml"/><item
id="prologue" href="Prologue.xhtml"
media-type="application/xhtml+xml"/><item id="chapter-one"
href="Chapter%20One.xhtml" media-type="application/xhtml+xml"/><item
id="chapter-two" href="Chapter%20Two.xhtml"
media-type="application/xhtml+xml"/><item id="chapter-three"
href="Chapter%20Three.xhtml" media-type="application/xhtml+xml"/><item
id="chapter-four" href="Chapter%20Four.xhtml"
media-type="application/xhtml+xml"/><item id="chapter-five"
href="Chapter%20Five.xhtml" media-type="application/xhtml+xml"/><item
id="chapter-six" href="Chapter%20Six.xhtml"
media-type="application/xhtml+xml"/><item id="chapter-seven"
href="Chapter%20Seven.xhtml" media-type="application/xhtml+xml"/><item
id="chapter-eight" href="Chapter%20Eight.xhtml"
media-type="application/xhtml+xml"/><item id="chapter-nine"
href="Chapter%20Nine.xhtml" media-type="application/xhtml+xml"/><item
id="chapter-ten" href="Chapter%20Ten.xhtml"
media-type="application/xhtml+xml"/><item id="chapter-eleven"
href="Chapter%20Eleven.xhtml" media-type="application/xhtml+xml"/><item
id="copyright" href="Copyright.xhtml"
media-type="application/xhtml+xml"/><item id="authors-note"
href="Authors%20Note.xhtml" media-type="application/xhtml+xml"/><item
id="promo" href="Promo.xhtml" media-type="application/xhtml+xml"/><item
id="x9cov-fmt-jpeg" href="images/cov_fmt.jpeg"
media-type="image/jpeg"/><item id="x-gg-cov-fmt-jpeg"
href="images/6_GG_COV_fmt.jpeg"
media-type="image/jpeg"/><item id="a90-cov-fmt-jpeg"
href="images/a97_COV_fmt.jpeg" media-type="image/jpeg"/><item
id="littlered-address-line-fmt-jpeg"
href="images/littlered_address_line_fmt.jpeg"
media-type="image/jpeg"/><item id="littlered-full-logo-blac-fmt-jpeg"
href="images/littlered_Full_Logo_Blac_fmt.jpeg"
media-type="image/jpeg"/><item id="littlered-title-page-fmt-jpeg"
href="images/littlered_Title_Page_fmt.jpeg" media-type="image/jpeg"/><item
id="grant-logo-line-bigger-fmt-jpeg"
href="images/Grant_logo_line_bigger_fmt.jpeg"
media-type="image/jpeg"/><item id="css" href="template.css"
media-type="text/css"/></manifest>

<spine toc="ncx"><itemref
idref="cover"/><itemref idref="title-page"/><itemref
idref="dedication"/><itemref idref="acknowledgements"/><itemref
idref="article"/><itemref idref="prologue"/><itemref
idref="chapter-one"/><itemref idref="chapter-two"/><itemref
idref="chapter-three"/><itemref idref="chapter-four"/><itemref
idref="chapter-five"/><itemref idref="chapter-six"/><itemref
idref="chapter-seven"/><itemref idref="chapter-eight"/><itemref
idref="chapter-nine"/><itemref idref="chapter-ten"/><itemref
idref="chapter-eleven"/><itemref idref="copyright"/><itemref
idref="authors-note"/><itemref idref="promo"/></spine></package>

SamL
06-25-2011, 02:35 PM
I would say having spacing in your file names is most likely the problem. Because the "%20" is getting put in there, the opf can't recognize the XHTML files.

So I would say start by fixing that, then try to validate again. If there are problems after that post your code again, at least that way it will be a bit easier to narrow down the problem.

LostSock
06-25-2011, 04:09 PM
Same error messages pop up.

The code hasn't changed much, I just took out the spaces. I also did the same for the xhtml files, so they matched. I'm going to try exporting a different book, and see if there's a setting I have wrong. Thank you so much for your help, I really appreciate your effort and patience!

Here's the new code:

<?xml version="1.0"?> <package xmlns="http://www.idpf.org/2007/opf"
xmlns:dc="http://purl.org/dc/elements/1.1/" unique-identifier="bookid"
version="2.0"><metadata><meta name="generator" content="Adobe
InDesign"/><dc:title/><dc:creator/><dc:subject/><dc:description/><dc:publisher>LittleRed</dc:publisher><dc:date>2011-06-24<dc:date>2011-06-20</dc:date><dc:source/><dc:relation/><dc:
coverage/><dc:rights/><dc:identifier
id="bookid">ISBNnumber</dc:identifier><dc:language>en</dc:language></metadata><manifest><item id="ncx"
href="toc.ncx" media-type="application/x-dtbncx+xml"/><item id="cover"
href="Cover.xhtml" media-type="application/xhtml+xml"/><item
id="title-page" href="TitlePage.xhtml"
media-type="application/xhtml+xml"/><item id="dedication"
href="Dedication.xhtml" media-type="application/xhtml+xml"/><item
id="acknowledgements" href="Acknowledgements.xhtml"
media-type="application/xhtml+xml"/><item id="article"
href="Article.xhtml" media-type="application/xhtml+xml"/><item
id="prologue" href="Prologue.xhtml"
media-type="application/xhtml+xml"/><item id="chapter-one"
href="ChapterOne.xhtml" media-type="application/xhtml+xml"/><item
id="chapter-two" href="ChapterTwo.xhtml"
media-type="application/xhtml+xml"/><item id="chapter-three"
href="ChapterThree.xhtml" media-type="application/xhtml+xml"/><item
id="chapter-four" href="ChapterFour.xhtml"
media-type="application/xhtml+xml"/><item id="chapter-five"
href="ChapterFive.xhtml" media-type="application/xhtml+xml"/><item
id="chapter-six" href="ChapterSix.xhtml"
media-type="application/xhtml+xml"/><item id="chapter-seven"
href="ChapterSeven.xhtml" media-type="application/xhtml+xml"/><item
id="chapter-eight" href="ChapterEight.xhtml"
media-type="application/xhtml+xml"/><item id="chapter-nine"
href="ChapterNine.xhtml" media-type="application/xhtml+xml"/><item
id="chapter-ten" href="ChapterTen.xhtml"
media-type="application/xhtml+xml"/><item id="chapter-eleven"
href="ChapterEleven.xhtml" media-type="application/xhtml+xml"/><item
id="copyright" href="Copyright.xhtml"
media-type="application/xhtml+xml"/><item id="authors-note"
href="AuthorsNote.xhtml" media-type="application/xhtml+xml"/><item
id="promo" href="Promo.xhtml" media-type="application/xhtml+xml"/><item
id="x9cov-fmt-jpeg" href="images/cov_fmt.jpeg"
media-type="image/jpeg"/><item id="x-gg-cov-fmt-jpeg"
href="images/6_GG_COV_fmt.jpeg"
media-type="image/jpeg"/><item id="a90-cov-fmt-jpeg"
href="images/a97_COV_fmt.jpeg" media-type="image/jpeg"/><item
id="littlered-address-line-fmt-jpeg"
href="images/littlered_address_line_fmt.jpeg"
media-type="image/jpeg"/><item id="littlered-full-logo-blac-fmt-jpeg"
href="images/littlered_Full_Logo_Blac_fmt.jpeg"
media-type="image/jpeg"/><item id="littlered-title-page-fmt-jpeg"
href="images/littlered_Title_Page_fmt.jpeg" media-type="image/jpeg"/><item
id="grant-logo-line-bigger-fmt-jpeg"
href="images/Grant_logo_line_bigger_fmt.jpeg"
media-type="image/jpeg"/><item id="css" href="template.css"
media-type="text/css"/></manifest>

<spine toc="ncx"><itemref
idref="cover"/><itemref idref="title-page"/><itemref
idref="dedication"/><itemref idref="acknowledgements"/><itemref
idref="article"/><itemref idref="prologue"/><itemref
idref="chapter-one"/><itemref idref="chapter-two"/><itemref
idref="chapter-three"/><itemref idref="chapter-four"/><itemref
idref="chapter-five"/><itemref idref="chapter-six"/><itemref
idref="chapter-seven"/><itemref idref="chapter-eight"/><itemref
idref="chapter-nine"/><itemref idref="chapter-ten"/><itemref
idref="chapter-eleven"/><itemref idref="copyright"/><itemref
idref="authors-note"/><itemref idref="promo"/></spine></package>

SamL
06-25-2011, 05:14 PM
Same error messages pop up.

The code hasn't changed much, I just took out the spaces. I also did the same for the xhtml files, so they matched. I'm going to try exporting a different book, and see if there's a setting I have wrong. Thank you so much for your help, I really appreciate your effort and patience!


You changed the spacing in the actual XHML files names as well right? Not just in the .opf file?

LostSock
06-25-2011, 06:02 PM
Correct, I did. I went through twice and made sure all the names as well as cases are the same.

SamL
06-25-2011, 06:47 PM
Correct, I did. I went through twice and made sure all the names as well as cases are the same.

Hmmmmm, the code looks fine to me. I would suggest reexporting your book, with the new file names (without the space.) Its possible something tiny got tweaked in your process.

LostSock
06-25-2011, 07:35 PM
AHA.

Apparently there was a problem with the indesign book file itself. I manually added the files into a new book, exported, and it passed on the first try. So I don't know what happened to the original book, but many kudos to you for helping me. Have a great weekend!

wannabee
06-27-2011, 03:01 AM
That reminds me. Just another tip. Sometimes the files hangs during export. Especially if someone else created the file. :angry: I got around the problem by exporting to IDML and reimporting it. Whatever bug was there didn't export.

st_albert
06-29-2011, 02:26 PM
@lostSock: As an afterthought, are you doing this on a Mac? Some of those strange ._Whatever filenames look like OS-X specific data.

If you are running on a mac, you may be interested in this thread.
(http://www.mobileread.com/forums/showthread.php?t=55681)