leftSrc = ((CompositePath) leftSrc).getSourceExpr();
}
while(rightSrc instanceof CompositePath) {
rightSrc = ((CompositePath) rightSrc).getSourceExpr();
}
VarRef pathSrc = null;
XQExpression persistKeyExpr = null, searchKeyExpr = null;
if(leftSrc instanceof VarRef && !(rightSrc instanceof VarRef)) {
pathSrc = (VarRef) leftSrc;
persistKeyExpr = right;
searchKeyExpr = left;
} else if(rightSrc instanceof VarRef && !(leftSrc instanceof VarRef)) {
pathSrc = (VarRef) rightSrc;
persistKeyExpr = left;
searchKeyExpr = right;
}
if(pathSrc != null) {
if(isFirst) {
persistKeyExprs = new ArrayList<XQExpression>(4);
searchKeyExprs = new ArrayList<XQExpression>(4);
}
Variable pv = pathSrc.getValue();
if(pv instanceof BindingVariable) {
if(searchKeyExpr instanceof CompositePath
&& _currentForClause != null) {
assert (_currentBindings != null);
final LetVariable lv = new AnonymousLetVariable(searchKeyExpr);