anchor.diff:                                            "" ->
                                                 "/";
                                             _ ->
  -                                              "/" ++ join(PreSegments,"/") ++ "/"
  +                                              "/" ++
  +                                                  yaws:join_sep(PreSegments,"/")
  +                                                  ++ "/"
                                         end;
                           _ ->
                               %%'floating' appmod mount.
  
positive.code:     io_lib:format("<pre> ~n~p~n </pre>~n", [R]).
  
  
  %%concatenate a list of strings using another string as a separator.
  %%e.g join(["usr","local","etc"],"/")   =  "usr/local/etc"
  %%
  join(List, Sep) ->
      lists:foldl(fun(A, "") -> A; (A, Acc) -> Acc ++ Sep ++ A
                  end, "", List).
  
  
  %%mappath/3    (virtual-path to physical-path)
  %%- this returns physical path a URI would map to, taking into consideration 
  %% vdirs and assuming each path segment of the URI represents a folder 
  
negative.code:                                           "" ->
                                                "/";
                                            _ ->
                                                "/" ++
                                                    yaws:join_sep(PreSegments,"/")
                                                    ++ "/"
                                        end
                      end,
                      PathI = case PostSegments of
                                  [] ->
                                      "";
                                  _ ->
                                      "/" ++ yaws:join_sep(PostSegments,"/")
                              end,
                      %%absence of RevFile tells us there was a trailing slash.
                      PathInf = case RevFile of
  