Changes

Jump to navigation Jump to search
360 bytes added ,  13:24, 21 January 2019
no edit summary
===Preparations===
# Download one of the [http://basex.org/download BaseX distributions] (ZIP, EXE).
# Start BaseX (see [[Startup]]).
# Create a BaseX database, if necessary (see [[Databases]]).
===Configure Data Source===
# Start In oXygen and , select ''Options'' → ''Preferences'' → ''Data Sources''.
# In the Data Sources panel, add a new data source using the ''New'' button ({{Code|+}}).
# Enter "BaseX" as name and select ''XQuery API for Java (XQJ)'' as typefrom the ''Type'' dropdown box.
# Add the following JAR files (downloaded in Preparations procedure) with the ''Add Files'' Button. The versions of the JAR files may differ.
#* {{Code|basex/lib/xqj-api-1.0.jar}}#* {{Code|basex/lib/xqj2-0.2.0.jar}}#* {{Code|basex/lib/basex-xqj-89.60.jar}}#* {{Code|basex/basex.jar}}, if you want to use BaseX embedded
# Under "Driver class", choose the preferred driver class:
#* Embedded: {{Code|net.xqj.basex.BaseXXQDataSource}}
===Configure Connection===
# In the Connections section (in the same Preferences dialog from lower half of the Configure Data Source proceduredialog), click ''New'' ({{Code|+}}). # Enter "BaseXXQJ" as name and select "BaseX XQJ" as data source.# If you use the default driver, enter these the following values in the Connection Details section:
#* port: {{Code|1984}}
#* serverName: {{Code|localhost}}
# Select ''Window'' → ''Show View'' → ''Transformation Scenarios''.
# Select In the ''XQuery transformationTransformation Scenarios'' tree entry, and click {{Code|+}} to add a new scenario. #:If this entry does not appear in the treepanel, click {{Code|+}} and select ''XQuery transformation'' in the lower part of the dropdown list.# Enter a name and for your transformation, e.g. "BaseX" like in the screenshot below.# Specify an optional XML and XQuery URL .#* If you would like to query the BaseX database you connected to via WebDAV, leave the ''XML URL'' field empty. In your ''XQuery URL'' file, you can access the database using {{Code|db:open(e"nameOfYourDatabase")}}.g#* If you specify an XML document in the ''XML URL'' field, you can query its content using {{Code|. }} (dot operator) in your query document/''XQuery URL'' file).# Choose "BaseX XQJ" as Transformer from the combo box.
# Click ''OK'' to complete the scenario configuration.
 
[[File:Oxygen-WebDAV-3.png]]
==Execute Query==
After the one-time setup steps are complete, you can execute a your query using the new transformation scenario. Start the transformation by clicking the red Run button (''Apply associated scenarios'' button ) in the Transformation Scenarios window.  [[File:Oxygen-WebDAV-3.png]] The results should be immediately occur displayed in the result panel.
administrator, editor
162

edits

Navigation menu