XML technologies / ePUB / Open Publication Format / Tours and Guide elements
(Excerpt from “E-Books mit ePUB ─ Von Word zum E-Book mit XML” by Dr. Victor Wang)
The manifest may also contain <tours> and <guide>, designed for selective entry into content.
The element <tours>, deprecated in OPF 2.0 and retained only for OEBPS compatibility, offers selective tours through content. Like a city tour highlighting selected sights, an e-book might offer predefined reading sequences, such as an expert quick start or beginner introduction.
Since <tours> is obsolete and replaced conceptually by NCX navigation, we omit detailed treatment of <tour> and <site>.
The last manifest element is <guide>, whose name suggests a resemblance to <tours>. It selects particular content documents: <guide> provides access to standard publication parts: preface, contents, lists of figures, bibliography, and more.
Access them through <guide> using the element <reference>, which works much like the href attribute in <manifest>:
<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="titel" href="titel.htm" media-type="application/xhtml+xml"/>
<item id="vorwort" href="vorwort.htm" media-type="application/xhtml+xml"/>
<item id="inhalt" href="inhaltsverzeichnis.htm"/>
<item id="literatur" href="literaturverzeichnis.htm" media-type="application/xhtml+xml"/>
<item id="kap01" href="kap01.htm" media-type="application/xhtml+xml"/>
<item id="kap02" href="kap02.htm" media-type="application/xhtml+xml"/>
</manifest>
<spine>
<itemref idref="titel"/>
<itemref idref="vorwort"/>
<itemref idref="inhalt"/>
<itemref idref="literatur"/>
<itemref idref="kap01"/>
<itemref idref="kap02"/>
</spine>
<guide>
<reference href="titel.htm" type="cover" title="Titelseite"/>
<reference href="vorwort.htm" type="foreword" title="Vorwort"/>
<reference href="inhaltsverzeichnis.htm" type="toc" title="Inhaltsverzeichnis"/>
<reference href="literaturverzeichnis.htm" type="bibliography" title="Literaturverzeichnis"/>
<reference href="kap01.htm" type="text"/>
</guide>
Code example: Guide element
The element <reference> requires two attributes: href points to the content file and type identifies its role. OPF defines this fixed type list:
Value | Description |
|---|---|
| Book cover |
| Title page |
| Table of contents |
| Index |
| Glossary |
| Acknowledgments |
| Bibliography |
| Colophon |
| Copyright page |
| Dedication |
| Epigraph |
| Foreword |
| List of figures |
| List of tables |
| Notes |
| Preface |
| First actual content page |
Table: Reference types within <guide>
Add proprietary types if needed, prefixed with other, such as other.intro for an introduction.
The relationship between Manifest, Spine and Guide is simple: Manifest inventories all required files. Spine sets playback order for manifest references, optionally skipping less important files. The optional Guide element assigns semantics. The specification leaves its use to reader vendors. Apple iBooks requires the cover file declared in <guide> for correct library cover display.
That completes OPF’s Package file. We now turn to its second part, NCX.
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