XML technologies / ePUB / Open Container Format / OCF container contents / The META-INF folder

(Excerpt from “E-Books mit ePUB ─ Von Word zum E-Book mit XML” by Dr. Victor Wang)

META-INF may contain these files:

Begin with the essential file container.xml, which is always required. The purpose of container.xml is to reference the primary file to process, usually the OPF package file for ePUB. The element rootfile does this: its attributes specify the OPF path (full-path) and media type (media-type). The path attribute full-path is relative not to container.xml but to META-INF’s parent directory. The element rootfile may occur multiple times, offering an alternative if a reader cannot display the first format. For example, supply a PDF alongside ePUB.

<?xml version="1.0"?>
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">        ①
  <rootfiles>
    <rootfile full-path="ops/euklid.opf" media-type="application/oebps-package+xml" />   ②
    <rootfile full-path="pdf/euklid.pdf" media-type="application/pdf" />                 ②
  </rootfiles>
</container>

Code example: OCF container file

The namespace of the root at ① shows the concept was borrowed from Open Document Format. The first rootfile element at ② references ePUB and its media type; ③ similarly provides the PDF alternative.

The optional files manifest.xml and metadata.xml appear redundant with the <manifest> and <metadata> elements in OPF’s Package file. They are needed only for files outside OPS content. For OPS, only OPF manifest and metadata matter; for non-OPS content such as a PDF alternative, OCF can hold separate manifest and metadata files. While manifest.xml must follow the OpenDocument manifest structure (ODF 1.0), the current specification does not define the structure of metadata.xml.

   

 

 

 

back to top