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:
container.xml: root directory and publication OPF file information; always requiredmanifest.xml: manifest for non-OPS content; optional
metadata.xml: metadata for non-OPS content; optional
signatures.xml: digital watermarks; optionalencryption.xml: data encryption; optionalrights.xml: rights management; optional
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.
Copyright © mitp 2011
You may print the online version for your private use.
Otherwise, this chapter from “E-Books mit ePUB” is subject to the same terms as the printed edition: the work and all its parts are protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Verlagsgruppe Hüthig Jehle Rehm GmbH, Im Weiher 10, 69121 Heidelberg, kundenbetreuung(at)hjr-verlag.de
back to top