Difference between revisions of "Integrating oXygen"

From BaseX Documentation
Jump to navigation Jump to search
Line 14: Line 14:
 
* Go to menu ''Options'' → ''Preferences'' → ''Data Sources''
 
* Go to menu ''Options'' → ''Preferences'' → ''Data Sources''
 
* In the Connections panel, click the ''New'' button
 
* In the Connections panel, click the ''New'' button
* Enter a unique name for the connection
+
* Enter ''BaseX-WebDAV'' as connection name
 
* Select ''WebDAV'' in the Data Source combo box
 
* Select ''WebDAV'' in the Data Source combo box
 
* Fill-in the appropriate connection details. Below, the default valus are shown:
 
* Fill-in the appropriate connection details. Below, the default valus are shown:

Revision as of 20:37, 25 September 2012

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

Preparations

  • Start the WebDAV service first, which will allow you to access all resources via the client/server architecture

Configuration

  • Go to menu OptionsPreferencesData Sources
  • In the Connections panel, click the New button
  • Enter BaseX-WebDAV as connection name
  • Select WebDAV in the Data Source combo box
  • Fill-in the appropriate connection details. Below, the default valus are shown:
  1. Set the URL to http://localhost:8984/webdav
  2. Set the user name to admin
  3. Set the password to admin
  • Click the OK button

You can also directly open single files as follows:

  • Choose FileOpen URL....

File:Webdav-oxygen01.png

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

File:Webdav-oxygen02.png

Perform Queries

Preparations

  1. Download one of the complete BaseX distributions (ZIP, EXE)
  2. Start a BaseX Server instance

Data Source

  1. Start oXygen and go to OptionsPreferencesData Sources
  2. Add a new Data Source with the New button
  3. Enter "BaseX" as name and choose XQuery API for Java (XQJ) as type
  4. Add the following JAR files above with the Add Button: xqj-api-1.0.jar, xqj2-0.0.1.jar and basex-xqj-0.9.2.jar (the version names of the JAR file may differ)
  5. Now press OK, and your Data Source is ready for use

Connection

  1. Now press New in the Connection Panel below.
  2. Enter Name "BaseX" and select "BaseX" in the Data Source box.
  3. Now press OK, and your connection is ready.

Usage

The query execution works as follows:

  1. Configure a new transformation scenario in WindowShow ViewTransformation Scenarios.
  2. Choose the XQuery Transformation tree entry.
  3. Press the plus sign to add a new scenario.
  4. Enter a Name and an optional XML and XQuery URL (e.g. your query document/file).
  5. Choose "BaseX" as Transformer from the combo box.
  6. Press OK, and your scenario is ready. Now you can start the transformation, e.g. by clicking on the red Play button.
  7. The results should immediately occur in the result panel.