37

Reminder: The TeleBlog offers many viewpoints, and I’m delighted to see Aaron not pulling any punches even if I disagree with him in places. – D.R.

image Recent posts and comments have carefully pointed out that what we call .epub is actually three separate specifications which evolved from the OEBPS, or OEB for short. These three specs are OPS, OPF, and OCF . . . Or is that OCS? What do each of those stand for again?

The Web grew because smart people who were smart enough to understand SGML were also smart enough to know it was too complicated. What we need is a simplified subset of OEB … or OP … Or whatever it’s called — okay, epub.

Let’s face it: there is no grass-roots explosion of .epub adoption. The most hopeful implementation has come from Adobe, and it’s nice that we have a validator now, but we also need legions of independent developers building APIs and authoring tools and Reading Systems and open-sourcing all of them. We need writers, authors and artists who want to use .epub for their work because it’s simple and hackable, as easy as HTML or easier. We need a way for folks to put their own books up on their blog for download as .epub, or for them to post links to their writer friends’ latest novel, or to their favorite passage in a public domain text. The OP-OB-OC-OS-epub spec doesn’t give us this possibility.

I have an idea for yet another brick in the tower of e-babel. It’s a new e-book format, and it’s called BOOK, which stands for BOOK Offered Or Kept. (I love recursive acronyms!). BOOK is not exactly revolutionary, but it’s easy, and there are already dozens of great Reading Systems which support it. No plugins needed, no desktop software, no hardware devices, no subscriptions. Just Web access and a compliant BOOK Reading System.

The structure of a BOOK would look like this:

…BOOK/
……index.html
……images/
………cover.png
……css/
………base.css
………skins/
…………modern.css
…………classic.css
…………nouveau.css
……scripts/
………prototype.js
………base.js
………extensions.js

Many people will recognize this. To read a BOOK, one only has to click, either from their Desktop, from their Bookmarks menu in their Reading System (Safari, Opera, IE, Firefox, others), or from a link placed on a website (Teleread, Delicious, Google, etcetera). The URI to reference a book is just like any other hyperlink. It supports linking to fragments, and if used in the correct browser, it could even link to specific passages. It looks like this:

        http://www.bookserver.dom/BOOK/index.html#chapter1

You can put it on your blog and people can read it in the same window!

The content of index.html may be HTML 4, HTML 5, XHTML or anything recognized by the many Reading Systems already out there. HTML 4 is of course the official recommendation of the spec. The rest of the package is composed of PNG images, CSS2 and Javascript. The CSS2 is extensible, but everything an author needs is already there, with a few default skins to boot. Also, authors are free to use ANY or ALL of the CSS2 properties, with a few exceptions which are dependent on the Reading System itself. Fortunately, there is a wealth of information about how to make BOOKs work across different Reading Systems. Guidelines can be found all over the Internet.

As for the Javascript, it’s based on the ECMAScript standard, which has evolved into a strongly-typed, object-oriented programming language and is one of the few web “standards” which really is a standard. BOOK authors will welcome the addition of a scripting language, as it is NOT currently supported in the IDPF specifications. In fact, it’s forbidden for .epub reading systems to execute scripts. It’s also forbidden for them to display a file called index.html without first loading and parsing several other files.

For those not familiar with the state of Javascript today, it controls much of the page layout and animation you see on the Web these days. For BOOKs, it offers true pagination, typesetting, skinnable and collapsible layouts, footers and headers, footnotes as popups, inline text, true footer notes, or endnotes . . . the list goes on. YUI, JQuery, dojo, MooTools, and Prototype are just a few of the frameworks available, and they’ve been addressing these issues for some time now.

The really great thing is that BOOK developers and authors don’t have to think about the scripting. All they really need to know is basic HTML. With that, they can specify skins, footers, rollovers, highlights, annotations, link to or include external content, embed video and flash, you name it. Add to this that many Reading Systems, especially my favorites, Safari and Firefox, have support for SVG, MathML and the wonderful, revolutionary <canvas> tag.

One more thing, because I can hear people screaming about wanting to read BOOKs offline. What then? How to download a BOOK? The answer again, is Javascript. Gone are the days when it was a toy. We now have several frameworks supporting offline storage. Just download the books you want right in the Reading System. This means you don’t have to worry about saving them to your disk. They don’t clutter your desktop. You don’t need to be online the next time you open it: the books will just be there.

So, as much as I abhor the tower, as many on this blog do, perhaps just one more stone will make it fall?

Moderator: I totally agree with Aaron on the need for independent developers to do .epub tools and content creators to take more interest. The IDPF should take a proactive role. That said, Penguin’s new announcement should help. As for scripts inside books, as is suggested for the BOOK format, well, I’m not a cheerleader, given the security risks. – D.R.

 
37