add reduce_attributes flag

controls if attributes with empty value will collapse down to a boolean attribute