Re: [basex-talk] Example xquery needed to write output to an local xml file

2018-09-06 Thread Andy Bunce
Hi Marco, BaseX sounds like a good fit for your requirements to me :) You dont say what your error is, but you have declared local:process-data as returning an element named whereas the code is returning an element named . Perhaps it should be: declare function local:process-data ($nodes as

Re: [basex-talk] Example xquery needed to write output to an local xml file

2018-09-06 Thread Graydon Saunders
You maybe don't want to start by writing to a file. You want to separate "did the query produce something sensical" and "does the file write do what I expect" as sources of error so you can't try to debug the wrong thing for a few hours. return (: file:write($output || $filename, :)

[basex-talk] Example xquery needed to write output to an local xml file

2018-09-06 Thread Marco Roling
Dear all, I am new on the block here, and trying to find my way around BaseX, which seems to meet my needs for my research on digital museum collection data analysis. I have a very large collection of xml files (> 60 files) that I am querying, and I want to write the returned result

Re: [basex-talk] Example xquery needed to write output to an local xml file

2018-09-06 Thread Bridger Dyson-Smith
Hi Marco - Are you missing a separator ('\') in your $output variable, or in your `fn:concat($output, '\', 'marco.xml')`? Here's a similar example that's working for me: ``` declare variable $data := (1, 2, 3, 4); declare variable $output := '/home/bridger/'; declare function local:process-data(

[basex-talk] Example xquery needed to write output to an local xml file

2018-09-06 Thread Marco Roling
Thanks Bridger, Great help. I got it working! Best, Marco.

Re: [basex-talk] Example xquery needed to write output to an local xml file

2018-09-06 Thread Bridger Dyson-Smith
Hi Graydon On Thu, Sep 6, 2018 at 11:41 AM Graydon Saunders wrote: > You maybe don't want to start by writing to a file. You want to separate > "did the query produce something sensical" and "does the file write do what > I expect" as sources of error so you can't try to debug the wrong thing