Note (11 November 2015): this sample has been unpublished due to a change in approach by 5DOC for producing content with
code syntax highlighting. Previously, 5DOC used a WordPress plugin and abstracted the relevant code for the 5DOC downloaded version.
Over time it has become obvious that in fact each sample has a different approach to
code syntax highlightingand the goal should be flexibility not consistency. All links below initially to the 5DOC sample, now link to the original content.
Arguments about HTML5 vs XHTML5 are about as clear as a discussion of the difference between General Motors and Opel. Once the “scout” in you indulges in learning, you then discover you have wasted your time. Gut instinct: go with HTML5. Here is one debate.
We have to ask ourselves what is the point? IMHO too much effort is made to make things complicated and less useful–to stay within known parameters. But why do we need e-readers when we have browsers and why do we need XHTML5 when we have JSON?
WordPress.org is busy developing the capability to represent WordPress content with JSON Rest API. And there is already interest in extracting JSON from EPUB. So it is very realistic to project the capability to go from WordPress ⇔ HTML5 and from other forms of data structure ⇒ (WordPress || HTML5).