View Full Version : Epub validation question


Baltic Gal
06-03-2011, 04:38 AM
Hello I hope I'm posting this in the right place.

:help:
I'm working on turning a family member's manuscript into a epub. I've never made an epub before (web sites with basic XHTML yes, epubs no.) This whole process has been a bit of adventure for me. And headache.

I've already turned the files into an epub and went through the validation at Threepress Consulting Inc's web site once. Errors came up and I went in and fixed those. Rezipped the files and when I sent it through the validation at Threepress only one error came up.

It's now saying the META-INF file is not there. This error didn't come up the first time around.

It's there. I'm not sure what's going on or what I'm doing wrong. Can anyone help?

Thank You.

Adjust
06-03-2011, 05:53 AM
It has to be ziped correctly. i.e in a certain order.
See here for Windows users:
http://www.mobileread.com/forums/showthread.php?t=84675

And here for Mac users:
http://www.mobileread.com/forums/showthread.php?t=55681&highlight=epub+zip

maggievnc
06-03-2011, 05:53 AM
Hello I hope I'm posting this in the right place.

:help:
I'm working on turning a family member's manuscript into a epub. I've never made an epub before (web sites with basic XHTML yes, epubs no.) This whole process has been a bit of adventure for me. And headache.

I've already turned the files into an epub and went through the validation at Threepress Consulting Inc's web site once. Errors came up and I went in and fixed those. Rezipped the files and when I sent it through the validation at Threepress only one error came up.

It's now saying the META-INF file is not there. This error didn't come up the first time around.

It's there. I'm not sure what's going on or what I'm doing wrong. Can anyone help?

Thank You.
Well, after going thrugh a helish time with this epub thing I found the best way is working with the smashwords style guide. http://www.smashwords.com/books/view/52 (it's free)

this is a STEP BY STEP GUIDE instructing how to prepare your WORD file to epub. after doing that i finally received from the epub validation website the words i was longing to: PASSED and VALID.....
I can assure you that once you follow this guide it will work. (except for some exceptions like a problematic url link.. or so.:-;

anyway if you need any further assistance - i will gladly do so.
good luck,
Sara

http://www.smashwords.com/profile/view/saradagan

Baltic Gal
06-06-2011, 04:30 AM
It has to be ziped correctly. i.e in a certain order.
See here for Windows users:
http://www.mobileread.com/forums/showthread.php?t=84675

And here for Mac users:
http://www.mobileread.com/forums/showthread.php?t=55681&highlight=epub+zip

I know that. I am/have done a lot of research into epub before and during this whole process.

I used the method from Elizabeth Castro's book "Epub Straight to the Point" to zip it. The first time around the errors I got were in the XHTML and the TOC part. I fixed those and re-zipped it and then the only error message I got was this: ERROR: MaryQueenOfScots.epub: Required META-INF/container.xml resource is missing

It didn't come up the first time around, but the second. I used the link you provided and zipped it that way and still got that same message.

I'm not sure what is going on, the META INF folder and the container.xml is there. I've checked it and double checked it. I'm sure it's something simple, I just would love to know what it is.

Thanks for the links by and by.

Baltic Gal
06-06-2011, 04:45 AM
Well, after going thrugh a helish time with this epub thing I found the best way is working with the smashwords style guide. http://www.smashwords.com/books/view/52 (it's free)

this is a STEP BY STEP GUIDE instructing how to prepare your WORD file to epub. after doing that i finally received from the epub validation website the words i was longing to: PASSED and VALID.....
I can assure you that once you follow this guide it will work. (except for some exceptions like a problematic url link.. or so.:-;

anyway if you need any further assistance - i will gladly do so.
good luck,
Sara

http://www.smashwords.com/profile/view/saradagan

That didn't really help me. Sorry. I did the entire XHTML markup myself in Dreamweaver along with the toc.ncx and content.opf files. The formatting is done (and surprisingly in some ways easier then doing the markup for a web site) I'm just having a problem with that pesky error message at epub validator.

Thank you for trying.

Adjust
06-06-2011, 05:01 AM
I know that. I am/have done a lot of research into epub before and during this whole process.

I'm not sure what is going on, the META INF folder and the container.xml is there. I've checked it and double checked it. I'm sure it's something simple, I just would love to know what it is.

Thanks for the links by and by.

Well ok. I was unaware you did all this research. :smack:

Container.xhtml is in your content.opf manifest?
Can you post your content.opf file here?

maggievnc
06-06-2011, 12:06 PM
sometimes it's just a link you put that causes all the trouble. that's what happend to me, only after i removed that link - it passed.

Baltic Gal
06-09-2011, 02:43 AM
Well ok. I was unaware you did all this research. :smack:

Container.xhtml is in your content.opf manifest?
Can you post your content.opf file here?

The container.xml is in the META-INF folder.

I'm attaching the epub that isn't validating.

Any help would be greatly appreciated. I would love to know what I'm doing wrong.:thanks:

thydere
06-09-2011, 03:13 AM
The container.xml is in the META-INF folder.

I'm attaching the epub that isn't validating.

Any help would be greatly appreciated. I would love to know what I'm doing wrong.:thanks:

The META-INF directory with your container.xml file contains a tailing space. Meaning that the file entry that should look like 'META-INF/container.xml' looks like 'META-INF /container.xml'.

Remove the tailing space and try again :).

Update: Ugh... just repacked your epub. It can now be opened in ADE, but it contains a truckload of errors - among them invalid attributes (you misspelled src as scr which leads to a broken toc). But they are easily fixed (epubcheck is your friend), so it seems that you're pretty close to the end of your journey :).

Adjust
06-09-2011, 03:23 AM
Yeap. What thydere said.

And then deal with all the other errors that have popped up :p

eping
06-09-2011, 10:32 PM
A really very interesting case.
A tiny space makes an epub crashed.

But how could that happen, I tried input a space after a folder name
on my PC, but it's trimmed by Windows automatically.

Adjust
06-09-2011, 11:45 PM
Mac's keep the space in the folder name

thydere
06-10-2011, 04:21 AM
What Adjust said.

Plus: epub (well, OCF to be precise) specifies for two files to be be present with specific names: mimetype and META-INF/container.xml. The first one declares the zip to be of type epub, the second one serves as starting point telling the program the location and type of the content of the book.
With the space in the directory the file did not have the required name anymore - therefore to the epub engine the the second file (and thus the information on how to find the book content) was missing.

You're right in that windows will automatically erase tailing spaces from created directories (which isn't true for neither Linux nor OSX - didn't know that last tidbit myself until I unpacked the ebook in question).
Unfortunately the zipping process is not simply copying files from A to B. You can declare the specific content entry in the zip header (think file system in a single file) while creating your ebook - and my guess is that something went wrong in that step.


And the Moral of the Story: Computers suck. Use Magic Marker on Papyrus for a change... ;)

JSWolf
06-10-2011, 05:32 AM
And the Moral of the Story: Computers suck. Use Magic Marker on Papyrus for a change... ;)

The moral is not to use OS X for any real work. Use Windows.

pholy
06-10-2011, 04:37 PM
The moral is not to use OS X for any real work. Use Windows.

:offtopic:

:dots:

JSWolf
06-10-2011, 07:23 PM
:offtopic:

:dots:

You've used troll incorrectly. That's not what it means. It has to do with online chats, not forums.

eping
06-11-2011, 12:39 AM
Adjust & thydere, thanks for your answers.

I don't know why other OSs accept a folder name
starting or ending with a space, is there any use of that?
Invisible characters always make troubles.

thydere
06-11-2011, 01:38 AM
Hmm I think the second part of my statement was a bit ambiguous.

The fact that you can put spaces at the start or end of a directory is only relevant if you use some kind of zip tool for your conversion. These tools usually work by creating a zip that mirror your directory layout - and thus your invalid META-INF dir in the case of the "dumb" zip tool. More "intelligent" tools that are specifically geared for ebook creation (i've seen a window frontend flying around here somewhere, though i've no experience with it) should detect that error and warn the user. And in the former case those errors are easily detected anyway.

However most end users won't create the ebook layout themselves but let backend tools do the work (Illustrator, calibre, whatchamacalit). Meaning that the creation of the zip file and its content is in the hand of the generator software - and if something goes wrong at that part it doesn't really matter with which operation system you're working. A bug is a bug is a bug...

That being said: as i mentioned earlier the space makes the container entry a different one than the expected entry. It doesn't matter whether you put a space or an underscore or a love letter in it - it differs from the spec so if that was your intended container entry then it's missing. Apart from those two files you're pretty free to use any naming convention you prefer. And if those are to put spaces around your filename.... then by all means do just that - they're valid entries.

Baltic Gal
06-11-2011, 05:49 PM
Thank you so much everyone! This problem was making my lupus flare up it was upsetting me so much!

I now know what to look for in the future. The funny thing about the src mistakes is they came up the first time I ran the epub through the validator, and I had thought I had corrected those. I have a lot of health problems and they tend to flare up and give me a foggy head. So, mistakes happen.

Thank you again so much.