Difference between revisions of "Integrating oXygen"

From BaseX Documentation
Jump to navigation Jump to search
Line 4: Line 4:
 
and work with the results as XML.</p>  
 
and work with the results as XML.</p>  
 
   
 
   
<h2>Required Downloads</h2>
+
==Required Downloads==
 
<ul>  
 
<ul>  
<li><a href="maven/org/basex/basex/6.3.1/basex-6.3.1.jar">basex.jar</a>: Main code</li>
+
#[maven/org/basex/basex/6.3.1/basex-6.3.1.jar basex.jar]: Main code  
<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>
+
#[maven/org/basex/basex-api/6.3.1/basex-api-6.3.1.jar basex-api.jar]: Implementation of the XQJ API  
<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>
+
#[maven/javax/xml/xquery/xqj-api/1.0/xqj-api-1.0.jar xqj-api.jar]: XQuery for Java (Interface)  
<li>[http://www.oxygenxml.com oXygen XML Editor]: Install the oXygen XML Editor on your computer</li>
+
#[http://www.oxygenxml.com oXygen XML Editor]: Install the oXygen XML Editor on your computer  
 
</ul>  
 
</ul>  
 
   
 
   
<h2>Setting up</h2>
+
==Setting up==
 
   
 
   
<h3>Data Source</h3>
+
===Data Source===
<ol start="1">
+
#Start oXygen and go to <code>Options &#187; Preferences &#187; Data Sources</code>.  
<li>Start oXygen and go to <code>Options &#187; Preferences &#187; Data Sources</code>.</li>
+
#Add a new Data Source with the <code>New</code> button.  
<li>Add a new Data Source with the <code>New</code> button.</li>
+
#Enter Name <code>"BaseX"</code> and choose <code>XQuery API for Java(XQJ)</code> as type.  
<li>Enter Name <code>"BaseX"</code> and choose <code>XQuery API for Java(XQJ)</code> as type.</li>
+
#Add the three JAR files with the <code>Add</code> Button.  
<li>Add the three JAR files with the <code>Add</code> Button.</li>
+
#Now press <code>OK</code>, and your Data Source is ready.  
<li>Now press <code>OK</code>, and your Data Source is ready.</li>
 
</ol>
 
 
   
 
   
<h3>Connection</h3>
+
===Connection===
<ol start="1">
+
#Now press <code>New</code> in the Connection Panel (located in Data Sources).  
<li>Now press <code>New</code> in the Connection Panel (located in Data Sources).</li>
+
#Enter Name <code>"BaseXConnection"</code> and select <code>"BaseX"</code> in the Data Source Box.  
<li>Enter Name <code>"BaseXConnection"</code> and select <code>"BaseX"</code> in the Data Source Box.</li>
+
#Now press <code>OK</code>, and your Connection is ready.
<li>Now press <code>OK</code>, and your Connection is ready.</li>
 
</ol>
 
 
   
 
   
<h2>Usage</h2>
+
==Usage==
 
   
 
   
 
<p>The query execution works as follows:</p>  
 
<p>The query execution works as follows:</p>  
+
 
<ol start="1">
+
#Configure a new transformation scenario in <code>Window &#187; Show View &#187; Transformation Scenarios</code>.  
<li>Configure a new transformation scenario in <code>Window &#187; Show View &#187; Transformation Scenarios</code>.</li>
+
#Press the <code>plus</code> sign to add a new scenario.  
<li>Press the <code>plus</code> sign to add a new scenario.</li>
+
#Enter a Name, XML URL (your xml file or leave it empty) and the XQuery URL (your query file).  
<li>Enter a Name, XML URL (your xml file or leave it empty) and the XQuery URL (your query file).</li>
+
#Choose <code>"BaseXConnection"</code> in the combo box.  
<li>Choose <code>"BaseXConnection"</code> in the combo box.</li>
+
#Press <code>OK</code>, and your scenario is ready. Now you can start the transformation.  
<li>Press <code>OK</code>, and your scenario is ready. Now you can start the transformation.</li>
+
#The results should immediately occur in the result panel.
<li>The results should immediately occur in the result panel.</li>
 
</ol>
 
[[Category:Wikify]]
 

Revision as of 20:54, 12 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

    1. [maven/org/basex/basex/6.3.1/basex-6.3.1.jar basex.jar]: Main code
    2. [maven/org/basex/basex-api/6.3.1/basex-api-6.3.1.jar basex-api.jar]: Implementation of the XQJ API
    3. [maven/javax/xml/xquery/xqj-api/1.0/xqj-api-1.0.jar 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 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.