Add support for :xhtml and :html5 doctypes, including XML

* introduce config namespace for controlling format