Implements #7667 : allow XHTML namespaces customization. Patch by Evan Miller