HTML is not well-formed XML, so it can't be input directly to XSLT. However, you can convert it to well-formed XML using the JTidy utility, and then process the result with XSLT.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference