I create XHTML 1.1 pages formatted like the attached "valid.xhtml". They validate correctly at validator.w3.org. When I save them from Kompozer, it saves them as the attached "invalid.xht". These file no longer validate correctly, and, more importantly, Kompozer refuses to open them, saying "This is not an HTML document". This seems wrong.
(I know the XHTML format I'm doing is a little weird, by the way, but it's what EPUB3 requires.)
Here's the other attachment.