code: public Element put(String name, Element value) {
  
  		assert (name != null);
  
  		Element oldValue = null;
  
  		if (value != null) {
  
  			// Set the value and ensure that the replacement can be done.
  			oldValue = map.put(name, value);
  			if (oldValue != null) {
  				oldValue.checkValidReplacement(value);
  			}
  
  		} else {
  
  			// Remove the referenced variable.
  			oldValue = map.remove(name);
  		}
  
  		return oldValue;
  	}
docs: Assign the value to the given variable name. If the value is null, then
  the variable is undefined. If an old value existed, then this method will
  check that the new value is a valid replacement for the old one. If not,
  an exception will be thrown.
  
  @param name
  variable name to assign value to
  @param value
  Element to assign to the given variable name; variable is
  removed if the value is null
  
  @return old value of the named variable or null if it wasn't defined