XML technologies / ePUB / Open Publication Format / The Manifest element

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

The element <manifest> inventories every publication file: contents, images, optional audio and stylesheets. Everything on board must be declared within <manifest>.

The example shows common manifest entries:

<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="ISBN123456789X">
  <metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
       . . .
  </metadata>
  <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="cover" href="cover.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"/>
     <item id="kap03" href="kap03.htm" media-type="application/xhtml+xml"/>
     <!-- Liste der Grafiken -->
     <item id="coverImgFile" href="img/cover.jpg" media-type="image/jpeg"/>  ⑤
    . . .
  </manifest>
  . . .
</package> 

Code example: Manifest contents

The element <manifest> at ① immediately follows metadata and is required. All children belong to the OPF-namespace, so no xmlns declaration is needed.

References follow: ② points to the NCX file needed for navigation, explained later; ③ the CSS stylesheet; ④ content files, here XHTML files; and ⑤ optional images, here the JPEG cover.

   

 

 

 

back to top