persistKeys[0] = fpv;
} else {
if(counter == 0) {
_keyTypes.set(0, StringType.STRING);
}
persistKeys[0] = new XString(fpv.stringValue());
}
joinTable.put(persistKeys, it);
}
pkvItor.closeQuietly();
} else {// TODO FIXME multiple join keys
for(int i = 0; i < keysize; i++) {
final XQExpression key = _pkeyExprs.get(i);
final Sequence<? extends Item> pkv = key.eval(it, dynEnv);
final Iterator<? extends Item> pkvItor = pkv.iterator();
if(!pkvItor.hasNext()) {
continue outer;
}
final Item fpv = pkvItor.next();
if(pkvItor.hasNext()) {
persistKeys[i] = new SingleCollection(pkv, dynEnv);
} else if(_isNodeComp || fpv instanceof AtomicValue) {
persistKeys[i] = fpv;
} else {
if(counter == 0) {
_keyTypes.set(i, StringType.STRING);
}
persistKeys[i] = new XString(fpv.stringValue());
}
}
joinTable.put(persistKeys, it);
}
counter++;