if ( name.indexOf( ReferenceValue.NAMESPACE_DELIMITER ) != -1 ) { throw new NameException( element, name, NameException.DESIGN_EXCEPTION_DOT_FORBIDDEN ); }
	private void checkName( String name ) throws NameException	{		ElementDefn metaData = (ElementDefn) element.getDefn( );		if ( name == null )		{			// Cannot clear the name when there are references. It would leave			// the dependents with no way to identify this element.			if ( element.hasDerived( ) || element.hasReferences( ) )				throw new NameException( element, name,						NameException.DESIGN_EXCEPTION_HAS_REFERENCES );			// Cannot clear the name of an element when the name is required.			if ( metaData.getNameOption( ) == MetaDataConstants.REQUIRED_NAME )				throw new NameException( element, name,						NameException.DESIGN_EXCEPTION_NAME_REQUIRED );		}		else		{			// Cannot set the name of an element when the name is not allowed.			if ( metaData.getNameOption( ) == MetaDataConstants.NO_NAME )				throw new NameException( element, name,						NameException.DESIGN_EXCEPTION_NAME_FORBIDDEN );			// if the element is a pending node and not in any module, or it is			// in a slot that is not managed by namespace, then we need not			// check whether the name is duplicate			if ( !element.isManagedByNameSpace( ) )				return;			int ns = metaData.getNameSpaceID( );			// first found the element with the given name. Since the library			// has it own namespace -- prefix, the range of name check should be			// in the current module.			DesignElement existedElement = getModule( ).getNameSpace( ns )					.getElement( name );			// if the element is null, then the name is OK. Now, the name of the			// element is inserted into the namespace only if the element is in			// a design tree(module) and the slot it exsits is managed by			// namespace			if ( existedElement != null )				throw new NameException( element, name,						NameException.DESIGN_EXCEPTION_DUPLICATE );		}	}