01-24-2013, 08:57 PM | #1 |
Addict
Posts: 340
Karma: 43106
Join Date: Apr 2009
Location: Germany
Device: BeBook One, Pocketbook Touch, Pocketbook Touch HD
|
epub check tells me "Version not found" in my content.opf
Hello
I hope you people can help me (again). I am working on creating an epub file, but I am doing it all on my own, no Sigil, no Calibre, just me and my html editor (Notepad ++). So far I followed some helpful links from the Internet. I saw many examples about how the content.opf should look. I think I got it finished. However, when I use the epub checker (or similar validator tools) to see if it is valid, I receive an error. Error in content.opf Version not found. So it seems as if something is missing in my content.opf file. But I am not sure what. As I said, I found some examples and just used them in my content.opf Personally, I think it is somewhere in the first part, with the metadata. But as I said, I just copied some examples from the net ... Here is my content.opf file for that book, I hope you guys can help me. <?xml version="1.0" encoding="UTF-8"??> <package xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookID" version="2.0" > <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf"> <dc:title>Testbook</dc:title> <dc:creator opf:role="aut">Test Author</dc:creator> <dc:language>de</dc:language> <dc:rights>Public Domain</dc:rights> <dc:publisher>NASCARaddicted</dc:publisher> <dc:identifier id="BookID" opf:scheme="UUID">Testbook</dc:identifier> </metadata> <manifest> <item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml" /> <item id="style" href="default.css" media-type="text/css" /> <item id="Kapitel00" href="Split-Test000.html" media-type="application/xhtml+xml" /> <item id="Kapitel01" href="Split-Test001.html" media-type="application/xhtml+xml" /> <item id="Kapitel02" href="Split-Test002.html" media-type="application/xhtml+xml" /> <item id="Kapitel03" href="Split-Test003.html" media-type="application/xhtml+xml" /> <item id="Kapitel04" href="Split-Test004.html" media-type="application/xhtml+xml" /> <item id="Kapitel05" href="Split-Test005.html" media-type="application/xhtml+xml" /> <item id="Kapitel06" href="Split-Test006.html" media-type="application/xhtml+xml" /> <item id="Kapitel07" href="Split-Test007.html" media-type="application/xhtml+xml" /> <item id="Kapitel08" href="Split-Test008.html" media-type="application/xhtml+xml" /> <item id="Kapitel09" href="Split-Test009.html" media-type="application/xhtml+xml" /> <item id="Kapitel10" href="Split-Test010.html" media-type="application/xhtml+xml" /> <item id="Kapitel11" href="Split-Test011.html" media-type="application/xhtml+xml" /> <item id="Kapitel12" href="Split-Test012.html" media-type="application/xhtml+xml" /> <item id="Kapitel13" href="Split-Test013.html" media-type="application/xhtml+xml" /> <item id="Cover" href="images/cover.jpg" media-type="image/jpg" /> <item id="Kapitel14" href="Split-Test014.html" media-type="application/xhtml+xml" /> <item id="Logo" href="images/Logo.jpg" media-type="image/jpg" /> </manifest> <spine toc="ncx"> <itemref idref="Kapitel00" /> <itemref idref="Kapitel01" /> <itemref idref="Kapitel02" /> <itemref idref="Kapitel03" /> <itemref idref="Kapitel04" /> <itemref idref="Kapitel05" /> <itemref idref="Kapitel06" /> <itemref idref="Kapitel07" /> <itemref idref="Kapitel08" /> <itemref idref="Kapitel09" /> <itemref idref="Kapitel10" /> <itemref idref="Kapitel11" /> <itemref idref="Kapitel12" /> <itemref idref="Kapitel13" /> <itemref idref="Kapitel14" /> </spine> <guide> <reference href="Kapitel00.html" type="cover" title="Cover"/> </guide> </package> Thanks for your help |
01-24-2013, 11:38 PM | #2 |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Well, you have a parse error in the first line. It should end with ?>, not ??>.
Beyond that, the error you're seeing can be caused by the name of the OPF file not matching what is in the META-INF/container.xml file. Paths in the container.xml file are relative to the root, not relative to the file, so if your structure is Code:
bookdir/content.opf bookdir/META-INF/container.xml Code:
<?xml version="1.0"?> <container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> <rootfiles> <rootfile full-path="content.opf" media-type="application/oebps-package+xml"/> </rootfiles> </container> Last edited by dgatwood; 01-24-2013 at 11:48 PM. |
Advert | |
|
01-25-2013, 04:50 AM | #3 |
Addict
Posts: 340
Karma: 43106
Join Date: Apr 2009
Location: Germany
Device: BeBook One, Pocketbook Touch, Pocketbook Touch HD
|
thanks so far.
The "??" was, because I copied it from the internet ... But I noticed another thing. Of course I also looked at epubs created with calibre. And in this case, the content is all in the main path. But like suggested on the internet, I created an OEBPS folder to contain all the content. After editing the path in the container.xml file, the "version error" is gone (but therefore I found many other errors in the other files. Thanks for your help. |
01-25-2013, 06:44 AM | #4 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
I recommend looking at the site from Jedisaber. He explains the ePUB2 format quite well and it will help you.
|
01-26-2013, 08:10 AM | #5 | |
Addict
Posts: 340
Karma: 43106
Join Date: Apr 2009
Location: Germany
Device: BeBook One, Pocketbook Touch, Pocketbook Touch HD
|
Quote:
As I said, the "version error" was gone, once I changed the path in the content.opf file. After that I got some other errors, but mostly they were caused by bad bracketing (a closing tag too much) and stuff like that. The only error I still get is about a jpg file. ("not conform to the opf standard"). I guess I will take the same html and jpg files and run them through Calibre and compare the outcoming code with my own code. If that doesn't help me then I will post it here. But again, thanks for your helpful input. Edit: never mind what I said earlier, about the jpg file. It seems as if I found the error. I used media-type="image/jpg" After changing the "jpg" to "jpeg", the image seems to be fine according to epub checker. Last edited by NASCARaddicted; 01-26-2013 at 08:37 AM. Reason: solved |
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Save Log in "Check Library-Problems Found" | BetterRed | Calibre | 1 | 07-25-2012 05:47 PM |
I found references to "PRIME_EBOOKS" and "kindle-video-slate" on Amazon pages! | nick541 | Amazon Kindle | 7 | 09-26-2011 02:56 PM |
"Content is not allowed in prolog." - Enhanced Epub Error Help? | AmpedUpDigital | ePub | 2 | 05-03-2011 11:38 AM |
Creator taking control of the "first page" link in the "content" menu | cyberbaffled | Kindle Formats | 2 | 07-11-2010 04:21 PM |
Steve Jobs tells Hollywood "No" To High-Definition DVD | Alexander Turcic | Lounge | 1 | 06-18-2004 05:29 AM |