I am working a "Christmas tree packet" version of a kind of (version 3.0) ePub I am working on, and I would like help understanding the results. This ePub includes images, and is available from https://cjshayward.com/wp-content/project/EVERYTHING.epub.

The ePub Check results were:

Detected version: Could not determine version.
Results: The following problems were found in EVERYTHING.epub:

Type    File    Line    Position    Message

./tmp/uploads/1510845141245_0000503385/inputFile/EVERYTHING.epub/EVERYTHING.epub    -   -   The mimetype file has an extra field of length 28. The use of the extra field feature of the ZIP format is not permitted for the mimetype file.
ERROR   OEBPS/content.opf   -   -   Error while parsing file 'A pseudo attribute name is expected. '.
ERROR   OEBPS/content.opf   -   -   There was an error when parsing the EPUB version: Version not found.

The first error has me puzzled; I got that error before when I had a mimetype with a line break at the end. Python seems to think I have the mimetype I now intend:

>>> print(repr(open('mimetype').read()))

I am also not sure how to interpret the comments about content.opf. I tried to specify a version in the .opf file, and ​I don't know what "A pseudo attribute name is expected." That file reads:

<?xml version="1.0" encoding="UTF-8">
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookID"
    <metadata xmlns:dc="http://purl.org/dc/elements/1.1/"
        <dc:title>Unvera Announces New Kool-Aid Line</dc:title>
        <dc:creator opf:role="aut">C.J.S. Hayward</dc:creator>
        <dc:rights>© 1993-2017 by C.J.S. Hayward. Distribute freely.</dc:rights>
        <dc:publisher>C.J.S. Hayward Publications, CJSHayward.com</dc:publisher>
        <dc:identifier id="BookID"
           opf:scheme="UUID">C.J.S. HaywardEVERYTHING</dc:identifier>
        <meta name="cover" content="cover-image" />
        <item id="cover-image" href="cover.jpg" media-type="image/jpeg" />
        <item id="ncx" href="toc.xhtml" media-type="application/x-dtbncx+xml" />
        <item id="style" href="stylesheet.css" media-type="text/css" />
        <item id="pagetemplate" href="page-template.xpgt"
          media-type="application/vnd.adobe-page-template+xml" />
        <item id="titlepage" href="title-page.xhtml"
          media-type="application/xhtml+xml" />
        <item id="letters" href="letters.xhtml" media-type="application/xhtml+xm
l" />
<item id="doxology" href="doxology.xhtml" media-type="application/xhtml+xml" />
<item id="narnia" href="narnia.xhtml" media-type="application/xhtml+xml" />
<item id="apprentice" href="apprentice.xhtml" media-type="application/xhtml+xml"
<item id="singularity" href="singularity.xhtml" media-type="application/xhtml+xm
l" />
<item id="providence" href="providence.xhtml" media-type="application/xhtml+xml"
<item id="spectacles" href="spectacles.xhtml" media-type="application/xhtml+xml"
<item id="druid" href="druid.xhtml" media-type="application/xhtml+xml" />
<item id="plato" href="plato.xhtml" media-type="application/xhtml+xml" />
<item id="monk" href="monk.xhtml" media-type="application/xhtml+xml" />
<item id="gandhi" href="gandhi.xhtml" media-type="application/xhtml+xml" />
<item id="alchemy" href="alchemy.xhtml" media-type="application/xhtml+xml" />
<item id="philaret" href="philaret.xhtml" media-type="application/xhtml+xml" />
<item id="silence" href="silence.xhtml" media-type="application/xhtml+xml" />
<item id="rules-of-engagement" href="rules-of-engagement.xhtml" media-type="appl
ication/xhtml+xml" />
<item id="technonomicon" href="technonomicon.xhtml" media-type="application/xhtm
l+xml" />
<item id="steel" href="steel.xhtml" media-type="application/xhtml+xml" />
<item id="memoirs" href="memoirs.xhtml" media-type="application/xhtml+xml" />
<item id="pet" href="pet.xhtml" media-type="application/xhtml+xml" />
<item id="backswing" href="backswing.xhtml" media-type="application/xhtml+xml" /
<item id="physics" href="physics.xhtml" media-type="application/xhtml+xml" />
<item id="commentary" href="commentary.xhtml" media-type="application/xhtml+xml"
<item id="decisive" href="decisive.xhtml" media-type="application/xhtml+xml" />
<item id="exotic" href="exotic.xhtml" media-type="application/xhtml+xml" />
<item id="arena" href="arena.xhtml" media-type="application/xhtml+xml" />
<item id="humility-royal-race" href="humility-royal-race.xhtml" media-type="appl
ication/xhtml+xml" />
<item id="money" href="money.xhtml" media-type="application/xhtml+xml" />
<item id="luddite" href="luddite.xhtml" media-type="application/xhtml+xml" />
<item id="grail" href="grail.xhtml" media-type="application/xhtml+xml" />
<item id="best" href="best.xhtml" media-type="application/xhtml+xml" />
<item id="hymn" href="hymn.xhtml" media-type="application/xhtml+xml" />
<item id="new-face-old-ecumenism" href="new-face-old-ecumenism.xhtml" media-type
="application/xhtml+xml" />
<item id="ecumenism" href="ecumenism.xhtml" media-type="application/xhtml+xml" /
<item id="pope" href="pope.xhtml" media-type="application/xhtml+xml" />
<item id="calvinist" href="calvinist.xhtml" media-type="application/xhtml+xml" /
<item id="stephanos" href="stephanos.xhtml" media-type="application/xhtml+xml" /
<item id="gamechanger" href="gamechanger.xhtml" media-type="application/xhtml+xm
l" />
<item id="father" href="father.xhtml" media-type="application/xhtml+xml" />
<item id="death" href="death.xhtml" media-type="application/xhtml+xml" />
<item id="open" href="open.xhtml" media-type="application/xhtml+xml" />
<item id="no_rights" href="no_rights.xhtml" media-type="application/xhtml+xml" /
<item id="knights" href="knights.xhtml" media-type="application/xhtml+xml" />
<item id="women" href="women.xhtml" media-type="application/xhtml+xml" />
<item id="naturally-inclusive-language" href="naturally-inclusive-language.xhtml
" media-type="application/xhtml+xml" />
<item id="greek" href="greek.xhtml" media-type="application/xhtml+xml" />
<item id="picture" href="picture.xhtml" media-type="application/xhtml+xml" />
<item id="unashamed" href="unashamed.xhtml" media-type="application/xhtml+xml" /
<item id="unman" href="unman.xhtml" media-type="application/xhtml+xml" />
<item id="avatar" href="avatar.xhtml" media-type="application/xhtml+xml" />
<item id="dark_patterns" href="dark_patterns.xhtml" media-type="application/xhtm
l+xml" />
<item id="contraception" href="contraception.xhtml" media-type="application/xhtm
l+xml" />
<item id="life" href="life.xhtml" media-type="application/xhtml+xml" />
<item id="social-antibodies" href="social-antibodies.xhtml" media-type="applicat
ion/xhtml+xml" />
<item id="desire" href="desire.xhtml" media-type="application/xhtml+xml" />
<item id="transcendent" href="transcendent.xhtml" media-type="application/xhtml+
xml" />
<item id="author" href="author.xhtml" media-type="application/xhtml+xml" />
<item id="interview" href="interview.xhtml" media-type="application/xhtml+xml" /
<item id="negotiation" href="negotiation.xhtml" media-type="application/xhtml+xm
l" />
<item id="theory-of-alien-minds" href="theory-of-alien-minds.xhtml" media-type="
application/xhtml+xml" />
<item id="seraphim" href="seraphim.xhtml" media-type="application/xhtml+xml" />
<item id="dastardly-duo" href="dastardly-duo.xhtml" media-type="application/xhtm
l+xml" />
<item id="religion-science" href="religion-science.xhtml" media-type="applicatio
n/xhtml+xml" />
<item id="chemistry" href="chemistry.xhtml" media-type="application/xhtml+xml" /
<item id="creation" href="creation.xhtml" media-type="application/xhtml+xml" />
<item id="evolution" href="evolution.xhtml" media-type="application/xhtml+xml" /
<item id="meatspace" href="meatspace.xhtml" media-type="application/xhtml+xml" /
<item id="grinch" href="grinch.xhtml" media-type="application/xhtml+xml" />
<item id="icons" href="icons.xhtml" media-type="application/xhtml+xml" />
<item id="and_all_that" href="and_all_that.xhtml" media-type="application/xhtml+
xml" />
<item id="God" href="God.xhtml" media-type="application/xhtml+xml" />
<item id="monasticism" href="monasticism.xhtml" media-type="application/xhtml+xm
l" />
<item id="sacrament" href="sacrament.xhtml" media-type="application/xhtml+xml" /
<item id="dream" href="dream.xhtml" media-type="application/xhtml+xml" />
<item id="evil" href="evil.xhtml" media-type="application/xhtml+xml" />
<item id="amusement" href="amusement.xhtml" media-type="application/xhtml+xml" /
<item id="refutatio" href="refutatio.xhtml" media-type="application/xhtml+xml" /
<item id="grace" href="grace.xhtml" media-type="application/xhtml+xml" />
<item id="waste" href="waste.xhtml" media-type="application/xhtml+xml" />
<item id="yonder" href="yonder.xhtml" media-type="application/xhtml+xml" />
<item id="sermon" href="sermon.xhtml" media-type="application/xhtml+xml" />
<item id="math-thesis" href="math-thesis.xhtml" media-type="application/xhtml+xm
l" />
<item id="ai" href="ai.xhtml" media-type="application/xhtml+xml" />
<item id="augustine" href="augustine.xhtml" media-type="application/xhtml+xml" /
<item id="cultures" href="cultures.xhtml" media-type="application/xhtml+xml" />
<item id="janra" href="janra.xhtml" media-type="application/xhtml+xml" />
<item id="maximos" href="maximos.xhtml" media-type="application/xhtml+xml" />
<item id="profoundly-gifted" href="profoundly-gifted.xhtml" media-type="applicat
ion/xhtml+xml" />
<item id="blackbird" href="blackbird.xhtml" media-type="application/xhtml+xml" /
<item id="fast_track" href="fast_track.xhtml" media-type="application/xhtml+xml"
<item id="msbp" href="msbp.xhtml" media-type="application/xhtml+xml" />
<item id="converts" href="converts.xhtml" media-type="application/xhtml+xml" />
<item id="jobs" href="jobs.xhtml" media-type="application/xhtml+xml" />
<item id="bac" href="bac.xhtml" media-type="application/xhtml+xml" />
<item id="firestorm" href="firestorm.xhtml" media-type="application/xhtml+xml" /
<item id="monastery" href="monastery.xhtml" media-type="application/xhtml+xml" /
<item id="repentance-heavens-best-kept-secret" href="repentance-heavens-best-kep
t-secret.xhtml" media-type="application/xhtml+xml" />
<item id="oops" href="oops.xhtml" media-type="application/xhtml+xml" />
<item id="glimpse" href="glimpse.xhtml" media-type="application/xhtml+xml" />
<item id="stranger" href="stranger.xhtml" media-type="application/xhtml+xml" />
<item id="customer" href="customer.xhtml" media-type="application/xhtml+xml" />
<item id="orb" href="orb.xhtml" media-type="application/xhtml+xml" />
<item id="treasure" href="treasure.xhtml" media-type="application/xhtml+xml" />
<item id="martial-arts" href="martial-arts.xhtml" media-type="application/xhtml+
xml" />
<item id="link-prospectors" href="link-prospectors.xhtml" media-type="applicatio
n/xhtml+xml" />
<item id="spam" href="spam.xhtml" media-type="application/xhtml+xml" />
<item id="character-sheet" href="character-sheet.xhtml" media-type="application/
xhtml+xml" />
<item id="supercomputers" href="supercomputers.xhtml" media-type="application/xh
tml+xml" />
<item id="voyage" href="voyage.xhtml" media-type="application/xhtml+xml" />
<item id="dictionary" href="dictionary.xhtml" media-type="application/xhtml+xml"
<item id="watch" href="watch.xhtml" media-type="application/xhtml+xml" />
<item id="disruptive-unbranding" href="disruptive-unbranding.xhtml" media-type="
application/xhtml+xml" />
<item id="mindstorm" href="mindstorm.xhtml" media-type="application/xhtml+xml" /
<item id="kool-aid" href="kool-aid.xhtml" media-type="application/xhtml+xml" />

    <spine toc="ncx">
        <itemref idref="titlepage" />
        <itemref idref="letters" />
<itemref idref="doxology" />
<itemref idref="narnia" />
<itemref idref="apprentice" />
<itemref idref="singularity" />
<itemref idref="providence" />
<itemref idref="spectacles" />
<itemref idref="druid" />
<itemref idref="plato" />
<itemref idref="monk" />
<itemref idref="gandhi" />
<itemref idref="alchemy" />
<itemref idref="philaret" />
<itemref idref="silence" />
<itemref idref="rules-of-engagement" />
<itemref idref="technonomicon" />
<itemref idref="steel" />
<itemref idref="memoirs" />
<itemref idref="pet" />
<itemref idref="backswing" />
<itemref idref="physics" />
<itemref idref="commentary" />
<itemref idref="decisive" />
<itemref idref="exotic" />
<itemref idref="arena" />
<itemref idref="humility-royal-race" />
<itemref idref="money" />
<itemref idref="luddite" />
<itemref idref="grail" />
<itemref idref="best" />
<itemref idref="hymn" />
<itemref idref="new-face-old-ecumenism" />
<itemref idref="ecumenism" />
<itemref idref="pope" />
<itemref idref="calvinist" />
<itemref idref="stephanos" />
<itemref idref="gamechanger" />
<itemref idref="father" />
<itemref idref="death" />
<itemref idref="open" />
<itemref idref="no_rights" />
<itemref idref="knights" />
<itemref idref="women" />
<itemref idref="naturally-inclusive-language" />
<itemref idref="greek" />
<itemref idref="picture" />
<itemref idref="unashamed" />
<itemref idref="unman" />
<itemref idref="avatar" />
<itemref idref="dark_patterns" />
<itemref idref="contraception" />
<itemref idref="life" />
<itemref idref="social-antibodies" />
<itemref idref="desire" />
<itemref idref="transcendent" />
<itemref idref="author" />
<itemref idref="interview" />
<itemref idref="negotiation" />
<itemref idref="theory-of-alien-minds" />
<itemref idref="seraphim" />
<itemref idref="dastardly-duo" />
<itemref idref="religion-science" />
<itemref idref="chemistry" />
<itemref idref="creation" />
<itemref idref="evolution" />
<itemref idref="meatspace" />
<itemref idref="grinch" />
<itemref idref="icons" />
<itemref idref="and_all_that" />
<itemref idref="God" />
<itemref idref="monasticism" />
<itemref idref="sacrament" />
<itemref idref="dream" />
<itemref idref="evil" />
<itemref idref="amusement" />
<itemref idref="refutatio" />
<itemref idref="grace" />
<itemref idref="waste" />
<itemref idref="yonder" />
<itemref idref="sermon" />
<itemref idref="math-thesis" />
<itemref idref="ai" />
<itemref idref="augustine" />
<itemref idref="cultures" />
<itemref idref="janra" />
<itemref idref="maximos" />
<itemref idref="profoundly-gifted" />
<itemref idref="blackbird" />
<itemref idref="fast_track" />
<itemref idref="msbp" />
<itemref idref="converts" />
<itemref idref="jobs" />
<itemref idref="bac" />
<itemref idref="firestorm" />
<itemref idref="monastery" />
<itemref idref="repentance-heavens-best-kept-secret" />
<itemref idref="oops" />
<itemref idref="glimpse" />
<itemref idref="stranger" />
<itemref idref="customer" />
<itemref idref="orb" />
<itemref idref="treasure" />
<itemref idref="martial-arts" />
<itemref idref="link-prospectors" />
<itemref idref="spam" />
<itemref idref="character-sheet" />
<itemref idref="supercomputers" />
<itemref idref="voyage" />
<itemref idref="dictionary" />
<itemref idref="watch" />
<itemref idref="disruptive-unbranding" />
<itemref idref="mindstorm" />
<itemref idref="kool-aid" />

        <reference href="cover.html" type="cover" title="Cover" />

​​The 2M ePub (hence not attached to this email) is at https://cjshayward.com/project/EVERYTHING.epub.


I am using content, originally mostly available from my website, and it's a large collection; calibre's performance characteristics mean that the visitor will experience a webpage timeout on downloading the larger collections, taking 96 seconds to do the complete (8M) collection.

I'm trying to circumvent Calibre's performance characterics to do something more low-level and faster. Meaning learning more.

(N.B. I've gone through the individual .xhtml files until they validate as XHTML 1.1.)

1 Answer 1


Unfortunately, there's a lot more wrong than the errors listed. The first line needs to be (adding the question mark):

<?xml version="1.0" encoding="utf-8" standalone="no"?>

After you correct that and validate that, you will turn up 100s of validation messages -- not only in the opf file but also the xhtml files.

This tells me that your method for generating this file is defective and/or you are importing html from another source without cleaning it up. Or that your desktop tool is not processing everything properly. (I suspect you are using Adobe InDesign?)

It's hard to know where to start. But when I do projects (and I don't use a desktop tool like Indesign), I generate the .opf automatically and that file never gives validation issues. Most people never have to touch this file when creating epubs.

My recommendation for continuing would be to start a new project and then add one chapter/HTML file at a time and then validate that before continuing. Once you feel confident that your tool is producing valid content, you should add additional chapters.

I was inclined to share with you one of my valid opf files to compare against, but you can find clean opf files from many places on the web. Once you validate again with the ? mark, you will see that the opf errors are just scratching the surface here. Perhaps you should consider trying another tool (like Sigil or Calibre) and importing your content into a brand new project inside the new tool?

Another thing. I notice that some of the image references go to an external source. Generally the images should be included in the zip and listed in the manifest.

There are many ways to produce a epub file, but the key thing is to use a tool or develop a process that you are confident is valid right from the start.

  • Please see the update to my question. Nov 17, 2017 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.