anchor.diff:                             second = xqerl_numeric:decimal(0), 
                              offset = Offset},
            Str = xqerl_datetime:to_string(Rec,'xs:gMonth'),
  -         ?xav('xs:gMonth', Rec#xsDateTime{string_value = Str});
  +         ?xav('xs:gMonth', set_date_string(Rec, Str));
            true ->
               throw({error,bad_date})
         end
  
positive.code:                          type = #xqSeqType{type = Type}}) ->
     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},
           case has_name(Q2, Q1) of
              true ->
                 EType = xqldb_doc:type_name(Doc, Node),
  
negative.code:          ?err('FORG0001')
     end;
  cast_as( #xqAtomicValue{} = Arg1,'xs:ID' ) ->
     StrVal = ncname_value(Arg1),
     ?xav('xs:ID', StrVal);
  cast_as( #xqAtomicValue{} = Arg1,'xs:IDREF' ) ->
     StrVal = ncname_value(Arg1),
     ?xav('xs:IDREF', StrVal);
  cast_as( #xqAtomicValue{} = Arg1,'xs:IDREFS' ) ->
     case xqerl_types:value(xqerl_types:cast_as( Arg1, 'xs:token' )) of
  