Difference between revisions of "Integrating oXygen"

From BaseX Documentation
Jump to navigation Jump to search
(Created page with "<p>This tutorial describes how to use the BaseX XQuery Processor to execute queries in the <a href="http://www.oxygenxml.com/">oXygen</a> XML Editor. You can access the existing ...")
 
Line 1: Line 1:
 
<p>This tutorial describes how to use the BaseX XQuery Processor
 
<p>This tutorial describes how to use the BaseX XQuery Processor
to execute queries in the <a href="http://www.oxygenxml.com/">oXygen</a> XML Editor.
+
to execute queries in the [http://www.oxygenxml.com oXygen XML Editor].
 
You can access the existing databases from BaseX within oXygen
 
You can access the existing databases from BaseX within oXygen
 
and work with the results as XML.</p>  
 
and work with the results as XML.</p>  
Line 9: Line 9:
 
<li><a href="maven/org/basex/basex-api/6.3.1/basex-api-6.3.1.jar">basex-api.jar</a>: Implementation of the XQJ API</li>  
 
<li><a href="maven/org/basex/basex-api/6.3.1/basex-api-6.3.1.jar">basex-api.jar</a>: Implementation of the XQJ API</li>  
 
<li><a href="maven/javax/xml/xquery/xqj-api/1.0/xqj-api-1.0.jar">xqj-api.jar</a>: XQuery for Java (Interface)</li>  
 
<li><a href="maven/javax/xml/xquery/xqj-api/1.0/xqj-api-1.0.jar">xqj-api.jar</a>: XQuery for Java (Interface)</li>  
<li><a href="http://www.oxygenxml.com/">oXygen XML Editor</a>: Install the oXygen XML Editor on your computer</li>  
+
<li>[http://www.oxygenxml.com oXygen XML Editor]: Install the oXygen XML Editor on your computer</li>  
 
</ul>  
 
</ul>  
 
   
 
   

Revision as of 11:02, 7 December 2010

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

  • <a href="maven/org/basex/basex/6.3.1/basex-6.3.1.jar">basex.jar</a>: Main code
  • <a href="maven/org/basex/basex-api/6.3.1/basex-api-6.3.1.jar">basex-api.jar</a>: Implementation of the XQJ API
  • <a href="maven/javax/xml/xquery/xqj-api/1.0/xqj-api-1.0.jar">xqj-api.jar</a>: XQuery for Java (Interface)
  • oXygen XML Editor: Install the oXygen XML Editor on your computer

Setting up

Data Source

  1. Start oXygen and go to Options » Preferences » Data 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 Window » Show View » Transformation 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.