if(var == null) throw new XPathException("No request object found in the current XQuery context.");
	public Sequence eval(		Sequence args[],		Sequence contextSequence)		throws XPathException {				RequestModule myModule = (RequestModule)context.getModule(RequestModule.NAMESPACE_URI);					// request object is read from global variable $request		Variable var = myModule.resolveVariable(RequestModule.RESPONSE_VAR);		if(var.getValue().getItemType() != Type.JAVA_OBJECT)			throw new XPathException("Variable $response is not bound to an Java object.");				// get parameters		String url = args[0].getStringValue();				JavaObjectValue value = (JavaObjectValue)			var.getValue().itemAt(0);		if(value.getObject() instanceof ResponseWrapper)			return new AnyURIValue(((ResponseWrapper)value.getObject()).encodeURL(url));		else			throw new XPathException("Variable $response is not bound to a Response object.");	}