Re: [basex-talk] Sequence comparison

2020-11-25 Thread Martin Honnen
Am 26.11.2020 um 07:14 schrieb Martin Honnen: My bad, use group by $k := $a return {$a} To describe it clearer, the whole FLOWR should be for $a in (1,2,3,5) where $a = (1,3,2,3) group by $k := $a return {$a}

Re: [basex-talk] Re: Sequence comparison

2020-11-25 Thread Martin Honnen
My bad, use group by $k := $a return {$a}-- Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.Am 26.11.20, 02:28 schrieb "Giuseppe G. A. Celano" : Unfortunately this does not work because, if the second sequence has only one 3 (and the first has two 3), I will

Re: [basex-talk] Sequence comparison

2020-11-25 Thread Kristian Kankainen
Hello Giuseppe, Would this do what you want: let $reference := (1,3,2,3) for $a in (1,2,3,5,3) where $a = $reference return{$a} Depending on how your $reference looks like, e.g. if it has many duplicates, you can compact it by doing let $reference := distinct- values((1,3,2,3))either way

Re: [basex-talk] Sequence comparison

2020-11-25 Thread Giuseppe G. A. Celano
Unfortunately this does not work because, if the second sequence has only one 3 (and the first has two 3), I will still get two 3, while I should get only one. > > Or more FLOWR like > for $a in (1,2,3,5,3) > where $a . = (1,3,2) > group by $o := $a > return > {$a} > On 25. Nov

Re: [basex-talk] Improper use/potential bug error

2020-11-25 Thread Christian Grün
Hi Giuseppe, The compilation info of all xquery:eval calls was added to the query info; this resulted in a huge list of info messages. With the new snapshot, only the compilation strings for the main expression will be added to the info output [1]. As indicated, the error can be avoided in 9.4.5

Re: [basex-talk] Improper use/potential bug error

2020-11-25 Thread Christian Grün
One more hint: If you iterate over documents that are not stored in a database, you can save a lot of main memory by using fetch:xml instead of fn:doc. As fn:doc is deterministic, all intermediate documents must be kept in main memory in order to ensure that a future access to this file will

Re: [basex-talk] Improper use/potential bug error

2020-11-25 Thread Christian Grün
Hi GIuseppe, The error message indicates that the info that’s to be output in the Info View panel gets too large. Does the error also occur if you disable the Info View before running the query? We’ll try to find the weak spot (usually, too large info output will be chopped), Christian On Sat,

Re: [basex-talk] RESTXQ and posting files

2020-11-25 Thread Christian Grün
Hi Giuseppe, > I would like to make the script available as a RESTXQ application, but > it is not clear to me how I can specify, in a RESTXQ function, that an > xml or txt file should be accepted as an input. What have you tried so far? Are you planning to upload your file as binary stream (e.g.

Re: [basex-talk] Sequence comparison

2020-11-25 Thread Martin Honnen
Am 25.11.2020 um 08:39 schrieb Martin Honnen: Am 25.11.2020 um 06:37 schrieb Giuseppe G. A. Celano: I have to compare two sequences and find common items, irrespective of their positions: for $a  in (1,2,3,5,3) for $u  in (1,3,2,3) where $a = $u group by $o := $a return {$a} This returns 1 2