In our system I cannot affect javax.xml.transform.TransformerFactory property, it is per default set to org.apache.xalan.processor.TransformerFactoryImpl (Xalan v2.7.2).
When I generate XMP metadata DublinCoreSchema with title, I will get following piece of XML:
Problem is, that before lang attribute is xml: attribute prefix missing, and then is XML invalid as per specification. With org.apache.xalan.xsltc.trax.TransformerFactoryImpl is everything OK.
Solution to the problem will be providing DocumentBuilderFactory and TransformerFactory from outside via constructor.