Changes

Jump to navigation Jump to search
2,128 bytes added ,  14:58, 6 December 2010
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 ..."
<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 databases from BaseX within oXygen
and work with the results as XML.</p>

<h2>Required Downloads</h2>
<ul>
<li><a href="maven/org/basex/basex/6.3.1/basex-6.3.1.jar">basex.jar</a>: Main code</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="http://www.oxygenxml.com/">oXygen XML Editor</a>: Install the oXygen XML Editor on your computer</li>
</ul>

<h2>Setting up</h2>

<h3>Data Source</h3>
<ol start="1">
<li>Start oXygen and go to <code>Options &#187; Preferences &#187; Data Sources</code>.</li>
<li>Add a new Data Source with the <code>New</code> button.</li>
<li>Enter Name <code>"BaseX"</code> and choose <code>XQuery API for Java(XQJ)</code> as type.</li>
<li>Add the three JAR files with the <code>Add</code> Button.</li>
<li>Now press <code>OK</code>, and your Data Source is ready.</li>
</ol>

<h3>Connection</h3>
<ol start="1">
<li>Now press <code>New</code> in the Connection Panel (located in Data Sources).</li>
<li>Enter Name <code>"BaseXConnection"</code> and select <code>"BaseX"</code> in the Data Source Box.</li>
<li>Now press <code>OK</code>, and your Connection is ready.</li>
</ol>

<h2>Usage</h2>

<p>The query execution works as follows:</p>

<ol start="1">
<li>Configure a new transformation scenario in <code>Window &#187; Show View &#187; Transformation Scenarios</code>.</li>
<li>Press the <code>plus</code> sign to add a new scenario.</li>
<li>Enter a Name, XML URL (your xml file or leave it empty) and the XQuery URL (your query file).</li>
<li>Choose <code>"BaseXConnection"</code> in the combo box.</li>
<li>Press <code>OK</code>, and your scenario is ready. Now you can start the transformation.</li>
<li>The results should immediately occur in the result panel.</li>
</ol>
bueraucrat, Bureaucrats, editor, reviewer, Administrators
907

edits

Navigation menu