for(Iterator i = context.getModules(); i.hasNext(); ) { Module module = (Module)i.next(); FunctionSignature signatures[] = module.listFunctions();  for(int j = 0; j < signatures.length; j++) { QName qname = signatures[j].getName(); set.add(qname);
if(getSignature().getArgumentCount() == 1) { String uri = args[0].getStringValue(); Module module = context.getModule(uri); if(module == null) throw new XPathException(getASTNode(), "No module found matching namespace URI: " + uri); addFunctionsFromModule(resultSeq, module); } else { for(Iterator i = context.getModules(); i.hasNext(); ) { Module module = (Module)i.next(); addFunctionsFromModule(resultSeq, module);
	public Sequence eval(		Sequence contextSequence,		Item contextItem)		throws XPathException {		Set set = new TreeSet();		ValueSequence resultSeq = new ValueSequence();		for(Iterator i = context.getModules(); i.hasNext(); ) {			Module module = (Module)i.next();			FunctionSignature signatures[] = module.listFunctions();			// add to set to remove duplicate QName's			for(int j = 0; j < signatures.length; j++) {				QName qname = signatures[j].getName();				set.add(qname);			}			for(Iterator it = set.iterator(); it.hasNext(); ) {				QName qname = (QName)it.next();				resultSeq.add(new QNameValue(context, qname));			}			set.clear();		}		return resultSeq;	}