If you want to generate HTML that is also XML, then what you want to generate is XHTML. If this is the case, make sure the method attribute for the <xsl:output> is "xml", and have the appropriate doctype. For example, your stylesheet could begin like this:
<?xml...