View Full Version : aum epub fixer


aum
04-15-2011, 01:43 PM
How do I link a TOC in an epub, so that it renders on a kindle and has anyone seen this message before:

(iTunesMetadata.plist) exists in the zip file, but is not declared in the OPF file

wannabee
04-17-2011, 09:23 PM
has anyone seen this message before:

(iTunesMetadata.plist) exists in the zip file, but is not declared in the OPF file

Regarding that last part of the question: I am sure this is Apple's way of saying to all iBook users that they have a sick sence of humour.
As soon as you proof your ePub on an iPad, iTunes adds it's own file (quoted above) which invalidates the ePub.
Solution: Open the ePub again. Remove the playlist which will be on the first level of the package and rezip and rename epub.
I rename the file like "no itunes plist" and use that file to validate then put it in another directory that never goes near iTunes again.

Regarding the linking of a TOC in ePub. It is the same way you create hyperlinks in HTML. How you do that is up to you. Manually in a text editor or there are some HTML editors. Download Sigil and have a read of the Sigil threads.

marytg
04-18-2011, 11:35 AM
I have successfully created a book using HTML for Kindle. Now I am trying to create an ePub format for my next book and have run into a stubborn problem. The HTML works fine, also works when converted to PDF. But I get the "fragment identifier is not defined" error in epubcheck.

I link from my headings back to the table of contents. It is a technical book, not fiction, so this feature is quite useful and important to me.

Here is the code that generates the error in epub:
<p id="NavigationTips"><a href="#aTableofContents"><b><i>Navigation Tips</i></b></a></p>

If I remove "<a href="#aTableofContents">", it does not generate the frag id error.

This is the target code for the TOC:
<h3 id="aTableofContents"><b><i>Contents</i></b></h3>

I have validated the code in HTML Validator. It does not report an error with the code with the href back to the TOC.

I am no expert at HTML, so it could be just a newbie coding error, but I have tried everything and I'm hoping for some expert advice.

Thanks,
Mary

JSWolf
04-18-2011, 11:45 AM
I have successfully created a book using HTML for Kindle. Now I am trying to create an ePub format for my next book and have run into a stubborn problem. The HTML works fine, also works when converted to PDF. But I get the "fragment identifier is not defined" error in epubcheck.

I link from my headings back to the table of contents. It is a technical book, not fiction, so this feature is quite useful and important to me.

Here is the code that generates the error in epub:
<p id="NavigationTips"><a href="#aTableofContents"><b><i>Navigation Tips</i></b></a></p>

If I remove "<a href="#aTableofContents">", it does not generate the frag id error.

This is the target code for the TOC:
<h3 id="aTableofContents"><b><i>Contents</i></b></h3>

I have validated the code in HTML Validator. It does not report an error with the code with the href back to the TOC.

I am no expert at HTML, so it could be just a newbie coding error, but I have tried everything and I'm hoping for some expert advice.

Thanks,
Mary

Since you are dealing with ePub here, you can just delete the internal ToC as long as you have a good external ToC. ePub does not need an internal ToC. So that is just bloat.

pholy
04-18-2011, 01:12 PM
On the other hand, in spite of Jon's Excellent Opinion, you may have decided or been told that you must have an internal html TOC. Personally, I kind of like an HTML TOC.
While I haven't tried the kind of linking you are attempting, it could well be that your fragment identifier is missing a file reference, so the parser doesn't have any idea which file to find the anchor in. Just a guess, but pretty easy to check. Good luck, perhaps more knowledgeable people will have better suggestions.

marytg
04-18-2011, 02:10 PM
Since you are dealing with ePub here, you can just delete the internal ToC as long as you have a good external ToC. ePub does not need an internal ToC. So that is just bloat.

I realize that the ncx is a ToC. However, I have read on some sites that an internal ToC is a good idea, for one, some ePub readers don't use the ncx file.
Maybe it's misinformation. I'll give up on it if I must.

Thanks for the reply!

marytg
04-18-2011, 02:15 PM
On the other hand, in spite of Jon's Excellent Opinion, you may have decided or been told that you must have an internal html TOC. Personally, I kind of like an HTML TOC.
While I haven't tried the kind of linking you are attempting, it could well be that your fragment identifier is missing a file reference, so the parser doesn't have any idea which file to find the anchor in. Just a guess, but pretty easy to check. Good luck, perhaps more knowledgeable people will have better suggestions.

I considered that but, in fact, this link is in the same file. I do have other links in other documents that refer back to the ToC id and they get the same "fragment identifier" error.

Hopefully, someone has the answer. If you need more info, let me know. I would like a solution if at all possible.

Thanks for your reply,
Mary

Jellby
04-19-2011, 05:19 AM
Try validating with FlightCrew (or Sigil), it might give a more explanatory message.

marytg
04-20-2011, 01:50 PM
To report my results:
I opened my files with Google Chrome and it is "nice" enough to stop on errors on the page and inform you as to which line has the error! Very cool for finding code errors. Bless little IE's heart, it is so forgiving of errors it just opened my files without any problem. So much for HTML Validator, it missed the errors.

After fixing the errors, the "fragment identifier not defined" errors disappeared. Yeay!

Thanks for your tip about FlightCrew. I'll check it out.
Mary

JSWolf
04-20-2011, 09:16 PM
I realize that the ncx is a ToC. However, I have read on some sites that an internal ToC is a good idea, for one, some ePub readers don't use the ncx file.
Maybe it's misinformation. I'll give up on it if I must.

Thanks for the reply!

If you cater for broken ePub readers, you cause the author(s) to not have to fix ToC issue. If you don't have an internal ToC and the external ToC doesn't work, then maybe enough people will complain and the reader will get fixed.