Leximation | FrameMaker, DITA, EPUB, and more

Sep/12

26

EPUB3 XHTML5 is invalid in oXygen?

oXygen (14) is a great tool for working with and cleaning up EPUB files. You can point it an EPUB file, and the Archive Viewer will show you the contents of that EPUB, letting you edit the files within. You can also validate the EPUB, with each error in the report linked directly to the problem location. Very handy for making those necessary tweaks or updates after creating an EPUB with some other tool.

But I recently ran into a little annoyance while working with EPUB3 files. The content and navigation files in an EPUB3 use XHTML5 as the markup format. When editing these files, oXygen shows them as invalid .. it seems to not be recognizing them as XHTML5.

In XHTML5, the DOCTYPE declaration is optional (yes .. that does bother me, but that’s the way it is). If the DOCTYPE declaration is included, they validate as you’d expect. I was hoping that oXygen would recognize the fact that I’m working on an EPUB3, and know that the files inside would be XHTML5.

I reported this to the oXygen product support and received an quick reply that they’d look into it. A few days later I was told that a fix would be in a future version, but they also provided a workaround .. which I thought I’d share.

Here’s what you’ll see if you open a DOCTYPE-less XHTML5 file in oXygen.

Here’s what to do to make these files validate properly.

1) In oXygen, select Options > Preferences > Document Type Association.

2) Select the XHTML entry in the Document Type association list, then choose Edit.

3) In the Document Type dialog select the Schema “tab” and change Schema Type to “NVDL” and set the Schema URI to “${framework}/xhtml5 (epub3)/epub-xhtml-30.nvdl”

4) Choose OK in the Document Type dialog, and OK in Preferences. Close and reopen your XHTML5 file (not the whole EPUB, just the content file), and it’ll now validate as expected!

Thanks oXygen!

· ·

Comments are closed.

<<

>>

Miscellaneous

Theme Design by devolux.nh2.me