Error with .XHTML extension on file for epub

When exporting an animation as HTML, then coping the Hype DIV into an XHTML file (to create an epub) I get a ‘SyntaxError (DOM Exception 12)’ when previewing the file in Safari.

It allways appears here:
function la(T, y) {
return T.innerHTML = y
}

If I change my file name from ‘page1.xhtml’ to ’ page1.html’ this error doesn’t appear and the animation works fine.

Anyone know what’s going on? If I leave it as .html it won’t pass validation and probably won’t get into the iBooks Store

Unfortunately Hype animations cannot run within XHTML - some of our DOM manipulations are prohibited and thus the error. Our recommendation is to include an <iframe> in your epub xhtml and reference the Hype .html file from that to show up.

(The other option many folks do is using iBooks Author, as Hype can export widgets for that app that will work).