factory.newTransformer().transform(source, result);
contextNode = (Node)result.getCurrentDocument();
}
DocumentInfo doc = ((NodeInfo)contextNode).getDocumentRoot();
NamePool pool = doc.getNamePool();
if (pool == null)
{
pool = NamePool.getDefaultNamePool();
doc.setNamePool(pool);
}