if (buf == null) buf = (NodeSet) broker.findElementsByTagName(documents, test.getName());
if (buf == null) { QName qname = QName.parse(test.getName()); if (qname.getPrefix() != null) { String namespaceURI = context.getURIForPrefix(qname.getPrefix()); if (namespaceURI == null) throw new IllegalArgumentException( "no namespace defined for prefix " + qname.getPrefix()); LOG.debug( "using namespace \"" + namespaceURI + "\" for prefix " + qname.getPrefix()); qname.setNamespaceURI(namespaceURI); } buf = (NodeSet) broker.findElementsByTagName(documents, qname); }
	protected NodeSet getDescendants(DocumentSet documents, NodeSet context) {		if (test.getType() == NodeTest.NAME_TEST) {			DBBroker broker = null;			try {				broker = pool.get();				if (buf == null)					buf = (NodeSet) broker.findElementsByTagName(documents, test.getName());				return buf.getDescendants(					context,					ArraySet.DESCENDANT,					axis == Constants.DESCENDANT_SELF_AXIS, inPredicate);			} catch (EXistException e) {				e.printStackTrace();				return null;			} finally {				pool.release(broker);			}		} else {			VirtualNodeSet vset = new VirtualNodeSet(axis, (TypeTest) test, context);			vset.setInPredicate(inPredicate);			return vset;		}	}