public NodeSet findDescendantsByTagName(byte type, QName qname, int axis, DocumentSet docs, NodeSet contextSet, int contextId, Expression parent) {
final Lock lock = index.btree.getLock();
final NewArrayNodeSet result = new NewArrayNodeSet(docs.getDocumentCount(), 256);
final FindDescendantsCallback callback = new FindDescendantsCallback(type, axis, contextId, result, parent);
try {
lock.acquire(Lock.READ_LOCK);
for (final NodeProxy ancestor : contextSet) {
final DocumentImpl doc = ancestor.getDocument();
final NodeId ancestorId = ancestor.getNodeId();
callback.setAncestor(doc, ancestor);
byte[] fromKey, toKey;