Experiment: Advancing EPUB with HTML5 Video’s

There are a number of people in the eBook world who really know their ePub format – luckily for us they enjoy sharing this knowledge among the community. One of these such people is Bookworm developer, Liza Daly.

There’s a lot of a misconception around the ePub format with the belief that it is not a very advance format to work with, this is certainly not the case. Being based on several web standards, ePub can do pretty much whatever those standards can do themselves.

In a recent blog post, Liza conducted an experiment to include a HTML5 <video> in an ePub file, which she accomplished by using out-of-island XML mark-up. Okay, so this is something of a hack, and very few ePub readers will render the content (although Bookworm does), but this just goes to show there’s some power in the ePub standard.

All you ePub developers out there might want to keep an eye on Lizas blog as she will be sharing lots of ePub tips throughout this month.

Bookworm will not reject valid ePub – but are you valid?

Liza Daly from threepress.org has just released an article outlining problems she is having with users uploading invalid ePub formatted documents to Bookworm; an online ePub book reader. It’s very important for anyone developing ePub eBooks to produce valid markup. Not only will Bookworm give desirable results when rendering, but you’ll also be covering yourself for any future rendering engines and conversions you might need to do.

It’s actually quite surprising how many errors are showing up from files submitted to Bookworm. You should go over to the threepress blog for a full explanation, but here’s a list of the main errors;

  1. Missing required attributes in the metadata
  2. Metadata that hasn’t been proofread
  3. Improper nesting of the ePub zip file
  4. Items declared in the OPF file that are missing from the archive
  5. Invalid XHTML

Points 1 to 4 are really quite vital, although it is understanable for many documents to have invalid XHTML. Still, if it is within your means, I would try to control this the best you can.

I have plans to write some detailed articles regarding the creation of both the NCX and OPF files found in an ePub document, so keep a lookout for those.

Use the web-based Bookworm reader to read your ePub books

If you are looking for a web-based ePub book reader then look no further than Bookworm. Developed by Liza Daly (see also tei2epub Converter), the Bookworm ePub reader will allow you to read ePub books directly from your web browser, there is also a “mobile web-optimized” version for those of you with an iPhone.

The reader is currently in an open-beta status, so as always, expect some bugs and of course many improvements over the coming weeks and months.

To use the reader you will need to create an account on the Bookworm site, all your books will need to be uploaded there. At the moment there is no way to organise your books so if you upload more than a couple dozen, navigation may be a little cumbersome. Liza is working to improve this.

Unlike most other ePub readers, Bookworm allows for full use of stylesheets and images, which is especially critical for technical books which include HTML tables and code samples.

[Read more…]

TEI Converter for EPUB Developers

We are seeing more and more tools for creating ePub files being developed and the latest to join the throng is the tei2epub converter from threepress.org. This one however is aimed more for developers than the end user, unlike the BookGlutton ePub API.

tei2epub is being developed by Liza Daly and is written in XSLT, although it does utilise a little Python. I know nothing about Python but from what I can make out this is mainly for creating the actual files and final .epub container (which is actually just a renamed .zip file).

This converter really interests me as I already have my own converter (pg2tei) for creating TEI documents from plain text files, as found on Project Gutenberg. I recently started teaching myself XSLT so will follow the development of this for sure!

I don’t have a Python processor installed so haven’t ran any files through this, though I have taken a quick look at the source code and it looks quite straight forward. I believe this uses the official stylesheets written by TEI, so the tei2epub converter should be quite simple to follow, even for those of us whose XSLT skills are not yet well developed.

If you’re interested in both TEI and ePub then this is certainly going to be useful to add to your toolkit.