Validation error "Version not found"

4 posts / 0 new
Last post

Hi, and thanks for your help.

I've built the ePub from scratch using Notepad++ and I'm using dummy content files to get the package working.

I have only one remaining error when I use the online epub validator at http://validator.idpf.org/, but I can't see the cause.

The error is:
./tmp/uploads/1455200484959_0000117833/inputFile/mybook5.epub/OEBPS/content.opf(-1,-1)

There was an error when parsing the EPUB version: Version not found.

My content.opf starts like this (I've replaced confidential info below with XXXX):

<?xml version="1.0" encoding="utf-8"?>
<package version="2.0" xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookId">
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlnspf="http://www.idpf.org/2007/opf">

<!--Required Metadata-->
<dc:title>XXXXXX</dc:title>
<dc:language>en-gb</dc:language>
<dc:identifier id="BookId" opf:scheme="ISBN">urn:isbn:XXXXXXX</dc:identifier> <!--Use the Same for the toc.ncx file -->
<dc:creator opf:role="aut">XXXXXXX</dc:creator>
<dcublisher>XXXXXX</dcublisher>
<dc:date>2016-03-14</dc:date>

<meta name="cover" content="My_Cover_ID"/> <!--Required for KindleGen-->

etc etc

<metadata>

Thanks again for your help.

It is referring to the EPUB version, not the XML version.  E.g. either

<package version="2.0" unique-identifier="PrimaryID" xmlns="http://www.idpf.org/2007/opf">

or

<package xmlns="http://www.idpf.org/2007/opf" version="3.0" unique-identifier="uid" prefix="rendition: http://www.idpf.org/vocab/rendition/#">
 
Please see the EPUB packaging spec.:  http://idpf.org/epub/301
 

I don't see a problem in what's been posted. Did you type it in or copy exactly what you have in your file?

The only time I've seen the version not found error is when there's a problem in the prolog, like the xml declaration not ending correctly in '?>'.

There are some other errors in the file (xmlnspf s/b xmlns:opf and <dcuplisher> s/b <dc:publisher>), but those shouldn't cause the version not to be found.

The problem turns out to be the encoding. Notebook++ caught me out on a re-save. :)

Solved now, many thanks for your help.

Secondary menu