if(namespace == null) {
return doc;
}
FactoryBase factory = (FactoryBase)((TypeHelperImpl)HelperProvider.INSTANCE.typeHelper()).getExtendedMetaData().getPackage(namespace);
if(factory == null) {
return doc;
}
String prefix = factory.getNsPrefix();
Document cloneDoc = (Document)doc.cloneNode(false);
SaxonDataBindingHelper.setNamespacesAndPrefixesReq(doc, cloneDoc, cloneDoc, namespace, prefix);