Getting Started with XQDT 2.0 and Zorba
Before you can create your first XQuery project, you need to configure an XQuery processor in Eclipse. In Eclipse/DLTK this processor is referred to as an “Interpreter”. This interpreter will be used for running/launching, debugging, and semantic checking of queries. Currently, only the Zorba XQuery processor is supported by XQDT. In the following getting started guide, we explain how you can configure XQDT 2.0 with Zorba.
Requirements
First things first, you need to have some Zorba binaries installed on your system. Please note that with the current Zorba 0.9.4 release, only launching queries will work. If you also want to have debugging and semantic checking capabilities, you need to use a development version from the subversion trunk of the Zorba repository at https://zorba.svn.sourceforge.net/svnroot/zorba/trunk/zorba.
Configuring the Interpreter
Once you have the binaries installed, you can create an XQuery project in your workbench by clicking File -> New -> Project… -> XQuery Project. However, in order to finish the “New Project” wizard, you need to configure Zorba as an interpreter.

Therefore, click on the “Configure Interpreters…” link. There, push the “Add…” button in order to select the path to the installed Zorba command line tool.
You can also configure your environment there (e.g. the path, ld_library_path, or dyld_library_path) in case Zorba is not installed in a system-known location. For example, if you have built Zorba yourself on a Mac OS X system and installed it in a directory in your home directory, you have to add a “Interpreter environment variable” with name DYLD_LIBRARY_PATH whose value points to the installation directory.
Once this step is completed, just push the OK button and follow the next steps of the “Project Creation” wizard. Note that for Zorba, there are no other configuration steps necessary (see screenshot).

Configuring an interpreter brings the three functionalities to XQDT:
- XQuery launcher: Right click on an XQuery main module in your project and choose Run as… -> XQuery. This will execute the chosen query and display the result in your Eclipse console.

- XQuery debugger: Right click on an XQuery main module in your project and choose Debug as… -> XQuery.
- XQuery semantic checker: Semantic checking provides a complex (static) analysis of your query when saving your file. This prevents from common mistakes such as undeclared variables, functions, or namespaces. Note that XQDT supports as-you-type validation for the syntax of your query - semantic checking goes a step further here. Semantic markers are displayed automatically inside the XQDT editor.
