DocumentSet docs,
	public Sequence eval(		DocumentSet docs,		Sequence contextSequence,		Item contextItem)		throws XPathException {		// session object is read from global variable $session		Variable var = context.resolveVariable("session");		if(var.getValue() == null)			throw new XPathException("Session not set");		if(var.getValue().getItemType() != Type.JAVA_OBJECT)			throw new XPathException("Variable $session is not bound to an Java object.");		JavaObjectValue session = (JavaObjectValue) var.getValue().itemAt(0);				// get attribute name parameter		String attrib = getArgument(0).eval(docs, contextSequence, contextItem).getStringValue();		Sequence value = getArgument(1).eval(docs, contextSequence, contextItem);		if(session.getObject() instanceof Session)			((Session)session.getObject()).setAttribute(attrib, value);		else if(session.getObject() instanceof HttpSession)			((HttpSession)session.getObject()).setAttribute(attrib, value);		else			throw new XPathException("Type error: variable $session is not bound to a session object");		return Sequence.EMPTY_SEQUENCE;	}