Now support XHTML 1.1, HTML 4.01, HTML 5 doctypes and sets encoding and languages when feasible.