anchor.diff:  	      IgnoreXMLNS = proplists:get_bool(ignore_xmlns, Opts),
                 XMLNSs = lists:flatten([RefElem#elem.xmlns]),
   	      TopXMLNSs = lists:flatten([TopXMLNS]),
  -	      HasCommonXMLNSs = not sets:is_disjoint(
  -				      sets:from_list(XMLNSs),
  -				      sets:from_list(TopXMLNSs)),
  +	      CommonXMLNSs = sets:to_list(
  +			       sets:intersection(
  +				 sets:from_list(XMLNSs),
  +				 sets:from_list(TopXMLNSs))),
  +	      HasCommonXMLNSs = CommonXMLNSs /= [],
                 XMLNSMatch = erl_syntax:match_expr(
                                erl_syntax:variable("_xmlns"),
                                make_function_call(
                                  get_attr,
                                  [abstract(<<"xmlns">>),
                                   erl_syntax:variable("_attrs")])),
  -              IfGuard = case HasCommonXMLNSs of
  -			    false ->
  -                                erl_syntax:disjunction(
  -				  [erl_syntax:infix_expr(
  -				     erl_syntax:variable("_xmlns"),
  -				     erl_syntax:operator("=="),
  -				     abstract(NS)) || NS <- XMLNSs]);
  -			    true ->
  -				erl_syntax:disjunction(
  -				  [erl_syntax:infix_expr(
  -				     erl_syntax:variable("_xmlns"),
  -				     erl_syntax:operator("=="),
  -				     abstract(<<"">>)),
  -				   erl_syntax:infix_expr(
  -				     erl_syntax:variable("_xmlns"),
  -				     erl_syntax:operator("=="),
  -				     erl_syntax:variable("__TopXMLNS"))])
  -			end,
  +	      XMLNSComparison = [erl_syntax:infix_expr(
  +				   erl_syntax:variable("_xmlns"),
  +				   erl_syntax:operator("=="),
  +				   abstract(NS)) || NS <- XMLNSs],
  +	      TopXMLNSComparison = [erl_syntax:infix_expr(
  +				      erl_syntax:variable("__TopXMLNS"),
  +				      erl_syntax:operator("=="),
  +				      abstract(NS)) || NS <- CommonXMLNSs],
   	      ElemVars = lists:map(
   			   fun({Labl, [#ref{max = 1}|_]})
   				 when Labl == Label, IgnoreXMLNS ->
  
positive.code:                             ++ SubElVars ++ XmlElVars])];
                      false ->
                          [XMLNSMatch,
                           erl_syntax:if_expr(
  			   case HasCommonXMLNSs of
  			       true ->
  				   [erl_syntax:clause(
  				      [], IfGuard,
  				      [make_function_call(
  					 FunName,
  					 [erl_syntax:variable("__TopXMLNS"),
  
negative.code: -module(fxml_gen).
  
  -compile(debug_info).
  
  %% Generator API
  -export([compile/1, compile/2]).
  %% Runtime API
  