Monday, May 13, 2013

What’s New in EPUB 3 – Part 2

Navigation

This is one of the biggest changes in EPUB 3. What used to be a .ncx file in EPUB 2 is now gone and was replaced by an XHTML document that uses the nav element. The XHTML document also has restrictions in the use of certain HTML tags and uses mostly the ol and li tags. This new feature will require a fallback in case an ereader doesn’t support the new navigation system.

Linking

Basically, linking is as simple as using an a tag in EPUB 2 and this can still be used in EPUB 3. But the IDPF has established a new registry of linking schemes and one in particular (and the only available as of this writing) seems to be complex to implement. They call it, EPUBCFI or the EPUB Canonical Fragment Identifier. The EPUBCFI closely resembles a Regular Expression pattern.

Scripting and Interactivity

Another interesting, albeit optional, development in EPUB 3 is scripting. In EPUB 2 scripting wasn't allowed. JavaScript is the choice for EPUB 3 and EPUB 3 files will need a query method using epubReadingSystem JavaScript object to determine if an ereading device supports scripting.

Styling and Layout

EPUB 3 uses CSS2.1 with added CSS3 features. EPUB 2 used CSS2. The major change is the required embedding of fonts which uses either an OpenType font or a WOFF (Web Open Font Format). The @font-face is used in the CSS for embedding fonts in EPUB. Font-embed also needs a fallback font in case the ereader doesn’t support font-embedding.

Rich Media

EPUB 3 now boasts audio and video. But wait, weren't we able to play audio and video in EPUB 2? Well, actually that depended on the ereader and Apple was ahead of the game by supporting the audio and video tags which are HTML5 tags. The others, like Barnes and Nobles's Nook, only recently implemented them.

The EPUB 3 Specification on audio and video requires devices to support MP3 and MP4 format audio. Codecs H.264 and VP8 are required for video. Rich media needs a fallback mechanism.

Metadata

According to the EPUB 2 Specification, the required metadata for an EPUB file are dc:title, dc:identifier, and dc:language. The rests are optional. EPUB 3 metadata specification is much the same, with an added meta property dcterms:modified which defines when the EPUB file was changed.

Speech

The Text-to-Speech feature was not in EPUB 2, though iBooks seem to have supported it using VoiceOver. With EPUB 3 there is now Pronunciation Lexicons, SSML, and CSS3 Speech Module.

Manifest Fallbacks

When an ereader can't support HTML5 tags such as audio, video, object, and canvass, an EPUB 3 file will need a fallback mechanism to help the reader identify what a certain misrepresented eBook element is all about. Though setting up a fallback mechanism seem tedious, it is required, especially since EPUB 3 is still a young technology and not all ereaders will be able to support most of the features yet.

Containment

There's an issue here as to what the IDPF meant when they said, “There are new restrictions on references to remote resources”. I'll see if I can dig something out of it. The visible change in this part is the extended list of disallowed characters in the OCF file name.

XML and Unicode

IDPF said in EPUB 3, all XML documents must be conformant to XML 1.0. EPUB 2, with the XML declaration <?xml version="1.0" encoding="UTF-8"?">, is XML 1.0 as far as I know. But the <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> declaration is now replaced by <!DOCTYPE html>. I'll also dig into that a little sooner.

These are all the new and changed functionalities in EPUB 3. I'll tackle them in depth in more coming posts and perhaps make a table form.

3 comments:

  1. I truly like to read your post. Thank you so much for taking the time to share such nice information. I'll definitely add this great post in my article section.

    Epub Outsourcing Services in India

    ReplyDelete