anchor.diff:          Occ1 == one_or_many, Occ2 == one ->
      {nil,?L};
   ensure_type(Ctx,Var,Type,AType) ->
  +   _ = add_used_record_type(xqAtomicValue),
      ?dbg("ensure_type         ",{Var,Type,AType}),
      T = expr_do(Ctx,Type),
      ?P("_ = case xqerl_types:instance_of(_@Var,_@T) of "
  
positive.code: xpath_function('self', #xqKindTest{kind = 'processing-instruction'}) -> {name,self_processing_instruction};
  xpath_function('self', #xqKindTest{kind = 'text'}) -> {none,self_text};
  xpath_function(_, _) -> {error, empty_axis}.
  
negative.code:                    body = _}, Map) ->
     _ = init_mod_scan(),
     ok = set_globals(Prolog, Map),
     _ = add_used_record_type(xqAtomicValue),
     DefElNs     = xqerl_static:pro_def_elem_ns(Prolog),
     %ContextItem = xqerl_static:pro_context_item(Prolog,main),
     Namespaces  = xqerl_static:pro_namespaces(Prolog,[],DefElNs),
  