anchor.diff:  		_ ->
            #resource{id = String, _ = '_'}
   	end,
  -   query_resource1(Cont, MatchHead, MatchCategory,
  +   query_resource1(Cont, MatchHead, MatchName,
   			MatchResSpecId, MatchRelName).
   %% @hidden
   query_resource1(Cont, MatchHead, '_', MatchResSpecId, MatchRelName) ->
  
positive.code: 		when is_list(String), ((Op == exact) orelse (Op == like)) ->
  	MatchHead2 = case lists:last(String) of
  		$% when Op == like ->
  			MatchHead1#resource{category = lists:droplast(String) ++ '_'};
  		_ ->
           MatchHead1#resource{category = String}
  	end,
     query_resource2(Cont, MatchHead2, MatchResSpecId, MatchRelName).
  query_resource2(Cont, MatchHead, '_', MatchRelName) ->
  
negative.code: 		Cont1 :: eof | any(),
  		Reason :: term().
  %% @doc Query resources
  query_resource(Cont, '_', MatchName, MatchResSpecId, MatchRelName) ->
  	MatchHead = #resource{_ = '_'},
  	query_resource1(Cont, MatchHead, MatchName,
  			MatchResSpecId, MatchRelName);
  query_resource(Cont, {Op, String}, MatchName, MatchResSpecId, MatchRelName)
  		when is_list(String), ((Op == exact) orelse (Op == like)) ->
  	MatchHead = case lists:last(String) of
  		$% when Op == like ->
  