setting up XQuery with eXist-DB

Issues related to W3C XQuery.
XML4Pharma
Posts: 2

setting up XQuery with eXist-DB

Tue Feb 28, 2017 10:03 pm

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.
Radu
Posts: 5088

Re: setting up XQuery with eXist-DB

Wed Mar 01, 2017 11:02 am

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
XML4Pharma
Posts: 2

Re: setting up XQuery with eXist-DB

Wed Mar 01, 2017 9:24 pm

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

Return to “XQuery”

Who is online

Users browsing this forum: No registered users and 0 guests