Integrating oXygen

From BaseX Documentation
Revision as of 13:49, 10 June 2015 by Amanda (talk | contribs) (Clarified Perform Queries section, referring to oXygen 17.0 and distinguishing between one-time setup and recurring steps)
Jump to navigation Jump to search

This tutorial is part of the Getting Started Section. It describes how to access BaseX from the oXygen XML Editor. Currently, there are two variants how to use BaseX in oXygen:

Access Database Resources


  • First, start the BaseX WebDAV service.


  1. Go to menu OptionsPreferencesData Sources
  2. In the Connections panel, click the New button (+)
  3. Enter "BaseX-WebDAV" as connection name
  4. Select "WebDAV" in the Data Source combo box
  5. Fill in the appropriate connection details. Below, the default values are shown:
    • Set the URL to http://localhost:8984/webdav
    • Set the user name to admin
    • Set the password to admin
  6. Now press OK, and your Data Source is ready for use

You can now open single database files as follows:

  • Choose FileOpen URL....


  • Enter the corresponding user name and password (if needed), the URL of the BaseX WebDAV Server, and then click "Browse".


Perform Queries

One-Time Setup


  1. Download one of the complete BaseX distributions (ZIP, EXE).
  2. Charles Foster's XQJ implementation provides a default (client/server) and a local driver. If you want to use the first flavor, you need to start a BaseX Server instance.

Configure Data Source

  1. Start oXygen and select OptionsPreferencesData Sources.
  2. In the Data Sources section, add a new data source using the New button (+).
  3. Enter "BaseX-XQJ" as Name and select XQuery API for Java (XQJ) as type.
  4. Add the following JAR files above with the Add Files Button: xqj-api-1.0.jar, xqj2-0.2.0.jar and basex-xqj-1.3.0.jar (the versions of the JAR file may differ). If you add the BaseX library as well basex.jar, you can also use the local XQJ driver.
  5. Under "Driver class", choose the default or the local XQJ driver (net.xqj.basex.BaseXXQDataSource vs. net.xqj.basex.local.BaseXXQDataSource).
  6. Click OK.

Configure Connection

  1. In the Connections section (in the same Preferences dialog from the Configure Data Source procedure), click New (+).
  2. Enter "BaseX" as Name and select "BaseX-XQJ" as Data Source.
  3. If you use the default driver, enter these values in the Connection Details section:
    • port: 1984
    • serverName: localhost
    • user: admin
    • password: admin
  4. Click OK to complete the connection configuration.
  5. Click OK again to close the Preferences dialog.

Configure New Transformation Scenario

  1. Select WindowShow ViewTransformation Scenarios.
  2. Select the XQuery transformation tree entry, and click + to add a new scenario.
    If this entry does not appear in the tree, click + and select XQuery transformation in the dropdown list.
  3. Enter a Name and an optional XML and XQuery URL (e.g. your query document/file).
  4. Choose "BaseX" as Transformer from the combo box.
  5. Click OK to complete the scenario configuration.

Execute Query

After the one-time setup steps are complete, execute a query using the transformation scenario. Start the transformation by clicking the red Apply associated scenarios button in the Transformation Scenarios window.

The results should immediately occur in the result panel.

--CG 14:45, 29 January 2015 (CET)