} else {*/ result = buf.getChildren(context, NodeSet.DESCENDANT);      LOG.debug( "getChildren found " + result.getLength() + " in " + (System.currentTimeMillis() - start)); return result;
} return buf.getChildren(context, NodeSet.DESCENDANT);
	protected NodeSet getChildren(DocumentSet documents, NodeSet context) {		if (test.getType() == NodeTest.TYPE_TEST)			// test is one out of *, text(), node()			return new VirtualNodeSet(axis, (TypeTest) test, context);		else {			DBBroker broker = null;			try {				broker = pool.get();				if (buf == null)					buf =						(NodeSet) broker.findElementsByTagName(							documents,							test.getName());				long start = System.currentTimeMillis();				ArraySet result;				/*if (context instanceof VirtualNodeSet) {					result = new ArraySet(buf.getLength());					NodeProxy p;					for (Iterator iter = buf.iterator(); iter.hasNext();) {						p = (NodeProxy) iter.next();						if (p.gid == p.doc.getDocumentElementId()							|| context.nodeHasParent(p, true))							result.add(p);					}				} else {*/					result = buf.getChildren(context, NodeSet.DESCENDANT);				//}				// for every node in the list of element-occurrences, check if it has				// a parent in the context node-set:				//                				LOG.debug(					"getChildren found "						+ result.getLength()						+ " in "						+ (System.currentTimeMillis() - start));				return result;			} catch (EXistException e) {				e.printStackTrace();				return null;			} finally {				pool.release(broker);			}		}	}