public Sequence eval(DocumentSet docs, Sequence contextSequence, Item contextItem)
public Sequence eval(Sequence contextSequence, Item contextItem)
	public Sequence eval(DocumentSet docs, Sequence contextSequence, Item contextItem)		throws XPathException {		docs = new DocumentSet();		getParent().resetState();		Sequence arg =			getArgument(0).eval(docs, contextSequence, contextItem);		if(arg.getLength() == 0)			return Sequence.EMPTY_SEQUENCE;		String path = arg.itemAt(0).getStringValue();		if (path.length() == 0)			throw new XPathException("Invalid argument to fn:doc function: empty string is not allowed here.");		if (path.charAt(0) != '/')			path = context.getBaseURI() + '/' + path;		try {			DocumentImpl doc = (DocumentImpl) context.getBroker().getDocument(path);			if(doc == null)				return Sequence.EMPTY_SEQUENCE;			return new NodeProxy(doc, -1);		} catch (PermissionDeniedException e) {			throw new XPathException(				"Permission denied: unable to load document " + path);		}	}