Sequence s = arg.eval(context, docs, contextSequence, contextItem); if(s.getLength() == 0) throw new XPathException("argument to document-uri() returned empty sequence"); Item item = s.itemAt(0); if(!Type.isNode(item.getType())) throw new XPathException("argument to document-uri() is not a node"); NodeProxy node = (NodeProxy)item; return new StringValue(node.doc.getFileName());
Sequence s = arg.eval(docs, contextSequence, contextItem); NodeProxy node = (NodeProxy) s.itemAt(0); return new StringValue(node.doc.getFileName());
	public Sequence eval(		StaticContext context,		DocumentSet docs,		Sequence contextSequence,		Item contextItem)		throws XPathException {		Expression arg = getArgument(0);		Sequence s = arg.eval(context, docs, contextSequence, contextItem);		if(s.getLength() == 0)			throw new XPathException("argument to document-uri() returned empty sequence");		Item item = s.itemAt(0);		if(!Type.isNode(item.getType()))			throw new XPathException("argument to document-uri() is not a node");		NodeProxy node = (NodeProxy)item;		return new StringValue(node.doc.getFileName()); 	}