anchor.diff:  %%
   %%   `{error,_}' is operational error. `{exception,_}' is an error reported by
   %%   the called function.
  -%%
  -%% @spec step_dispatch(xmerlrpc_xml:proc_name(), [xmerlrpc_xml:proc_arg()],
  -%%                     [{Key :: atom(), Value :: term()}],
  -%%                     [{binary(), proc_spec()}]) ->
  -%%     {ok, xmerlrpc_xml:xmlrpc_result()}
  -%%   | {exception, Exception :: iolist()}
  -%%   | {error, Reason}
  +
  +-spec step_dispatch(xmerlrpc_xml:proc_name(), [xmerlrpc_xml:proc_arg()],
  +                    call_environment(), dispatch_table()) ->
  +    {ok, xmerlrpc_xml:xmlrpc_result()}
  +  | {exception, Exception :: iolist()}.
  +% | {error, term()}.
   
   step_dispatch(ProcName, ProcArgs, Environment, DispatchTable) ->
     case proplists:lookup(ProcName, DispatchTable) of
  
positive.code: %% @doc Process HTTP request (`inets' callback).
  %%
  %%   Return `{proceed, ModData#mod.data}' when operation skipped.
  %%
  %% @spec do(#mod{}) ->
  %%     {proceed, list()}
  %%   | {proceed, [{response, {response, Headers, Body}}]}
  %%   | {break, [{response, {response, Headers, Body}}]}
  
  do(ModData = #mod{}) ->
    case find_prefix(ModData#mod.config_db, ModData#mod.request_uri) of
  
negative.code: 
  %%%---------------------------------------------------------------------------
  
  %%----------------------------------------------------------
  %% inets/httpd configuration for mod_xmerlrpc
  
  -type proc_spec() ::
      {module(), Function :: atom()}
    | fun(([xmerlrpc_xml:proc_arg()], call_environment()) -> call_result()).
  
  -type dispatch_table() :: [{ProcName :: binary(), Function :: proc_spec()}].
  %% List of procedures that are exposed, along with what function to call for
  %% specific name.
  
  %%----------------------------------------------------------
  %% call data types
  
  -type call_env_var() ::
      {root_uri, string()}
    | {uri, string()}.
  %% `uri' is the requested URI. `root_uri' is the prefix from `mod_xmerlrpc'
  %% configuration that matched `uri'.
  
  -type call_environment() :: [call_env_var()].
  %% List (proplist) of variables describing HTTP request the call handles.
  
  -type call_result() ::
      {ok, xmerlrpc_xml:proc_arg()}
    | {error, term()}
    | xmerlrpc_xml:proc_arg().
  %% <b>TODO</b>: standarize this.
  
  %%----------------------------------------------------------
  %% response data for inets/httpd
  
  -type http_response() :: {status_code(), [header()], body()}.
  
  -type status_code() :: pos_integer().
  
  -type header() :: {Name :: atom(), Value :: string()}.
  
  -type body() :: iolist().
  
  %%----------------------------------------------------------
  %% inets/httpd request data
  
  -type req_method() :: string().
  
  -type req_header() :: {Name :: string(), Value :: string()}.
  %% `Name' is lower case.
  
  -type req_body() :: string().
  
  -type request_data() :: term().
  %% Whatever came in `ModData#mod.data'.
  
  %%----------------------------------------------------------
  
  %%%---------------------------------------------------------------------------
  
  