bell notificationshomepageloginedit profileclubsdmBox

10.01% popularity   0 Reactions

I've received an ePub with the following structure:

Abstract Container:
META-INF/
container.xml
varience.txt
OEBPS/
content.opf
Great Expectations.opf
cover.html
chapters/
chapter01.html
chapter02.html
… other OPS files for the remaining chapters …

There are two opf files contained within it, but only content.opf is referenced by the abstract container's container.xml

I think this valid as I don't get any errors thrown by epubcheck, but I'm having trouble understanding why an ePub would be structured this way. I'm also a little confused by the Open Packaging Format (OPF) 2.0.1 spec as it says under the package conformance section: "it may consist of one or more XML files, but only one may use the file extension .opf."

So I guess my questions are:

Is it valid to have more than one .opf file? In what circumstances would this be useful?
Is it valid to list an .opf file that isn't referenced in the container.xml?
Is it valid to list multiple .opf files if they are referenced in container.xml? How would this be represented in container.xml? How would an ePub reader decide which to use?


Free books android app tbrJar TBR JAR Read Free books online gutenberg


Load Full (1)

Login to follow story

More posts by @Sandra

1 Comments

Sorted by latest first Latest Oldest Best

 

@Linda

10% popularity   0 Reactions

I am not sure what your two .opf files contain, but the EPUB 2.0.1 specs 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 be included. The file
referenced by the first element that has a media-type of
“application/oebps-package+xml” will be considered the EPUB rootfile.
The EPUB rootfile (the OPF package file) MUST NOT be encrypted.

This means that you can have more OPF files in the container, and even reference them in the container.xml, but only the first will be considered the primary one. (And, I add, most real world reading systems will ignore the others.)

Note, however, that you can have multiple renditions inside the EPUB container:

<?xml version="1.0"?>
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
<rootfiles>
<rootfile full-path="OEBPS/My Crazy Life.opf" media-type="application/oebps-package+xml" />
<rootfile full-path="PDF/My Crazy Life.pdf" media-type="application/pdf" />
</rootfiles>
</container>

So, just having another OPF file is fine, as long as you list it in the <manifest> (of the OPF actually referenced in the container.xml). For any functional purpose, it will be ignored by the reading system.

Comment 1: I still think that the EPUB you have been given is probably the result of some sort of experimentation, and having two OPF files is the result of some mistake.

Comment 2: in theory, having multiple OPF files is a way to pack multiple renditions of the same publication inside the same EPUB container. The IDPF has a working group on multiple renditions: www.idpf.org/epub/renditions/multiple/


Free books android app tbrJar TBR JAR Read Free books online gutenberg


Load Full (0)

 

Back to top