fieldRefData.variable = resolveVariable(fieldRefData.scopeStack,reference.getSimpleName());
if (fieldRefData.variable != null){
XpathVariableRefExpression xpathVarRef = xpathFactory.createVariableReference();
xpathVarRef.setVariableName(fieldRefData.variable.getName());
xpathVarRef.setType(fieldRefData.xsdTypeQName);
XpathTypeMapping xpathTypeMap = xpathFactory.createTypeMapping();
XpathExprType varXpathType = xpathTypeMap.getXpathExprType(reference.getType().getQualifiedName());
xpathVarRef.setXpathType(varXpathType);
fieldRefData.xpathExpr = xpathVarRef;
}
fieldRefData.partnerLink = fieldPartnerLinkMap.get(reference.getDeclaration());
if (fieldRefData.partnerLink != null){