generate xhtml at the end