<commit_before>.. _tester:

.. raw:: html

   <script type="text/javascript">
     $(document).ready(function() {
       $('.xml').change(function() {
         if ($(this).val() != 'none') {
           $.ajax({
             type: 'GET',
             url: '_static/tester/'+$(this).val(),
             dataType: 'text',
             success: function(data) {
               $('.request').val(data);
             }
           });
         }
       });
       $('.send').click(function() {
         $.ajax({
           type: 'POST',
           contentType: 'text/xml',
           url: $('.server').val(),
           data: $('.request').val(),
           dataType: 'text',
           success: function(data) {
             $('.response').val(data);
           }
         });
       });
     });
   </script>

============
pycsw Tester
============<commit_msg>add error handler to jQuery.ajax<commit_after>.. _tester:

.. raw:: html

   <script type="text/javascript">
     $(document).ready(function() {
       $('.xml').change(function() {
         if ($(this).val() != 'none') {
           $.ajax({
             type: 'GET',
             url: '_static/tester/'+$(this).val(),
             dataType: 'text',
             success: function(data) {
               $('.request').val(data);
             }
           });
         }
       });
       $('.send').click(function() {
         $.ajax({
           type: 'POST',
           contentType: 'text/xml',
           url: $('.server').val(),
           data: $('.request').val(),
           dataType: 'text',
           success: function(data) {
             $('.response').val(data);
           },
           error: function(data1) {
             $('.response').val(data1.responseText);
           }
         });
       });
     });
   </script>

============
pycsw Tester
============
{'fraction_non_alphanumeric': 0.22379912663755458, 'fraction_numerical': 0.001091703056768559, 'mean_word_length': 1.4023591087811271, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7204032', 'n_tokens_mistral': 514, 'n_tokens_neox': 505, 'n_words': 85}