ec = (EvalContext) value;
if (ec.hasNext()) {
value = ((NodePointer) ec.next()).getValue();
}
else { // empty context -> empty results
return new NodeSetContext(context, new BasicNodeSet());
}
}
JXPathContext jxpathContext = context.getJXPathContext();
NodeSet nodeSet = jxpathContext.getNodeSetByKey(key, value);
if (ec != null && ec.hasNext()) {
BasicNodeSet accum = new BasicNodeSet();
accum.add(nodeSet);
while (ec.hasNext()) {
value = ((NodePointer) ec.next()).getValue();
accum.add(jxpathContext.getNodeSetByKey(key, value));
}
nodeSet = accum;
}
return new NodeSetContext(context, nodeSet);
}