Integrating oXygen
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:
- Resources in databases can be opened and modified.
- XPath/XQuery expressions can be run by the query processor of BaseX.
Contents
Access Database Resources
- Start the WebDAV service first, which will allow you to access all resources via the client/server architecture.
- Choose File → Open URL....
- Enter the corresponding user name and password (if needed), the URL of the BaseX WebDAV Server, and then click "Browse".
Perform Queries
Prerequisites
- oXygen XML Editor: http://www.oxygenxml.com/
- BaseX distribution with all libraries included: http://basex.org/download
Data Source
- Start oXygen and go to Options → Preferences → Data Sources.
- Add a new Data Source with the New button.
- Enter "BaseX" as name and choose XQuery API for Java (XQJ) as type.
- Add the three following JAR files with the Add Button:
basex.jar
,basex-api.jar
andxqj-api.jar
- Now press OK, and your Data Source is ready for use.
Connection
- Now press New in the Connection Panel (located in Data Sources).
- Enter Name "BaseXConnection" and select "BaseX" in the Data Source box.
- Now press OK, and your connection is ready.
Usage
The query execution works as follows:
- Configure a new transformation scenario in Window → Show View → Transformation Scenarios.
- Press the
plus
sign to add a new scenario. - Enter a Name, XML URL (your xml file or leave it empty) and the XQuery URL (your query file).
- Choose "BaseXConnection" in the combo box.
- Press OK, and your scenario is ready. Now you can start the transformation.
- The results should immediately occur in the result panel.