Early version of DQ – an alternative interface for Mark Logic’s CQ XQuery editor

Update: The project has now moved to github.
http://github.com/robwhitby/DQ

DQ v0.2 now available

Here’s a very early version of a new interface to CQ that I’m slowly working on, imaginatively named DQ. It aims to address a number of shortcomings in CQ, the web XQuery interface provided by Mark Logic.

Current features
Tabbed code editor (based on EditArea) with XQuery syntax highlighting, search and replace, and support of tab key
Save queries and results to file system
Auto-save of all query tabs using browser local storage (no more session confusion)
Highlighting a section of code and executing will run just the selected code (inspired by SQL Query Analyzer!)

Future features
Integration of XQuery API reference
Function auto-complete
More suggestions welcome!

Requirements
Recent version of CQ installed (I’m using 4.1.2)
Firefox 3.5 or IE8 (Chrome doesn’t style XML output, Safari and Opera not yet tested)

Installation
Unzip DQ folder in root of your CQ directory
Browse to: http://SERVER:CQPORT/DQ

The project is up on sourceforge:
https://sourceforge.net/projects/mldq/

Please give it a go and let me know what you think. I’d be interested in suggestions on improvements, extra features etc.

This entry was tagged , , . Bookmark the permalink.

15 Responses to Early version of DQ – an alternative interface for Mark Logic’s CQ XQuery editor

  1. travis says:

    I only played with it for a few minutes, but my initial impression is that it is a nice addition. The ability to rename the tabs would be nice (unless you can and I overlooked it). Very nice work though. Thanks for sharing.

  2. travis says:

    By the way, it mostly works in Safari (Mac) from what I can tell except that when you execute your query using the “xml” button Safari doesn’t display the xml to the page, only the values.

  3. Paul says:

    Would be great to see the “explore” button implemented somewhere too. As well as the history.

    The edit area is a great addition though.

    nice.

  4. admin says:

    Thanks for your comments, good to know there’s some interest in it!

    Paul – I never use the explore or history options in CQ, so didn’t really consider them important. I’ll think about how they could be included though. I definitely see scope to improve on CQ’s browse interface.

    Travis – renaming tabs is on the to-do list, and for rendering xml in Safari and Chrome I’ll look at a workaround, maybe by applying a client-side XSL transform.

  5. Charles says:

    Great tool, well done Rob!

    It doesn’t work in Opera 10.10 right now, it would be great if you could allow DQ to support this.

    Opera has a decent XML renderer which highlights elements and attributes quite well. It also includes namespace declarations (unlike Firefox).

  6. admin says:

    I’ve uploaded an update to sourceforge that works in Opera 10.10.

    http://sourceforge.net/projects/mldq/

    The auto-saving of tabs relies on window.localStorage which I don’t think is in Opera until 10.5.

    Thanks for your feedback
    Rob

  7. Gary Vidal says:

    Hey Rob,

    Great Job, You beat me to the punch I was just starting to my own CQ implementation using EditArea syntax editor. Some of the customization features I was added was comment toggling, autocomplete and session switching. Keep up the good work.

    Regards,

    GV

  8. Pingback: Commandline interface for XQuery « XQuery Web Application Development

  9. Chandra Sekhar says:

    Great job Rob…Well Done !! I like the feature where you can select an xquery and execute without the need of commenting others.

  10. Hello Rob,

    Is it possible to re-name the individual documents that we open in DQ ?

    Thanks,
    Sekhar.

    • admin says:

      Hi Chandra, not right now but it is planned for the next version which I’m hoping to get a chance to work on in November.

  11. Curtis says:

    I’ve run a poor query or two which returned too much data crashing my browser. In at least one case the tab showed (*) as if the query had been edited, but not saved to local storage. When I re-opened dq, my work had not been saved.

    Is there anyway to force tabs to save to local storage? When does auto-save happen?

    • admin says:

      Hi Curtis,

      The tabs are saved on exit, so if the browser crashes this won’t happen.. I’ll change it in future versions to save when executing a query.

      Thanks for your feedback,
      Rob

  12. Colin says:

    Just writing to say: Thanks!
    A co-worker showed me this after I’d been using cq for a few weeks. Very nice!
    The only thing missing for me would be to name tabs (as others have commented).
    CQ’s explore is useful, but I like just using CQ for that, and DQ for queries.

    • admin says:

      Hi Colin,

      Glad you find it useful! Tab renaming and explore are both now supported – download the latest version (0.2) from github :)

      Thanks,
      Rob

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>