anchor.diff:        _ ->
            %StrVal = string_value(Result),
            {false, {assert_error,Result,ErrorCode}}
  +   end.
  +
  +assert_serialization_error(Result, ErrorCode) when is_list(ErrorCode) ->
  +   assert_serialization_error(Result, list_to_binary(ErrorCode));
  +assert_serialization_error(#xqError{name = 
  +                 #xqAtomicValue{value = 
  +                                  #qname{namespace = ErrNs, 
  +                                         local_name = Err}}}, ErrorCode) ->
  +   if Err == ErrorCode;
  +      ErrorCode == <<"*">> ->
  +         true;
  +      true ->
  +         case <<"Q{}",Err/binary>> == ErrorCode andalso ErrNs == 'no-namespace'
  +            orelse <<"Q{",ErrNs/binary,"}",Err/binary>> == ErrorCode 
  +         of
  +            true ->
  +               true;
  +            _ ->
  +               {false,{Err,ErrorCode}}
  +         end
  +   end;
  +assert_serialization_error(Result, ErrorCode) ->
  +   case catch xqerl_serialize:serialize(Result, #{}) of 
  +      {_, #xqError{} = Err} ->
  +         assert_serialization_error(Err, ErrorCode);
  +      Result1 ->
  +         {false, {assert_serialization_error,Result1,ErrorCode}}
      end.
   
   % normalize end-of-line characters 
  
positive.code: get_value(Key, List, Default) ->
     proplists:get_value(Key, List, Default).
  
  
  handle_environment([]) -> {"",#{}};
  handle_environment(List) ->
  
negative.code:       _ ->
           ?dbg("Result,SchemaRegex", {NormResult, Norm}),
           {false, {assert_serialization_match,NormResult,SchemaRegex}}      
     end;
  assert_serialization_match(Item, SchemaRegex, Flags) ->
     Ser = xqerl_serialize:serialize(Item, #{}),
     assert_serialization_match(Ser, SchemaRegex, Flags).
     
  %% assert_error
  assert_error(Result, ErrorCode) when is_list(ErrorCode) ->
  