anchor.diff:                                  [];
                              (_) ->
                                   [erl_syntax:list([])]
  -                        end, [CData|group_refs(Refs)] ++ SubElVars)]))]
  +                        end, [CData|group_refs(Refs)] ++ SubElVars ++ XmlElVars)]))]
           end,
       [make_function(
          FunName,
  
positive.code:                       false ->
                            []
                    end,
      NilClause = erl_syntax:clause(
                    [erl_syntax:list([])|
                     CDataVars ++
                         lists:map(
                           fun({L, _}) ->
                                   label_to_var(L)
                           end, group_refs(Refs)) ++ SubElVars],
                    none,
                    [tuple_or_single_var(
                       CDataCall ++ ResultElems ++ SubElResult)]),
      SubElClause =
          case have_label(Result, '$_els') of
              true ->
                  SubElPattern = [erl_syntax:list(
                                    [erl_syntax:match_expr(
                                       erl_syntax:tuple(
                                         [erl_syntax:atom("xmlel"),
                                          erl_syntax:underscore(),
                                          erl_syntax:underscore(),
                                          erl_syntax:underscore()]),
                                       erl_syntax:variable("_el"))],
                                    _ElsVar)
                                  |CDataVars ++ ElemVars ++ SubElVars],
                  SubElBody = make_function_call(
                                FunName,
                                [_ElsVar|CDataVars ++ ElemVars] ++
                                    [erl_syntax:list(
                                       [make_function_call(
                                          "decode",
                                          [erl_syntax:variable("_el")])],
                                       label_to_var('$_els'))]),
                  [erl_syntax:clause(SubElPattern, none, [SubElBody])];
              false ->
                  []
          end,
      PassClause = if SubElVars == []; CDataVars == [] ->
                           [erl_syntax:clause(
                              [erl_syntax:list(
                                 [erl_syntax:underscore()],
                                 _ElsVar)|CDataVars ++ ElemVars ++ SubElVars],
                              none,
                              [make_function_call(
                                 FunName,
                                 [_ElsVar|CDataVars ++ ElemVars ++ SubElVars])])];
                      true ->
                           []
                   end,
  
negative.code:        "% Source: " ++ FileName]).
  
  make_top_decoders(TaggedSpecs, ModName) ->
      C1 = lists:map(
             fun({Tag, #elem{xmlns = XMLNS, name = Name}}) ->
                     erl_syntax:clause(
                       [erl_syntax:tuple(
                          [abstract(Name),
                           abstract(XMLNS)])],
                       none,
                       [make_function_call(
                          make_dec_fun_name([Tag]),
                          [erl_syntax:variable("_el")])])
             end, TaggedSpecs),
      C2 = lists:map(
             fun({_Tag, #elem{xmlns = XMLNS, name = Name}}) ->
                     erl_syntax:clause(
                       [erl_syntax:tuple(
                          [abstract(Name),
                           abstract(XMLNS)])],
                       none,
                       [erl_syntax:atom("true")])
             end, TaggedSpecs),
      NilClause = erl_syntax:clause(
                    [erl_syntax:tuple(
                       [erl_syntax:variable("_name"),
  