Difference between revisions of "Integrating oXygen"
Jump to navigation
Jump to search
Line 14: | Line 14: | ||
* Select the WebDAV data source in the Data Source combo box | * Select the WebDAV data source 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: | ||
− | # Set the URL to <code>http://localhost:8984/webdav</code> | + | # Set the URL to <code><nowiki>http://localhost:8984/webdav</nowiki></code> |
# Set the user name to <code>admin</code> | # Set the user name to <code>admin</code> | ||
# Set the password to <code>admin</code> | # Set the password to <code>admin</code> |
Revision as of 21:33, 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:
- 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
- Go to menu Preferences → Data Sources
- In the Connections panel, click the New button
- Enter a unique name for the connection
- Select the WebDAV data source in the Data Source combo box
- Fill-in the appropriate connection details. Below, the default valus are shown:
- Set the URL to
http://localhost:8984/webdav
- Set the user name to
admin
- Set the password to
admin
- Click the OK button
You can also directly open single files as follows:
- 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
Preparations
- Download one of the complete BaseX distributions (ZIP, EXE)
- Start oXygen and go to Options → Preferences → Data Sources.
- Start a BaseX Server instance
Data Source
- Add a new Data Source with the New button.
- Enter "BaseX" as name and choose XQuery API for Java (XQJ) as type.
- Add the following JAR files above with the Add Button:
xqj-api-1.0.jar
,xqj2-0.0.1.jar
andbasex-xqj-0.9.2.jar
(the version names of the JAR file may differ). - Now press OK, and your Data Source is ready for use.
Connection
- Now press New in the Connection Panel below.
- Enter Name "BaseX" 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.
- Choose the XQuery Transformation tree entry.
- Press the
plus
sign to add a new scenario. - Enter a Name and an optional XML and XQuery URL (e.g. your query document/file).
- Choose "BaseX" as Transformer from the combo box.
- Press OK, and your scenario is ready. Now you can start the transformation, e.g. by clicking on the red Play button.
- The results should immediately occur in the result panel.