public Element setNamespace(Namespace namespace) {
		if (namespace == null) {
			namespace = Namespace.NO_NAMESPACE;
		}

		if (additionalNamespaces != null) {
			final String reason = Verifier.checkNamespaceCollision(namespace, 
					getAdditionalNamespaces());
			if (reason != null) {
				throw new IllegalAddException(this, namespace, reason);
			}
		}
		if (hasAttributes()) {
			for (Attribute a : getAttributes()) {
				final String reason = 
						Verifier.checkNamespaceCollision(namespace, a);
				if (reason != null) {
					throw new IllegalAddException(this, namespace, reason);
				}
			}
		}
		
		this.namespace = namespace;
		return this;
	}