if (_nodes == null) {
_nodes = EMPTY_NODES;
}
} else {
DTMAxisIterator keyValues = _keyValueIterator.reset();
int retrievedKeyValueIdx = 0;
boolean foundNodes = false;
_nodes = null;
// For each node in the node set argument, get the string value
// and look up the nodes returned by key or id for that string
// value. If at most one string value has nodes associated,
// the nodes will be stored in _nodes; otherwise, the nodes
// will be placed in a heap.
for (int keyValueNode = keyValues.next();
keyValueNode != DTMAxisIterator.END;
keyValueNode = keyValues.next()) {
String keyValue = BasisLibrary.stringF(keyValueNode, _dom);
IntegerArray nodes = lookupNodes(rootHandle, keyValue);