docs = new DocumentSet();
DocumentSet docs = new DocumentSet();
	public Sequence eval(		DocumentSet docs,		Sequence contextSequence,		Item contextItem)		throws XPathException {		docs = new DocumentSet();		getParent().resetState();		if (getArgumentCount() == 0)			context.getBroker().getAllDocuments(docs);		else {			for(int i = 0; i < getArgumentCount(); i++) {				Sequence seq = getArgument(i).eval(docs, contextSequence, contextItem);				for(SequenceIterator j = seq.iterate(); j.hasNext(); ) {					String next = j.nextItem().getStringValue();					if(next.length() == 0)						throw new XPathException("Invalid argument to fn:doc function: empty string is not allowed here.");					if(next.charAt(0) != '/')						next = context.getBaseURI() + '/' + next;					try {						DocumentImpl doc = (DocumentImpl) context.getBroker().getDocument(next);						docs.add(doc);					} catch (PermissionDeniedException e) {						throw new XPathException("Permission denied: unable to load document " + next);					}				}			}		}		NodeSet result = new ExtArrayNodeSet(1);		for (Iterator i = docs.iterator(); i.hasNext();) {			result.add(new NodeProxy((DocumentImpl) i.next(), -1));		}		return result;	}