anchor.diff:  
   -define(TRANSFORM_RE, "^(?:{([^}]+)})?([a-z]+)\\\.([a-z]+)=(.+)$").
   -define(DEFAULT_NS, <<"http://schemas.android.com/apk/res/android">>).
  +
  +-record(transform, {ns=?DEFAULT_NS, tag, attr, value}).
   
   apply_transformation(Transformation, Model) ->
   	walk_model(compile_transformation(Transformation), Model).
  
positive.code: compile_transformation(Transformation) ->
  	case re:run(Transformation, ?TRANSFORM_RE,
  			[anchored, {capture, all_but_first, binary}, caseless]) of
  		{match, [<<>>, Element, Attribute, Value]} ->
  			{?DEFAULT_NS, Element, Attribute, compile_value(Value)};
  		{match, [Namespace, Element, Attribute, Value]} ->
  			{Namespace, Element, Attribute, compile_value(Value)};
  		nomatch -> throw({invalid_transformation, Transformation})
  	end.
  
  
negative.code: 
  transform_chunk(Transform, {string_pool, StringPool}) ->
  	{string_pool, extend_stringpool(StringPool, Transform)};
  transform_chunk(#transform{tag=Name}=T, {element, _, _, _, Name, OldAttr}=E) ->
  	setelement(6, E, transform_attributes(T, OldAttr));
  transform_chunk(_, Chunk) -> Chunk.
  
  transform_attributes(T, A) -> transform_attributes(T, A, []).
  transform_attributes(#transform{ns=Ns, attr=Attr, value=Value}, [], Acc) ->
  	lists:reverse(Acc, [{Ns, Attr, Value}]);
  transform_attributes(#transform{ns=Ns, tag=Name, value=NewValue},
  		[{Ns, Name, _}=A | Attributes], Acc) ->
  	lists:reverse(Attributes, [setelement(3, A, NewValue) | Acc]);
  transform_attributes(T, [Attribute | Attributes], Acc) ->
  	transform_attributes(T, Attributes, [Attribute | Acc]).
  