setting up XQuery with eXist-DB
Posted: 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.
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.