How This Works
Laying Out jEdit
Configuring The Plugin
Running a Query
Online Documentation
The Mark Logic jEdit plugin is a connector that submits queries to a Content Interaction Server engine and returns the result. The source of the query text is a jEdit edit buffer of your choice and the result of the query is stored to another buffer you choose.
You can edit an XQuery script, run it and see the result very quickly and easily.
The easiest way to use this plugin is to dock it into the main jEdit view and split the editor pane horizontally so that you can see the file you're editing and the result pane at the same time.
Above each buffer window is a drop-down to select a currently open buffer. A given buffer can be visible in more that one edit window. What you want to do now is use the top edit window to edit your XQuery source, and use the lower one as the destination for the output.
Focus the upper edit window and then select File -> Open to open an existing file, or File -> New to start a new, empty file. In the Mark Logic Console, select the buffer to use as the XQuery source from the drop-down selector.
Focus the lower edit window and select or create an empty buffer. In the console, select that buffer as the output destination. You may also select the New Buffer radio button to automatically create a new buffer the next time you run a query. Note that whichever edit window is active when you run the query will switch to the newly created buffer. This is not a problem, but you may need to reselect the buffers to display the right one in each of the split panes.
Once you've laid out the jEdit windows, the layout will be remembered when you restart jEdit. There is no need to save the configuration.
Before you can use the plugin you need to configure it so it knows where the server is located. In the Mark Logic Console, click the Config tab at the top and enter either the hostname/port of the server or a JNDI lookup key and the user/password credentials. The information you enter will automatically be saved by jEdit and need not be entered on each run.
Once you've selected which buffer to run the query from and where the result should go, click the Run Query button to send the query to the server. There is also a menu item (Plugins -> Mark Logic -> Run Query) which you can use to run a query. The menu item is not very useful, but it defines a shortcut key, Control-/, which can be used to run a query. This can very handy for quick edit/run round-tripping.
The Mark Logic xq:zone Developer Community site (xqzone.marklogic.com) has all Content Interation Server documentation online for easy reference. The documentation root page is at http://xqzone.marklogic.com/pubs/.
The code for this open source project is hosted on xq:zone. Please visit the Workshop page (http://xqzone.marklogic.com/code/) to check for updates and further information.
Hyoerlinks are not active in the console help panel. To follow the links, open the jEdit Help Viewer (F1) and select the help section for Mark Logic. Or copy/paste the URL into a web browser. Unfortunately, the builtin Java HTML renderer in jEdit does not display the XHTML pages on the xq:zone site very accurately.