I am using Dreamweaver to make the contents of ePub3 files. The content files in ePub3 are XHTML files. That means, when I put HTML5 Video into them, they need the "controls" attribute specified in order to validate, like this:
<video class="video" controls="controls" poster="image/video_poster.jpg">
Problem is this: When reopening the XHTML file, Dreamweaver keeps removing the ="controls" attribute. Probably because it's not supposed to be needed in HTML5 - but this is an XHTML5 file.
Header looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
I know I fixed this earlier somewhere in DW:s settings... but the problem is back, and I can't find the trick. Please advice!
This is the code for my epub file named myBook.html
<?xml version="1.0" encoding="utf-8"?>
<video class="video" controls="controls" poster="image/video_poster.jpg"></video>
Note the absence of <!DOCTYPE html>?
That certainly takes care of the problem!
Just to clarify: I have been leaving the <!DOCTYPE html> in, because the honourable EPUB3 guru Matt Garrish suggested it might be useful to keep it there to avoid obscure potential problems with validation or rendering in some cases. But if this turns out to be the easiest way to fix my problem, I will certainly remove the HTML5 doctype from my content documents from now on.
Still, I find it a bit odd that unchecking all the boxes in Settings ->Code correcting still allows Dreamweaver to change that code whenever reopening that file. Isn't there a setting somewhere that prevents Dreamweaver from changing any handmade code?
Anyway... many thanks, Ben, for helping out!! :-)