if (!(contextNode instanceof NodeInfo))
{
getLogger().debug("Input tree is not SAXON TinyTree, converting");
DOMSource source = new DOMSource(contextNode);
TinyBuilder result = new TinyBuilder();
factory.newTransformer().transform(source, result);
contextNode = (Node)result.getCurrentDocument();
}
DocumentInfo doc = ((NodeInfo)contextNode).getDocumentRoot();
NamePool pool = doc.getNamePool();
if (pool == null)