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: has_no_such_item(JID, Stanza) ->
      not has_item(JID, Stanza).
  
  -spec has_identity(binary(), binary(), xmlterm()) -> boolean().
  has_identity(Category, Type, Stanza) ->
      Idents = exml_query:paths(Stanza, [{element, <<"query">>},
                                         {element, <<"identity">>}]),
  
negative.code:     exml_query:path(Error, [{element, bin(Condition)},
                              {attr, <<"xmlns">>}]) == ?NS_STANZA_ERRORS.
  
  -spec is_stream_error(stanza_type(), binary(), xmlterm()) -> boolean().
  is_stream_error(Type, Text, Stanza) ->
      Stanza#xmlel.name =:= <<"stream:error">>
      andalso
  