Page 1 of 1

setting up XQuery with eXist-DB

Posted: Tue Feb 28, 2017 10:03 pm
by XML4Pharma
I am currently evaluating oXygen (XML Editor 18.1, build 2017020917).
I have set up a connection with my eXist database and can see all the documents in the database for all collections using the data source explorer.

I then wrote my first query which runs fine in the eXist "eXide":
xquery version "3.0";
let $base := '/db/fda_submissions/cdisc01/'
let $define := 'define2-0-0-example-sdtm.xml'
let $definedoc := doc(concat($base,$define))
return <test>{$definedoc}</test>

where $base is the collection in the database, and $define is the xml document in the database.
When then running, I get an I/O error. It looks as the system is not looking in the database but looking for a file C:\db\fda_submissions\cdisc01\define2-0-0-example-sdtm.xml

In my scenario editor I have:
XML URL: empty
XQuery URL: ${currentFileURL}

Probably, I need to put something in XML URL, but when I try "Browse Data Source Explorer" it wants me to select a single document from the DB, whereas I define the document in the XQuery query myself ($base,$define).

Your help is highly appreciated.

Re: setting up XQuery with eXist-DB

Posted: Wed Mar 01, 2017 11:02 am
by Radu
Hi,

In the XQuery transformation scenario there is a "Transformer" combo box. Have you chosen there the Exist connection that you have previously defined?

Regards,
Radu

Re: setting up XQuery with eXist-DB

Posted: Wed Mar 01, 2017 9:24 pm
by XML4Pharma
Many thanks!
That did it, I had chosen SaxonHE as the transformer :( , as I am used to use Saxon in Java projects that execute XQuery and other kinds of transformations. So: resolved! :D
Many thanks again,
Jozef