anchor.diff:      [$_|replace_invalid_chars(T)];
   replace_invalid_chars([$:|T]) ->
       [$_|replace_invalid_chars(T)];
  +replace_invalid_chars([$.|T]) ->
  +    [$_|replace_invalid_chars(T)];
   replace_invalid_chars([H|T]) ->
       [H|replace_invalid_chars(T)];
   replace_invalid_chars([]) ->
  
positive.code:         #cdata{dec = DecFun, default = Default, required = IsRequired} ->
              {get_fun_return_type(DecFun), Default, IsRequired};
          [#ref{min = Min, max = Max, default = Default}|_] = Refs ->
              Types = lists:map(
                        fun(#ref{name = RefTag}) ->
                                dict:fetch(RefTag, Dict)
                        end, Refs),
              Type = erl_types:t_sup(Types),
              IsRequired = (Min == 1) and (Max == 1),
  
negative.code: 				     erl_syntax:variable("__TopXMLNS"))])
  			end,
  	      ElemVars = lists:map(
  			   fun({Labl, [#ref{max = 1}|_]})
  				 when Labl == Label, IgnoreXMLNS ->
  				   erl_syntax:underscore();
  			      ({Labl, _}) ->
  				   label_to_var(Labl)
  