 | Level: Intermediate Liza Daly , software engineer and owner, Threepress Consulting Inc.
25 Nov 2008 Updated 05 Feb 2009 Need to distribute documentation, create an eBook, or just archive your favorite blog posts? EPUB is an open specification for digital books based on familiar technologies like XML, CSS, and XHTML, and EPUB files can be read on portable e-ink devices, mobile phones, and desktop computers. This tutorial explains the EPUB format in detail, demonstrates EPUB validation using Java technology, and moves step-by-step through automating EPUB creation using DocBook and Python.
05 Feb 2009 - As a followup to reader comments, the author revised the content of Listing 3 and refreshed the epub-raw-files.zip file (see Downloads).
In this tutorial
This tutorial guides you through creating eBooks in the EPUB format. EPUB is an
XML-based, developer-friendly format that is emerging as the de facto standard
for digital books. But EPUB isn't just for books: With it, you can: - Bundle documentation for offline reading or easy distribution
- Package blog posts or other Web-native content
- Build, search, and remix using common open source tools
Objectives - Learn what EPUB is, who's behind it, and who's adopting it
- Explore the structure of an EPUB bundle, including its required files and
their schemas
- Create a valid EPUB file from scratch using simple content
- Use open source tools to produce EPUB files from DocBook, a
widely used schema for technical documentation and books
- Automate EPUB conversion using Python and DocBook
Prerequisites
No particular operating system is assumed for this tutorial, although you should
be familiar with the mechanics of creating files and directories. Use of an
XML editor or integrated development environment (IDE) is strongly
recommended. For the later parts of the tutorial on automating EPUB creation, this tutorial
assumes that you know one or more basic XML processing skills—XSLT,
DOM, or SAX-based parsing—and how to
construct an XML document using an XML-native API. No familiarity with the EPUB file format is necessary to complete this tutorial.
System requirements
You will need JavaScript enabled in your browser. To complete the examples in this tutorial, you need a Java interpreter
(version 1.5 or later) and a Python interpreter (version 2.4 or later) as well
as the required XML libraries for each. However, experienced XML
developers should be able to adapt the examples to any programming language
with XML libraries.
Duration
1 hour
Formats html, pdf
|  | |  |