This is a comment, but I do not have enough karma points to put it in the correct place. Sigh.
I appreciate this is probably the correct, standards driven way to accomplish what I want (I've upvoted it as such). But the former isn't supported (my processor falls over) and the latter still results in "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" in my doctype. As @Jirka Kosek suggested, I think my XSLT processor might be broken.
No, your XSLT processor is not broken, it's just that XDV adds:
<xsl:output method="xml" indent="no" omit-xml-declaration="yes" media-type="text/html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
by default, so when you add a second <xsl:output doctype-system="about:legacy-compat"/>
the previous doctype-public
is not overwritten.
Note that XHTML 1.0 strict is listed as an obsolete permitted doctype string, so it is perfectly acceptable to use this doctype and still call it HTML5.
<!DOCTYPE html>
, legacy<!DOCTYPE HTML SYSTEM "about:legacy-compat">
and obsoleted ("should not") HTML 4, HTML 4.01, XHTML 1.0 and XHTML 1.1 (all strict DTD when there is SYSTEM). – Autolysis