private DocumentSet getCollectionContext(Sequence arg) throws XPathException { DocumentSet newDocs = new DocumentSet(); for(SequenceIterator i = arg.iterate(); i.hasNext(); ) {
private String[] getCollectionContext(Sequence arg) throws XPathException { String collections[] = new String[arg.getLength()]; int j = 0; for(SequenceIterator i = arg.iterate(); i.hasNext(); j++) {
    private DocumentSet getCollectionContext(Sequence arg) throws XPathException {    	DocumentSet newDocs = new DocumentSet();        for(SequenceIterator i = arg.iterate(); i.hasNext(); ) {        	String collection = i.nextItem().getStringValue();        	try {				context.getBroker().getDocumentsByCollection(collection, newDocs);			} catch (PermissionDeniedException e) {				LOG.debug("Permission denied to read collection contents for collection " + collection);			}        }        return newDocs;    }