Add DTD to fix well-formedness errors in HTML5
Now actually tested, using Python's SAX module. You can verify that a
page is well-formed XML (or at least won't break in pywikipediabot) with
a program like this:
import xml.sax
class Myhandler(xml.sax.ContentHandler):
pass
h = Myhandler()
xml.sax.parse("http://localhost/git-trunk/phase3/index.php?title=Special:UserLogin",
h)
If the page is not well-formed, this will throw an exception. It did
with the old doctype, but no longer does if $wgWellFormedXml == true.