Available only in the Enterprise edition
This tutorial explains how to configure the MarkLogic support in oXygen XML
Editor, browse and edit resources through WebDAV, as well as running XQuery
An XDBC application server must be running to be able to connect to the MarkLogic
server using oXygen. More information about how to configure an XDBC server can be
found in the MarkLogic documentation: http://xqzone.marklogic.com/pubs/3.2/books/admin.pdf. oXygen uses XCC
connector to interact with the MarkLogic XDBC server and requires the basic
authentication schema to be set. Starting with MarkLogic version 4.0, the default
authentication method when you create an HTTP or WebDAV Server is
digest, so make sure to change it to basic.
The tutorial assumes that you have a basic knowledge of databases, XML
technologies, and of oXygen XML Editor tool. The explanations and screenshots are
given for the standalone version of oXygen XML Editor. However, the same set of
features are available in the Eclipse plugin version of the product with minor
How to Configure the MarkLogic Support in oXygen
oXygen currently supports MarkLogic version 4.0 or higher. Debugging is only
available starting with MarkLogic 4.0 or higher.
To connect oXygen to a MarkLogic database, you need to configure two things:
A data source defines all that is needed to have a connection to the
To configure the data source, you need the MarkLogic driver, available at: http://community.marklogic.com/download. The data source drivers can be
configured in the Data Source preferences page.
For specific instructions on how to configure the data source drivers, see the
following topic in our Users Manual: http://www.oxygenxml.com/doc/ug-editor/tasks/configure-marklogic-datasource.html#configure-marklogic-datasource.
Once you have created the data source, you may proceed further by defining one or
more connections. The connections can be configured in the same Data
Source preferences page.
For specific instructions on how to configure the connections, see the following
topic in our Users Manual: http://www.oxygenxml.com/doc/ug-editor/tasks/configure-marklogic-connection.html#configure-marklogic-connection.
Sometimes you need to work with two database servers (for example, a development
sever and a production server) so it makes sense to define a connection on each
database server to be further used when executing XQuery or browsing/editing the
database resources. If the two database servers have the same version, you only need
to configure a data source and add two connections for it.
Data Source Explorer View
Once you finish the configuration of the connection, you can browse the database
content using the Data Source Explorer view from the Database perspective.
MarkLogic supports XQuery interrogations over the stored XML content. For example,
if you want to create a XQuery to generate a report with the billing contact data from
the latest purchase notifications. You can open an XQuery document (an XQuery template
is available from the File/New menu), configure the transformation scenario to match
the MarkLogic connection for the transformer field, write the XQuery, and then execute
MarkLogic XQuery modules, the Content Completion Assistant displays the latest
built-in XQuery functions in accordance with the server version.
Remote XQuery Debugging on MarkLogic Server
oXygen enables the debugging of real applications that use
XQuery (for example, web applications that trigger XQuery executions). oXygen
connects to a MarkLogic server, shows you the running XQuery scripts, and allows you
to debug them. By setting the server in debug mode, you will be able to intercept all
the XQuery scripts running on that server.
The remote debugging support also allows collaborative
debugging. Two or more developers can connect to the same debugging session.
When entering in the XQuery Debugging mode, oXygen provides a special layout
that displays the XML source (optional) and the XQuery documents side by side. It can
also show the debugging output and specific XQuery debugging views and toolbars that
allow you to set breakpoints, inspect variable bindings, or evaluate expressions in
the request context.
More details about the oXygen XQuery Debugger can be found here: http://www.oxygenxml.com/xquery_debugger.html