Errors uploading ePub file

Hi,


I've uploaded/published a number of eBooks in the past, through Lulu, without any issues. When I tried to upload a new ePub today though, I received a number of errors. The ePub was generated using Mac Pages and successfully validates using the latest EpubCheck versions. (I've validated the file with EpubCheck version 3.0 and version 3.0.1).

The eBook I'm trying to upload is basically a new revision of an existing eBook that was uploaded successfully in the past, without any issues.

I'm receiving the following errors:

=====================================================

ERROR: Publisher value is missing in OPS/epb.opf
ERROR: Unable to locate a valid publication date.  A date with the event attribute publication (opf:event=publication) is required in OPS/epb.opf
ERROR: Unable to locate a valid creator.  A creator with the author role (role=aut) and the file-as attribute is required in OPS/epb.opf
ERROR: IOException: Unresolved external XML entity: 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd' in OPS/chapter-4.xhtml
ERROR: Unable to locate element with id 'chapter-4-sh1' in OPS/epb.ncx
ERROR: Unable to locate element with id 'chapter-4-sh2' in OPS/epb.ncx
ERROR: Unable to locate element with id 'chapter-4-sh3' in OPS/epb.ncx

=====================================================

I'm getting the last few errors, "Unable to locate element with id", with quite a few chapters.

Looking through my generated ePub, in the .ncx file for the above error, there is the following line...

<content src="chapter-4.xhtml#chapter-4-sh1"/>

In the chapter-4.xhtml file I've confirmed that ID does in fact exist as there is the following span tag...

<span id="chapter-4-sh1"/>

So basically, the validator is saying that it's unable to locate an html element with that ID, even though that ID does actually exist!

(Just on a sidenote, I uploaded the same ePub to Amazon earlier, and I never received any validation errors from them either)

I'm hoping someone can shed some light on this or has some suggestions. Thanks in advance.

Regards,
Anthony

Comments

  • Best advice ever: If you're publishing at Lulu, use the tools Lulu provides: The converter.

    As for the publisher ops, add Lulu.com in metadata under publisher. As for Creator, add one: You. Then update.

    You are missing images or content that has already been accounted for. Try updating your TOC. This should update your entire epub:

    ERROR: IOException: Unresolved external XML entity: 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd' in OPS/chapter-4.xhtml (remove the link or update it)
    ERROR: Unable to locate element with id 'chapter-4-sh1' in OPS/epb.ncx These are all missing. You probably edited your content
    ERROR: Unable to locate element with id 'chapter-4-sh2' in OPS/epb.ncx
    ERROR: Unable to locate element with id 'chapter-4-sh3' in OPS/epb.ncx

  • Hi Anthony, you seem to know your stuff when publishing, is there anyway I can get you to publish an eBook for me? It is a children's book already in print. I looked over the guide and am totally lost with the lingo for eBooks.
  • Hi JasmIllustrator,

    Thanks for your advice. Since I'm using a Mac, I don't have access to Microsoft Word (and I don't intend to purchase Office for Mac). Mac Pages exports directly to valid ePub files (validated against the industry standard ePubCheck validator)

    I'm able to add the missing metadata easily enough, the other errors however, aren't due to missing content as you mentioned. I've verified that those ID's mentioned as missing in the errors do in fact exist within the .ncx and .xhtml files. It seems that the Lulu validator is falsely generating these errors.

  • Hi babyross,

    Unfortunately I don't have the time at present. I'm fairly flat out working with my own clients and projects. Sorry I'm not able to help.
  • You could try using Open Office. It's free software.

    It's really the easiest method. You can then edit your Lulu generated epub, and reupload that.

  • Agreed. It can be frustrating.

    I just uploaded an epub. I was successful on the third attempt.

    I also had a missing element error at first. I think it was a mismatched tag, or sth fairly minor.

    I use Sigil to put my own epub togetrher and put it through the validator before uploading. After fixing a few things, it finally emerged with no problems.

    Until I uploaded it to Lulu!

    But the error messages you get from Lulu are fairly specific - although the missing element one is vague. But at least it gives you the file and line number..

    Sigil has a metadata editor built in - so there's a place to add publisher, author, date etc. The interface doesn't make it too obvious - but it's there.

    Go through it step by step and you'll figure it out.

    On the plus side - you learn something.

    The next time around you'll remember what was causing things to mess up.

    If you rename your epub to .zip and crack it open with an unzip utility, you can check your .ncx to see if your files are all listed.

  • For the kinds of errors that you get from Lulu, you need an editor that lets you look at the guts of the epub file - all the .xhtml files that are stored in it.

  • As I mentioned above several times, I've check the xhtml files and I've verified that the ID that Lulu is advising as missing, does in fact exist within the xhtml files. Every single one of them does.


    I've even tried uploading a previous version of my epUb file, which uploaded and validated fine 5 months ago and is currently published, and the current Lulu validator is advising similar errors!


    All the ePubs I've tried to upload all validate perfectly with the latest ePubCheck (v3.0.1).

  • ERROR: Unable to locate element with id 'chapter-4-sh3' in OPS/epb.ncx

    Your error message says it's in the .ncx file.

    This is not an xhtml file.

    That's why you can't find it.

    It means that your file id is not listed in the .ncx file that is part of the epub package.

    http://www.jedisaber.com/eBooks/Tutorial.shtml

     

     

  • ahortin,

    Apologies I see you DID mention in one of your earlier posts (but not the latest) that you checked BOTH the .ncx and xhtml.

    It's certainly mysterious, then.

    I don't now if you're familiar with Calibre - or there is a Mac version.

    (edit) I guess there is - so maybe you're already aware of it http://calibre-ebook.com/download_osx

    Sometimes what works is just to open an epub in Calibre and resave it. It's apparently magic - but it seems to fix some errors in at least some cases.

    I never had to mess with this before, but I notice in the epub options of the latest version there are all kinds of goodies to play with.  remove broken toc entries in the .ncx etc

     

  • After months of back-and-forth with Lulu support and finally getting them to manually review my ePub file, they admitted that my file was valid and their validator was in fact generating false errors. Back in March they said they would get their guys to look into fixing the validator. It's now almost the end of June, over 6 months since I've had this issue, and after contacting them again, they're still no closer to fixing their faulty validator.

     

    I've now given up on Lulu and have gone over to BookBaby. In the space of about 30 minutes, I was able to sign up, add all the necessary details to setup my account, and publish my eBook to iTunes, Nook Books and many others. Their validator uses the industry standard EpubCheck, which my ePub validates perfectly through.

     

    What's even better, it took approximately 5 days from the time I submitted my ebook to the time it was published on the iTunes iBookstore (and that includes 2 days for the weekend). Using Lulu, it constantly took over 3 or 4 weeks to get published in iTunes!

     

    So bye-bye Lulu, I'm fed up with you, your crappy validator and horrible support (if you could even call it that)!

  • For anyone else tearing their hair out over this who finds this old thread, there were two surprising things I had to do:

     

    1) Get rid of all DOCTYPE declarations. Both calibre and Sigil want to put them it but Lulu's validator kept choking on them. I had to turn off a "clean up HTML" option in Sigil to make it stop putting them back in.

     

    2) Make all fragment references from the NCX be to <A> tags. E.g., if you have

     

    ...

    <navPoint id="nav-1" playOrder="1">

    <navLabel>

    <text>Preface</text></navLabel>

    <content src="page-1.xhtml#chapter-1"/>

    </navPoint>

     

    instead of having in page-1.xhtml:

     

    <h1 id="chapter-1">Preface</h1>

     

    you need

     

    <h1><a id="chapter-1">Preface</a></h1>

     

    Otherwise the results from the validator are reasonably self-explanatory if you grok HTML, and maybe Google or DuckDuckGo a few things. It took a few hours of wrestling with the infernal machine to get my ebook ready, but no more so than I spent wrestling with LibreOffice to get the paperback laid out...

     

    Tom Swiss / www.infamous.net

     

Sign In or Register to comment.