result.addAll(ref.evalFunction(Sequence.EMPTY_SEQUENCE, null, params));
data.clear();
}
// no index specified: use the range index
} else {
final Indexable indexable = (Indexable) args[1].itemAt(0);
ValueOccurrences occur[] = null;
// First check for indexes defined on qname
final QName[] allQNames = getDefinedIndexes(context.getBroker(), docs);
if (allQNames.length > 0)
{occur = context.getBroker().getValueIndex().scanIndexKeys(docs, nodes, allQNames, indexable);}