anchor.diff:  %%%===================================================================
   %%% API
   %%%===================================================================
  -parse_action(_Headers, #state{}=_State) ->
  -    {ok, occi_action:new()}.
  +parse_action(Headers, #state{}=State) ->
  +    case parse_category(Headers, State) of
  +	{ok, #state{action=Action}} ->
  +	    {ok, Action};
  +	{error, Err} ->
  +	    {error, Err}
  +    end.
   
   parse_entity(Headers, #state{}=State) ->
       case parse_category(Headers, State) of
  
positive.code: 	    {error, Err}
      end.
  
  add_attr(_, _, _, _, #state{entity=undefined}) ->
      {error, {parse_error, attribute}};
  add_attr(Key, Value, Attrs, H, #state{entity=E}=S) ->
  
negative.code:     end;
  parse_c_kv(_, _, _V, _, #state{mixin=#occi_mixin{}}) ->
      {error, invalid_mixin};
  parse_c_kv(Bin, Term, [], H, #state{action=#occi_action{}}=S) ->
      case parse_kv(Bin) of
  	{ok, Dict} ->
  	    make_action(dict:store(term, {atom, Term}, Dict), H, S);
  	{error, Err} ->
  	    {error, Err}
      end;
  parse_c_kv(_, _, _V, _, #state{action=#occi_action{}}) ->
      {error, invalid_action};
  parse_c_kv(Bin, Term, V, H, S) ->
      case parse_kv(Bin) of
  	{ok, Dict} ->
  	    add_category(dict:store(term, {atom, Term}, Dict), V, H, S);
  	{error, Err} ->
  	    {error, Err}
      end.
  
  make_action(Dict, H, S) ->
      case dict:find(<<"class">>, Dict) of
  	{ok, {string, <<"action">>}} ->
  	    case make_cid(Dict, action) of
  		#occi_cid{}=Cid ->
  		    case occi_category_mgr:get(Cid) of
  			#occi_action{}=A ->
  			    parse_attributes(H, S#state{action=A});
  			_ ->
  			    {error, invalid_category}
  		    end;
  		{error, Err} ->
  		    {error, Err}
  	    end;
  	{ok, Val} -> 
  	    {error, {einval, Val}};
  	error ->
  	    {error, missing_class}
      end.
  
  make_mixin(Dict, _, #state{mixin=#occi_mixin{id=#occi_cid{class=Cls}}=Mixin}=S) ->
  