Kozea/WeasyPrint — pull request #12 by kennyluck (2012-09-02 02:26:02+00:00)
Title: Use the HTML5 parser from html5lib when it's available

I am not particular happy about the namespace kludge myself, but I'll post this patch here just in case Simon wants to take it. It should also be useful for anyone else who wants to test WeasyPrint's standards-compliance without falling into some HTML parsing trap.

The kludge can be removed whenever one of following applies:

1. lxml supports XPath 2.0's namespace wildcard `*:html` and cssselect outputs it.
2. cssselect outputs XPath of the form `*[localname() = "html"]`

. I am not prepared to go into hacking lxml/cssselect so I'll stop here.