throws XQueryException {
QualifiedName varname = ref.getName();
Variable var = ref.getValue();
Sequence result = var.getResult();
if(result == null) {
result = var.eval(contextSeq, dynEnv);
}
ReturnType rettype = request.getReturnType();
final ShippedVariable shiped;
if(ENV_NOWRAP_VARSHIP || !rettype.isRemoteSequnece()) {
shiped = new ShippedVariable(varname, new MarshalledSequence(result, dynEnv));