XML technologies / ePUB / Open Publication Format / The Manifest element / Fallback items
(Excerpt from “E-Books mit ePUB ─ Von Word zum E-Book mit XML” by Dr. Victor Wang)
Beyond its central inventory function, the manifest section of OPF can define fallback items, emergency references for readers unable to display or output a particular media type.
OPF and, as described later, OPS require every reader to support at least the core media types (Core Media Types). The following are permitted within an OPF Item reference:
MIME media type | Format | File extension |
|---|---|---|
| Content as XHTML 1.1 |
|
| NCX file from DTBook |
|
| Content as DTBook |
|
| Raster graphics format |
|
| Raster graphics format |
|
| Raster graphics format |
|
| XML graphics format for vector graphics |
|
| CSS 2.0 |
|
Table: OPF core media types
OPF does not prohibit other formats, but always requires a displayable emergency alternative.
For example, you might include a PDF file, which is not a core media type. A suitable fallback item could look like this:
<manifest>
<!-- NCX-Datei -->
<item id="ncx" href="nav.ncx" media-type="application/x-dtbncx+xml"/>
<!-- CSS-Stylesheet -->
<item id="css" href="ebook.css" media-type="text/css"/>
<!-- Liste der Dokumente -->
<item id="kap01" href="kap01.htm" media-type="application/xhtml+xml"/>
<item id="kap01anhangpdf" href="kap01anh.pdf" media-type="application/pdf" fallback="kap01anhanghtml"/> ①
<item id="kap01anhanghtml" href="kap01anh.htm" media-type="application/xhtml+xml"/> ②
<item id="kap02" href="kap02.htm" media-type="application/xhtml+xml"/>
<item id="kap03" href="kap03.htm" media-type="application/xhtml+xml"/>
. . .
</manifest>
Code example: Fallback item (XHTML instead of PDF)
The example adds a PDF appendix, such as a form, after chapter 1. At ① the PDF file kap01anh.pdf is declared with its media type. The attribute fallback references another item to display as fallback. That item, here XHTML, follows at ②. The fallback-attribute thus uses the fallback item’s id-value.
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