Difference between revisions of "Integrating oXygen"

From BaseX Documentation
Jump to navigation Jump to search
Line 29: Line 29:
 
<p>The query execution works as follows:</p>  
 
<p>The query execution works as follows:</p>  
 
    
 
    
#Configure a new transformation scenario in <code>Window &#187; Show View &#187; Transformation Scenarios</code>.  
+
# Configure a new transformation scenario in ''Window'' → ''Show View'' → ''Transformation Scenarios''.
#Press the <code>plus</code> sign to add a new scenario.  
+
# Press the <code>plus</code> 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).  
+
# Enter a Name, XML URL (your xml file or leave it empty) and the XQuery URL (your query file).  
#Choose <code>"BaseXConnection"</code> in the combo box.  
+
# Choose "BaseXConnection" in the combo box.  
#Press <code>OK</code>, and your scenario is ready. Now you can start the transformation.  
+
# Press ''OK'', and your scenario is ready. Now you can start the transformation.  
#The results should immediately occur in the result panel.
+
# The results should immediately occur in the result panel.
 
[[Category:Instructions]]
 
[[Category:Instructions]]

Revision as of 21:03, 28 January 2011

This tutorial describes how to use the BaseX XQuery Processor to execute queries in the oXygen XML Editor. You can access the existing databases from BaseX within oXygen and work with the results as XML.

Required Downloads

  1. basex.jar: Main code
  2. basex-api.jar: Implementation of the XQJ API
  3. xqj-api.jar: XQuery for Java (Interface)
  4. oXygen XML Editor: Install the oXygen XML Editor on your computer

Setting up

Data Source

  1. Start oXygen and go to OptionsPreferencesData Sources.
  2. Add a new Data Source with the New button.
  3. Enter Name "BaseX" and choose XQuery API for Java(XQJ) as type.
  4. Add the three JAR files with the Add Button.
  5. Now press OK, and your Data Source is ready.

Connection

  1. Now press New in the Connection Panel (located in Data Sources).
  2. Enter Name "BaseXConnection" 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. Press the plus sign to add a new scenario.
  3. Enter a Name, XML URL (your xml file or leave it empty) and the XQuery URL (your query file).
  4. Choose "BaseXConnection" in the combo box.
  5. Press OK, and your scenario is ready. Now you can start the transformation.
  6. The results should immediately occur in the result panel.