|Querying Documents / Working with XQuery|
To create an XQuery document, select and when the New document wizard appears, select XQuery entry.
Oxygen XML Developer provides syntax highlight for keywords and all known XQuery functions and operators. A content completion assistant is also available and can be activated with the (Ctrl (Meta on Mac OS)+Space) shortcut. The functions and operators are presented together with a description of the parameters and functionality. For some supported database engines like eXist and Berkeley DB, the content completion list offers the specific XQuery functions implemented by that engine. This feature is available when the XQuery file has an associated transformation scenario which uses one of these database engines or the XQuery validation engine is set to one of them via a validation scenario or in the XQuery Preferences page.
The extension functions built in the Saxon product are available on content completion if one of the following conditions are true:
If the Saxon namespace (http://saxon.sf.net) is mapped to a prefix the functions are presented using this prefix, the default prefix for the Saxon namespace (saxon) is used otherwise.
If you want to use a function from a namespace mapped to a prefix, just type that prefix and the content completion displays all the XQuery functions from that namespace. When the default namespace is mapped to a prefix the XQuery functions from this namespace offered by content completion are also prefixed, only the function name being used otherwise.
The content completion popup window presents all the variables and functions from both the edited XQuery file and its imports.
Figure: XQuery Content Completion