Answers.Body: <p>Unfortunately, there's a lot more wrong than the errors listed. The first line needs to be (adding the question mark): </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" standalone="no"?&gt;
  </code></pre>
  
  <p>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. </p>
  
  <p>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?)</p>
  
  <p>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. </p>
  
  <p>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. </p>
  
  <p>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? </p>
  
  <p>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. </p>
  
  <p>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. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-17T15:31:07.310Z
Answers.Text: Please see the update to my question.
Answers.UserDisplayName: Christos Hayward
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-17T13:36:36.183Z
Answers.LastActivityDate: 2017-11-17T13:42:25.813Z
Answers.LastEditDate: 2017-11-17T13:42:25.813Z
Answers.UserDisplayName: idiotprogrammer
Body: <p>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 <a href="https://cjshayward.com/wp-content/project/EVERYTHING.epub" rel="nofollow noreferrer">https://cjshayward.com/wp-content/project/EVERYTHING.epub</a>.</p>
  
  <p>The ePub Check results were:</p>
  
  <pre><code>Detected version: Could not determine version.
  Results: The following problems were found in EVERYTHING.epub:
  
  Type    File    Line    Position    Message
  ERROR   
  
  ./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.
  </code></pre>
  
  <p>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:</p>
  
  <pre><code>&gt;&gt;&gt; print(repr(open('mimetype').read()))
  'application/epub+zip'
  </code></pre>
  
  <p>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:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"&gt;
  &lt;package xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookID"
    version="3.0"&gt;
      &lt;metadata xmlns:dc="http://purl.org/dc/elements/1.1/"
        xmlns:opf="http://www.idpf.org/2007/opf"&gt;
          &lt;dc:title&gt;Unvera Announces New Kool-Aid Line&lt;/dc:title&gt;
          &lt;dc:creator opf:role="aut"&gt;C.J.S. Hayward&lt;/dc:creator&gt;
          &lt;dc:language&gt;en-US&lt;/dc:language&gt;
          &lt;dc:rights&gt;© 1993-2017 by C.J.S. Hayward. Distribute freely.&lt;/dc:rights&gt;
          &lt;dc:publisher&gt;C.J.S. Hayward Publications, CJSHayward.com&lt;/dc:publisher&gt;
          &lt;dc:identifier id="BookID"
             opf:scheme="UUID"&gt;C.J.S. HaywardEVERYTHING&lt;/dc:identifier&gt;
          &lt;meta name="cover" content="cover-image" /&gt;
      &lt;/metadata&gt;
      &lt;manifest&gt;
          &lt;item id="cover-image" href="cover.jpg" media-type="image/jpeg" /&gt;
          &lt;item id="ncx" href="toc.xhtml" media-type="application/x-dtbncx+xml" /&gt;
          &lt;item id="style" href="stylesheet.css" media-type="text/css" /&gt;
          &lt;item id="pagetemplate" href="page-template.xpgt"
            media-type="application/vnd.adobe-page-template+xml" /&gt;
          &lt;item id="titlepage" href="title-page.xhtml"
            media-type="application/xhtml+xml" /&gt;
          &lt;item id="letters" href="letters.xhtml" media-type="application/xhtml+xm
  l" /&gt;
  &lt;item id="doxology" href="doxology.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="narnia" href="narnia.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="apprentice" href="apprentice.xhtml" media-type="application/xhtml+xml"
   /&gt;
  &lt;item id="singularity" href="singularity.xhtml" media-type="application/xhtml+xm
  l" /&gt;
  &lt;item id="providence" href="providence.xhtml" media-type="application/xhtml+xml"
   /&gt;
  &lt;item id="spectacles" href="spectacles.xhtml" media-type="application/xhtml+xml"
   /&gt;
  &lt;item id="druid" href="druid.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="plato" href="plato.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="monk" href="monk.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="gandhi" href="gandhi.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="alchemy" href="alchemy.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="philaret" href="philaret.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="silence" href="silence.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="rules-of-engagement" href="rules-of-engagement.xhtml" media-type="appl
  ication/xhtml+xml" /&gt;
  &lt;item id="technonomicon" href="technonomicon.xhtml" media-type="application/xhtm
  l+xml" /&gt;
  &lt;item id="steel" href="steel.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="memoirs" href="memoirs.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="pet" href="pet.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="backswing" href="backswing.xhtml" media-type="application/xhtml+xml" /
  &gt;
  &lt;item id="physics" href="physics.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="commentary" href="commentary.xhtml" media-type="application/xhtml+xml"
   /&gt;
  &lt;item id="decisive" href="decisive.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="exotic" href="exotic.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="arena" href="arena.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="humility-royal-race" href="humility-royal-race.xhtml" media-type="appl
  ication/xhtml+xml" /&gt;
  &lt;item id="money" href="money.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="luddite" href="luddite.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="grail" href="grail.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="best" href="best.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="hymn" href="hymn.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="new-face-old-ecumenism" href="new-face-old-ecumenism.xhtml" media-type
  ="application/xhtml+xml" /&gt;
  &lt;item id="ecumenism" href="ecumenism.xhtml" media-type="application/xhtml+xml" /
  &gt;
  &lt;item id="pope" href="pope.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="calvinist" href="calvinist.xhtml" media-type="application/xhtml+xml" /
  &gt;
  &lt;item id="stephanos" href="stephanos.xhtml" media-type="application/xhtml+xml" /
  &gt;
  &lt;item id="gamechanger" href="gamechanger.xhtml" media-type="application/xhtml+xm
  l" /&gt;
  &lt;item id="father" href="father.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="death" href="death.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="open" href="open.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="no_rights" href="no_rights.xhtml" media-type="application/xhtml+xml" /
  &gt;
  &lt;item id="knights" href="knights.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="women" href="women.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="naturally-inclusive-language" href="naturally-inclusive-language.xhtml
  " media-type="application/xhtml+xml" /&gt;
  &lt;item id="greek" href="greek.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="picture" href="picture.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="unashamed" href="unashamed.xhtml" media-type="application/xhtml+xml" /
  &gt;
  &lt;item id="unman" href="unman.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="avatar" href="avatar.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="dark_patterns" href="dark_patterns.xhtml" media-type="application/xhtm
  l+xml" /&gt;
  &lt;item id="contraception" href="contraception.xhtml" media-type="application/xhtm
  l+xml" /&gt;
  &lt;item id="life" href="life.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="social-antibodies" href="social-antibodies.xhtml" media-type="applicat
  ion/xhtml+xml" /&gt;
  &lt;item id="desire" href="desire.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="transcendent" href="transcendent.xhtml" media-type="application/xhtml+
  xml" /&gt;
  &lt;item id="author" href="author.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="interview" href="interview.xhtml" media-type="application/xhtml+xml" /
  &gt;
  &lt;item id="negotiation" href="negotiation.xhtml" media-type="application/xhtml+xm
  l" /&gt;
  &lt;item id="theory-of-alien-minds" href="theory-of-alien-minds.xhtml" media-type="
  application/xhtml+xml" /&gt;
  &lt;item id="seraphim" href="seraphim.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="dastardly-duo" href="dastardly-duo.xhtml" media-type="application/xhtm
  l+xml" /&gt;
  &lt;item id="religion-science" href="religion-science.xhtml" media-type="applicatio
  n/xhtml+xml" /&gt;
  &lt;item id="chemistry" href="chemistry.xhtml" media-type="application/xhtml+xml" /
  &gt;
  &lt;item id="creation" href="creation.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="evolution" href="evolution.xhtml" media-type="application/xhtml+xml" /
  &gt;
  &lt;item id="meatspace" href="meatspace.xhtml" media-type="application/xhtml+xml" /
  &gt;
  &lt;item id="grinch" href="grinch.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="icons" href="icons.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="and_all_that" href="and_all_that.xhtml" media-type="application/xhtml+
  xml" /&gt;
  &lt;item id="God" href="God.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="monasticism" href="monasticism.xhtml" media-type="application/xhtml+xm
  l" /&gt;
  &lt;item id="sacrament" href="sacrament.xhtml" media-type="application/xhtml+xml" /
  &gt;
  &lt;item id="dream" href="dream.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="evil" href="evil.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="amusement" href="amusement.xhtml" media-type="application/xhtml+xml" /
  &gt;
  &lt;item id="refutatio" href="refutatio.xhtml" media-type="application/xhtml+xml" /
  &gt;
  &lt;item id="grace" href="grace.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="waste" href="waste.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="yonder" href="yonder.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="sermon" href="sermon.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="math-thesis" href="math-thesis.xhtml" media-type="application/xhtml+xm
  l" /&gt;
  &lt;item id="ai" href="ai.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="augustine" href="augustine.xhtml" media-type="application/xhtml+xml" /
  &gt;
  &lt;item id="cultures" href="cultures.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="janra" href="janra.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="maximos" href="maximos.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="profoundly-gifted" href="profoundly-gifted.xhtml" media-type="applicat
  ion/xhtml+xml" /&gt;
  &lt;item id="blackbird" href="blackbird.xhtml" media-type="application/xhtml+xml" /
  &gt;
  &lt;item id="fast_track" href="fast_track.xhtml" media-type="application/xhtml+xml"
   /&gt;
  &lt;item id="msbp" href="msbp.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="converts" href="converts.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="jobs" href="jobs.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="bac" href="bac.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="firestorm" href="firestorm.xhtml" media-type="application/xhtml+xml" /
  &gt;
  &lt;item id="monastery" href="monastery.xhtml" media-type="application/xhtml+xml" /
  &gt;
  &lt;item id="repentance-heavens-best-kept-secret" href="repentance-heavens-best-kep
  t-secret.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="oops" href="oops.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="glimpse" href="glimpse.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="stranger" href="stranger.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="customer" href="customer.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="orb" href="orb.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="treasure" href="treasure.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="martial-arts" href="martial-arts.xhtml" media-type="application/xhtml+
  xml" /&gt;
  &lt;item id="link-prospectors" href="link-prospectors.xhtml" media-type="applicatio
  n/xhtml+xml" /&gt;
  &lt;item id="spam" href="spam.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="character-sheet" href="character-sheet.xhtml" media-type="application/
  xhtml+xml" /&gt;
  &lt;item id="supercomputers" href="supercomputers.xhtml" media-type="application/xh
  tml+xml" /&gt;
  &lt;item id="voyage" href="voyage.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="dictionary" href="dictionary.xhtml" media-type="application/xhtml+xml"
   /&gt;
  &lt;item id="watch" href="watch.xhtml" media-type="application/xhtml+xml" /&gt;
  &lt;item id="disruptive-unbranding" href="disruptive-unbranding.xhtml" media-type="
  application/xhtml+xml" /&gt;
  &lt;item id="mindstorm" href="mindstorm.xhtml" media-type="application/xhtml+xml" /
  &gt;
  &lt;item id="kool-aid" href="kool-aid.xhtml" media-type="application/xhtml+xml" /&gt;
  
      &lt;/manifest&gt;
      &lt;spine toc="ncx"&gt;
          &lt;itemref idref="titlepage" /&gt;
          &lt;itemref idref="letters" /&gt;
  &lt;itemref idref="doxology" /&gt;
  &lt;itemref idref="narnia" /&gt;
  &lt;itemref idref="apprentice" /&gt;
  &lt;itemref idref="singularity" /&gt;
  &lt;itemref idref="providence" /&gt;
  &lt;itemref idref="spectacles" /&gt;
  &lt;itemref idref="druid" /&gt;
  &lt;itemref idref="plato" /&gt;
  &lt;itemref idref="monk" /&gt;
  &lt;itemref idref="gandhi" /&gt;
  &lt;itemref idref="alchemy" /&gt;
  &lt;itemref idref="philaret" /&gt;
  &lt;itemref idref="silence" /&gt;
  &lt;itemref idref="rules-of-engagement" /&gt;
  &lt;itemref idref="technonomicon" /&gt;
  &lt;itemref idref="steel" /&gt;
  &lt;itemref idref="memoirs" /&gt;
  &lt;itemref idref="pet" /&gt;
  &lt;itemref idref="backswing" /&gt;
  &lt;itemref idref="physics" /&gt;
  &lt;itemref idref="commentary" /&gt;
  &lt;itemref idref="decisive" /&gt;
  &lt;itemref idref="exotic" /&gt;
  &lt;itemref idref="arena" /&gt;
  &lt;itemref idref="humility-royal-race" /&gt;
  &lt;itemref idref="money" /&gt;
  &lt;itemref idref="luddite" /&gt;
  &lt;itemref idref="grail" /&gt;
  &lt;itemref idref="best" /&gt;
  &lt;itemref idref="hymn" /&gt;
  &lt;itemref idref="new-face-old-ecumenism" /&gt;
  &lt;itemref idref="ecumenism" /&gt;
  &lt;itemref idref="pope" /&gt;
  &lt;itemref idref="calvinist" /&gt;
  &lt;itemref idref="stephanos" /&gt;
  &lt;itemref idref="gamechanger" /&gt;
  &lt;itemref idref="father" /&gt;
  &lt;itemref idref="death" /&gt;
  &lt;itemref idref="open" /&gt;
  &lt;itemref idref="no_rights" /&gt;
  &lt;itemref idref="knights" /&gt;
  &lt;itemref idref="women" /&gt;
  &lt;itemref idref="naturally-inclusive-language" /&gt;
  &lt;itemref idref="greek" /&gt;
  &lt;itemref idref="picture" /&gt;
  &lt;itemref idref="unashamed" /&gt;
  &lt;itemref idref="unman" /&gt;
  &lt;itemref idref="avatar" /&gt;
  &lt;itemref idref="dark_patterns" /&gt;
  &lt;itemref idref="contraception" /&gt;
  &lt;itemref idref="life" /&gt;
  &lt;itemref idref="social-antibodies" /&gt;
  &lt;itemref idref="desire" /&gt;
  &lt;itemref idref="transcendent" /&gt;
  &lt;itemref idref="author" /&gt;
  &lt;itemref idref="interview" /&gt;
  &lt;itemref idref="negotiation" /&gt;
  &lt;itemref idref="theory-of-alien-minds" /&gt;
  &lt;itemref idref="seraphim" /&gt;
  &lt;itemref idref="dastardly-duo" /&gt;
  &lt;itemref idref="religion-science" /&gt;
  &lt;itemref idref="chemistry" /&gt;
  &lt;itemref idref="creation" /&gt;
  &lt;itemref idref="evolution" /&gt;
  &lt;itemref idref="meatspace" /&gt;
  &lt;itemref idref="grinch" /&gt;
  &lt;itemref idref="icons" /&gt;
  &lt;itemref idref="and_all_that" /&gt;
  &lt;itemref idref="God" /&gt;
  &lt;itemref idref="monasticism" /&gt;
  &lt;itemref idref="sacrament" /&gt;
  &lt;itemref idref="dream" /&gt;
  &lt;itemref idref="evil" /&gt;
  &lt;itemref idref="amusement" /&gt;
  &lt;itemref idref="refutatio" /&gt;
  &lt;itemref idref="grace" /&gt;
  &lt;itemref idref="waste" /&gt;
  &lt;itemref idref="yonder" /&gt;
  &lt;itemref idref="sermon" /&gt;
  &lt;itemref idref="math-thesis" /&gt;
  &lt;itemref idref="ai" /&gt;
  &lt;itemref idref="augustine" /&gt;
  &lt;itemref idref="cultures" /&gt;
  &lt;itemref idref="janra" /&gt;
  &lt;itemref idref="maximos" /&gt;
  &lt;itemref idref="profoundly-gifted" /&gt;
  &lt;itemref idref="blackbird" /&gt;
  &lt;itemref idref="fast_track" /&gt;
  &lt;itemref idref="msbp" /&gt;
  &lt;itemref idref="converts" /&gt;
  &lt;itemref idref="jobs" /&gt;
  &lt;itemref idref="bac" /&gt;
  &lt;itemref idref="firestorm" /&gt;
  &lt;itemref idref="monastery" /&gt;
  &lt;itemref idref="repentance-heavens-best-kept-secret" /&gt;
  &lt;itemref idref="oops" /&gt;
  &lt;itemref idref="glimpse" /&gt;
  &lt;itemref idref="stranger" /&gt;
  &lt;itemref idref="customer" /&gt;
  &lt;itemref idref="orb" /&gt;
  &lt;itemref idref="treasure" /&gt;
  &lt;itemref idref="martial-arts" /&gt;
  &lt;itemref idref="link-prospectors" /&gt;
  &lt;itemref idref="spam" /&gt;
  &lt;itemref idref="character-sheet" /&gt;
  &lt;itemref idref="supercomputers" /&gt;
  &lt;itemref idref="voyage" /&gt;
  &lt;itemref idref="dictionary" /&gt;
  &lt;itemref idref="watch" /&gt;
  &lt;itemref idref="disruptive-unbranding" /&gt;
  &lt;itemref idref="mindstorm" /&gt;
  &lt;itemref idref="kool-aid" /&gt;
  
      &lt;/spine&gt;
      &lt;guide&gt;
          &lt;reference href="cover.html" type="cover" title="Cover" /&gt;
      &lt;/guide&gt;
  &lt;/package&gt;
  </code></pre>
  
  <p>​​The 2M ePub (hence not attached to this email) is at <a href="https://cjshayward.com/project/EVERYTHING.epub" rel="nofollow noreferrer">https://cjshayward.com/project/EVERYTHING.epub</a>.</p>
  
  <p><strong>--UPDATE--</strong></p>
  
  <p>I am using content, originally mostly available from <a href="https://CJSHayward.com" rel="nofollow noreferrer">my website</a>, 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.</p>
  
  <p>I'm trying to circumvent Calibre's performance characterics to do something more low-level and faster. Meaning learning more.</p>
  
  <p>(N.B. I've gone through the individual .xhtml files until they validate as XHTML 1.1.)</p>
  
Tags: <epub><validation><epubcheck>
Title: ePub validator is giving me errors. How can I address these reported errors?
UserDisplayName: Christos Hayward
ThreadText: # ePub validator is giving me errors. How can I address these reported errors?
  
  (Asked by: username_0 on 2017-11-16)
  
  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
  ERROR   
  
  ./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()))
  'application/epub+zip'
  
  ```
  
  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"
    version="3.0">
      <metadata xmlns:dc="http://purl.org/dc/elements/1.1/"
        xmlns:opf="http://www.idpf.org/2007/opf">
          <dc:title>Unvera Announces New Kool-Aid Line</dc:title>
          <dc:creator opf:role="aut">C.J.S. username_0</dc:creator>
          <dc:language>en-US</dc:language>
          <dc:rights>© 1993-2017 by C.J.S. username_0. Distribute freely.</dc:rights>
          <dc:publisher>C.J.S. username_0 Publications, CJSHayward.com</dc:publisher>
          <dc:identifier id="BookID"
             opf:scheme="UUID">C.J.S. HaywardEVERYTHING</dc:identifier>
          <meta name="cover" content="cover-image" />
      </metadata>
      <manifest>
          <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" />
  
      </manifest>
      <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" />
  
      </spine>
      <guide>
          <reference href="cover.html" type="cover" title="Cover" />
      </guide>
  </package>
  
  ```
  
  ​​The 2M ePub (hence not attached to this email) is at <https://cjshayward.com/project/EVERYTHING.epub>.
  
  **--UPDATE--**
  
  I am using content, originally mostly available from [my website](https://CJSHayward.com), 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.)
  
  **Tags:** epub, validation, epubcheck
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-11-17. Score: 2 | Accepted answer
  
  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.
  
  > **Comments:**
  > **username_0**: Please see the update to my question.  
  
  ---
  
  