XQuery is intended for labeling information extracted from multiple structured sources like XML documents, object repositories and relational databases. <oXygen/> offers help editing XQuery expression by the following means:
The outliner presents the list of all components (namespace declarations, variables and functions) from the imported modules together with the components declared in the current file. Components can be sorted by name and grouped by type, location and namespace.
The outliner filter text field allows you to quickly find a component by knowing its name, or to display in the tree only the components matching the search expression.
The content completion is triggered by CTRL-Space shortcut, at any point in the expression. It shows the list of all the available XQuery functions and keywords.
For all the supported XML database engines (eXist, MarkLogic, Tiger Logic, Oracle, SQL Server, Documentum xDb (X-Hive/DB), etc..), the content completion displays both the XQuery standard functions and the extension functions available for that engine.
Each of the extension function is displayed together with its documentation. This way the relevant information is at your fingertip!
The content completion offers variables and functions not only from the edited file but also from the imported XQuery modules.
Modifications in other modules trigger the automatic update of the list of collected components
XQueries are very similar to the XSLT stylesheets in the sense that they are both capable of transforming an XML input into another format. You can define transformation scenarios that specify the input URL, the preview mode, XML or XHTML. The result can be saved and opened in the associated application. You can even run a FO processor on the output of an XQuery.
The transformation scenarios may be shared between many XQuery files, and are exported at the same time with the XSLT scenarios.
When editing an XQuery file, <oXygen/> detects the documents used as inputs and presents a simplified outline for each one. The input view can analyse documents that are stored on the local file system.
You can use the Drag and Drop triggered pop-up menu to easily create XQuery FLWOR constructs or XPath expressions.
If you have a transformation scenario for the XQuery file and you specify an input XML file, this one will also be added to the displayed input trees.
The Saxon EE (Schema Aware) that is bundled with <oXygen/> can be used as XQuery processor.
<oXygen/> uses for XQuery the Saxon EE processor which is bundled with <oXygen/>. This conforms to the XQuery Working Draft http://www.w3.org/TR/xquery/. The processor is used in two cases: validation and execution of the XQuery document. Although the execution implies a validation, it is faster to syntactically check the expression and make sure it is valid before executing it.
Using the bundled Saxon EE XSLT processor <oXygen/> now offers support for XQuery Update 1.0. Thus, besides querying XML documents, you can modify them using the various insert/delete/modify/create methods available in the XQuery Update 1.0 standard.
Just choose Saxon EE as a transformer in the scenario associated with XQuery files containing update statements and <oXygen/> will notify you if the update was successful.
<oXygen/> integrates the xqDoc tool for generating HTML documentation for XQuery files with just a couple of clicks. It accepts one or more XQuery files as input and the function namespaces are configurable.