The doctype in the generated pages is wrong. In

<!DOCTYPE html PUBLIC XHTML 1.0

you have to add a second / between W3C and DTD.