Merge XHTML document metadata attributes when applying template.
Some (X)HTML source documents may have a lang and/or xml:lang attribute outside the main content, e.g. on the <html> element. When applying content to a template, these attributes are lost. It might be a good idea to merge in these attributes when applying a template. (No need to worry too much about whether they are the XML or the HTML form; this will be reconciled when serializing via JAVA-184.)