anchor.diff:      andalso
       bin(Subject) == exml_query:path(Stanza, [{element, <<"subject">>}, cdata]).
   
  --spec has_type(binary(), xmlterm()) -> boolean().
  +-spec has_type(stanza_type() | undefined, xmlterm()) -> boolean().
   has_type(undefined, Stanza) ->
       undefined == exml_query:attr(Stanza, <<"type">>);
   has_type(Type, Stanza) ->
  
positive.code:     exml_query:path(Error, [{element, bin(Condition)},
                              {attr, <<"xmlns">>}]) == ?NS_STANZA_ERRORS.
  
  -spec is_stream_error(binary(), binary(), xmlterm()) -> boolean().
  is_stream_error(Type, Text, Stanza) ->
      Stanza#xmlel.name =:= <<"stream:error">>
      andalso
  
negative.code: count_roster_items(Num, Stanza) ->
      Num == length(get_roster_items(Stanza)).
  
  -spec is_error(stanza_type(), binary(), xmlterm()) -> boolean().
  is_error(Type, Condition, Stanza) ->
      Error = exml_query:subelement(Stanza, <<"error">>),
      has_type(<<"error">>, Stanza)
  