anchor.diff:               #xqKindTest{kind = element, name = #qname{} = Q1}) ->
      case catch xqldb_doc:node_kind(Doc, Node) of
         element ->
  -         {Ns,_,Ln} = xqldb_doc:node_name(Doc, Node),
  -         Q2 = #qname{namespace = fix_ns(Ns), local_name = Ln},
  -         has_name(Q2, Q1);
  +         has_name(node_qname(Node, Doc), Q1);
         _ ->
            false
      end;
  
positive.code:                      hour   = 0,
                       minute = 0},
     Str = xqerl_datetime:to_string(Rec,'xs:yearMonthDuration'),
     ?xav('xs:yearMonthDuration', Rec#xsDateTime{string_value = Str});
  
  cast_as( ?xav('xs:decimal', #xsDecimal{int = 0, scf = 0}), 'xs:boolean' ) ->
     ?false;
  
negative.code:                          name = #qname{} = Q1}) ->
     case xqldb_doc:node_kind(Doc, Node) of
        attribute ->
           has_name(node_qname(Node, Doc), Q1);
        _ ->
           false
     end;
  