public JDOMNamespaceContext(final Namespace[] namespaces){
    	if (namespaces == null) {
    		throw new IllegalArgumentException("Cannot process a null Namespace list");
    	}
        this.namespacearray = ArrayCopy.copyOf(namespaces, namespaces.length);
        for (int i = 1; i < namespacearray.length; i++) {
    		final Namespace n = namespacearray[i];
    		if (n == null) {
    			throw new IllegalArgumentException("Cannot process null namespace at position " + i);
    		}
    		final String p = n.getPrefix();
        	for (int j = 0; j < i; j++) {
        		if (p.equals(namespacearray[j].getPrefix())) {
        			throw new IllegalArgumentException("Cannot process multiple namespaces with the prefix '" + p + "'.");
        		}
        	}
        }
    }