This error can occur when the mimetype is compressed inside the epub zip file. What can be done is to create a zip file with only the mimetype file inside but with no compression.
You can do that with 7-Zip setting the Compression level to Store.
In Linux, you can also do that with the terminal command:
zip -0 file.epub mimetype
Then drag and drop the ...
I am not sure what your two .opf files contain, but the EPUB 2.0.1 specs http://www.idpf.org/doc_library/epub/OCF_2.0.1_draft.doc (section 10.1) say:
The <rootfiles> element MUST contain at least one element
that has a media-type of “application/oebps-package+xml”. Only one
element with a media-type of
“application/oebps-package+xml” SHOULD ...
I use a GUI version, that conforms to the standard. It checks all the same places, and the references.
All you would need to do is open the file and drag and drop the EPUB file, you can even verify multiple EPUBs by folder.
The download page at pagina has an English description below the German.
Downloads available for Windows, OSX and Linux.
First go to https://github.com/IDPF/epubcheck/releases and download the last version of EpubCheck as zip file. Unzip the folder.
Be sure that you have Java Runtime (1.5 or above) installed, if not go to http://www.java.com to donwload.
Check if the Path variable is set to the folder where java.exe was installed. If not, go to Control Panel -> System -> ...
I've too developed a GUI for epubcheck. It's licensed under the GNU AGPLv3 or any later version, written in Java, translated into English and German so far, and it is capable of searching directories recursively for EPUBs. See a demo video and the source code. There's also a precompiled download package available.
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 ...
If you are not going to use a ncx, my answer is no, you don't need to change this xhtml file at all.
I'm going to guess here. ns:ncx means that you are using a namespace called "ncx." A namespace is like an xml prefix. Somewhere -- maybe on another file --
you are referring to the ncx namespace, and the error is suggesting that you need to identify it ...
I posted an issue at the epubcheck site.
Someone there knew right away what the problem was.
This is acceptable:
<p>Text <span class="red">red</span> regular.</p>
This is acceptable:
<p>Text <span style="color:red">red</span> regular.</p>
This is not acceptable, and is what I had:
<p>Text <span ...
I'm responsible for an attempt to improve this error message, see https://github.com/IDPF/epubcheck/pull/497 for details. Essentially your Zip packer puts some application or operating system specific stuff into the file, which breaks EPUB mimetype magic number support.
zip -X0 ../myEPUB.epub mimetype
zip -9 -r ../myEPUB.epub META-INF OEBPS
another common error i was getting was extra characters in mimetype 'Mimetype file should only contain the string 'application/epub+zip' and should not be compressed'
I found that my editor Geany was adding a newline when I saved the file and this caused an epubcheck error - a tweak in ...