View Full Version : META-INF/container error


afpeter
07-18-2013, 05:05 PM
Hi all. I'm trying to create an ePub from scratch (well, sort of from scratch) for a work project. I keep getting the same error message when I try to validate it.

Here's the error message: No rootfile with media type 'application/oebps-package+xml'

Here are the guts of my META-INF/container.xml file:
<rootfiles>
<rootfile full-path="OEBPS/package.opf"
media-type="application/oebps-package+xhtml+xml"/>
</rootfiles>
</container>

My OPF file is named "package.opf".

I've compared my META-INF/container.xml file to other ePubs that I know validate and function correctly, and it seems to match.

BUT clearly something is amiss! Any ideas would be greatly appreciated.

DaleDe
07-18-2013, 07:01 PM
shouldn't it be:
<rootfile full-path="OEBPS/package.opf" media-type="application/oebps-package+xml"/>

Is the case of the filenames and folder names ok?

Dale

Aerys
07-19-2013, 12:49 AM
You might want to check if your "package.opf" is inside the "OEBPS" folder only. If it's inside another folder you need to add that "sub-folder" to the declaration.

Jellby
07-19-2013, 04:58 AM
As Dale said, you have:

application/oebps-package+xhtml+xml

and the error message says it should be:

application/oebps-package+xml

I would start there.

afpeter
07-22-2013, 03:38 PM
Thanks to all who replied!

When I delete "+xhtml" from the "application/oebps-package+xml" path and then try to validate the ePub, I get about 30 error messages. I originally included "xhtml" because most of the files in the OEBPS folder are XHTML, not XML.

Also, the "package.opf" file is in the OEBPS folder so I don't think that's the problem.

Jellby
07-22-2013, 04:45 PM
When I delete "+xhtml" from the "application/oebps-package+xml" path and then try to validate the ePub, I get about 30 error messages.

So now you have to fix them. What probably happened before is that the validator stopped as soon as it arrived to the first problem, while now you see all that was hidden behind.

I originally included "xhtml" because most of the files in the OEBPS folder are XHTML, not XML.

That has nothing to do whatsoever. The media-type is the description of the OPF file itself, which must be "application/oebps-package+xml".

Toxaris
07-22-2013, 05:58 PM
And XHTML is XML of course. Looking weird perhaps, but still XML.

DaleDe
07-22-2013, 10:53 PM
And XHTML is XML of course. Looking weird perhaps, but still XML.

It is an XML with a predefined DDT.

Dale

PeterT
07-23-2013, 01:22 AM
It is an XML with a predefined DDT.

Dale

You'd think that having DDT there would be far fewer bugs in books using XHTML.

DaleDe
07-23-2013, 02:04 AM
You'd think that having DDT there would be far fewer bugs in books using XHTML.

Oops, Freudian slip. I meant DTD ... or did I?

Dale