The latest instructions on how to configure eXist support in <oXygen/> can be found on our website.
The following directory definitions shall apply:
OXY_DIR - oXygen installation root directory. (for example on Windows C:\Program Files\Oxygen 7.0)
DBXML_DIR - Berkeley DB XML database root directory. (for example on Windows C:\Program Files\Sleepycat Software\Berkeley DB XML 2.2.13)
DBXML_LIBRARY_DIR (usually on Mac and Unix is DBXML_DIR/lib and on Windows is DBXML_DIR/bin)
You should have Berkeley DB XML database installed on your machine.
Copy Berkeley DB XML jar resources
You have to copy the following Berkeley DB specific files in the [oXygen-install-folder]/lib directory
db.jar (check for it into DBXML_DIR/lib or DBXML_DIR/jar)
dbxml.jar (check for it into DBXML_DIR/lib or DBXML_DIR/jar)
In case the needed jars are not found you should use --enable-java switch when you build the libraries (more info on http://www.sleepycat.com/xmldocs/ref_xml/xml_unix/intro.html). If you skip this step the application will display an error message when you try to validate or run the query.
Restart the <oXygen/> application.
Add Berkeley DB XML libraries directory to your PATH environment variables.
When running the application, each of the Berkeley DB XML DLLs must be available in a directory in the PATH. You can achieve this by adding the library directory to the LD_LIBRARY_PATH (linux), DYLD_LIBRARY_PATH (OS X), or PATH (windows) environment variable. On Windows the PATH might be already changed properly by the Berkeley DB XML installation. A common example is PATH=C:\Program Files\Sleepycat Software\Berkeley DB XML 2.2.13\bin
An alternative way is to modify the following:
On UNIX: Create a file called oxygen7.0.vmoptions (in case it is not already created) in the OXY_DIR. The content of the file must be: -Djava.library.path=DBXML_LIBRARY_DIR
On Mac: Right-click on the <oXygen/> application icon and in the pop-up menu select Show Package Contents, then in the Contents directory you edit the file Info.plist: in the key VMOptions add -Djava.library.path=DBXML_LIBRARY_DIR
Configure the Berkeley DB environment.
Go to Oxygen and open Preferences -> XML -> XSLT/FO/XQuery->XQuery->Berkeley DB XML to configure the environment home directory. This is the directory where your databases are stored (the DB_HOME setting). You can also set a verbosity level for the messages to be provided during execution.
Configure Berkeley DB XML as main validator for XQuery files.
Go to Preferences->XSLT/FO/XQuery->XQuery and set Berkeley DBXML for XQuery validation.
Execute XQuery.
Go to associated scenario configuration and select Berkeley DBXML as the transformation engine. The collections from your XQuery are automatically opened if they are available in the environment home directory you set. For example in the below Query
<clients> { for $client in collection("invoices.dbxml") /e5Notification/OrderNotification/Purchase/CustomerData let $bc := $client//BillingContact return <client id="{$bc/Email/text()}"> <name>{$bc/LastName/text()," ",$bc/FirstName/text()}</name> <company>{$bc/Company/text()}</company> </client> } </clients>