Project

Profile

Help

Bug #4792

closed

Python program using SaxonC 1.2.1 HE module with xquery_processor.run_query_to_string() crashes

Added by Anton Shchetikhin over 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Python
Start date:
2020-10-08
Due date:
% Done:

100%

Estimated time:
Found in version:
1.2.1
Fixed in version:
11.1
Platforms:

Description

I managed to compile the SaxonC 1.2.1 HE module for Python 3.7 on Ubuntu 16.04 64bit, but I am having trouble getting some XQuery expressions to run (see attachments).

  1. without_func_call.xquery works fine
Creating new xquery processor -> OK
Prepare xml -> OK
Prepare xquery -> OK
Setup context -> OK
Setup `$document` variable -> OK
Running XQuery -> 
<БлокПроверок xmlns="http://пф.рф/ВС/СЗВ-М/2017-01-01"
              ID="ВСЗЛ.Б-АНКЕТА.1"
              name="Блок проверок по БД анкетных данных">
   <Проверка ID="1">
      <Описание>Указывается СНИЛС, содержащийся в страховом свидетельстве</Описание>
      <РезультатЗапроса>0</РезультатЗапроса>
      <КодРезультата>30</КодРезультата>
   </Проверка>
   <Проверка ID="2">
      <Описание>Указывается ФИО, содержащееся в страховом свидетельстве</Описание>
      <РезультатЗапроса>0</РезультатЗапроса>
      <КодРезультата>30</КодРезультата>
   </Проверка>
   <Проверка ID="3">
      <Описание>Статус ИЛС в реестре 'Застрахованные лица' на дату проверяемого документа не должен быть равен значению 'УПРЗ'</Описание>
      <РезультатЗапроса>0</РезультатЗапроса>
      <КодРезультата>30</КодРезультата>
   </Проверка>
</БлокПроверок>
  1. func_call_with_empty_param.xquery works fine too
Creating new xquery processor -> OK
Prepare xml -> OK
Prepare xquery -> OK
Setup context -> OK
Setup `$document` variable -> OK
Running XQuery -> 
<БлокПроверок xmlns="http://пф.рф/ВС/СЗВ-М/2017-01-01"
              ID="АФ.КСФ.1"
              name="Проверка структуры файла">
   <Проверка ID="1">
      <Описание>Проверяемый файл должен быть корректно заполненным XML-документом</Описание>
      <РезультатЗапроса>
         <Результат xmlns="http://пф.рф/ВС/СЗВ-М/2017-01-01">0</Результат>
      </РезультатЗапроса>
      <КодРезультата>50</КодРезультата>
   </Проверка>
</БлокПроверок>
  1. func_call_with_non_empty_param.xquery doesn't work as expected
Creating new xquery processor -> OK
Prepare xml -> OK
Prepare xquery -> OK
Setup context -> OK
Setup `$document` variable -> OK
Running XQuery -> 
Syntax error on line 124 at column 7 near {...у[x443]л[x43b]ь[x44c]т[x442]а[x430]т[x442]а[x430]> </П[x41f]р[x440]о[x43e]в[x432]е[x435]р[x440]к[x43a]а[x430]> </Б[x411]л[x43b]о[x43e]к[x43a]...} 
  XPST0003: End of input encountered while parsing direct constructor
None

JET RUNTIME HAS DETECTED UNRECOVERABLE ERROR: system exception at 0x00007f3456e437c6
Please, contact the vendor of the application.
Core dump will be piped to "/usr/share/apport/apport %p %s %c %d %P %E"
Extra information about error is saved in the "jet_err_25848.txt" file.

Aborted (core dumped)

Text file with the error and python script (test_saxon.py) are attached.

What am I doing wrong? Maybe there's a problem with Cyrillic letters in function call? I wish also to note that BaseX works as expected in all cases.


Files

func_call_with_empty_param.xquery (2.25 KB) func_call_with_empty_param.xquery Anton Shchetikhin, 2020-10-08 19:44
func_call_with_non_empty_param.xquery (4.73 KB) func_call_with_non_empty_param.xquery Anton Shchetikhin, 2020-10-08 19:44
test_saxon.py (1.19 KB) test_saxon.py Anton Shchetikhin, 2020-10-08 19:44
jet_err_25848.txt (74.4 KB) jet_err_25848.txt Anton Shchetikhin, 2020-10-08 19:44
without_func_call.xquery (1.55 KB) without_func_call.xquery Anton Shchetikhin, 2020-10-08 19:44
test.xml (2.4 KB) test.xml Anton Shchetikhin, 2020-10-09 14:29
gdb_out.txt (3.78 KB) gdb_out.txt Anton Shchetikhin, 2020-10-09 14:37

Please register to edit this issue

Also available in: Atom PDF