Added capacity for using a function to determine the new value of an attribute or child