Cherry pick d802f0f17a466e6a55d361fe2113abf9400efb43 Fix RDF export to produce valid RDF/XML.