XQuery Syntax Highlights and Content Completion

To create an XQuery document, select FileNew (Ctrl (Meta on Mac OS)+N) and when the New document wizard appears, select XQuery entry.

Oxygen XML Developer plugin 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 such as 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 that 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 included in the Saxon product are available on content completion if one of the following conditions are true:

  • The edited file has a transformation scenario associated that uses as transformation engine Saxon 9.6.0.7 PE or Saxon 9.6.0.7 EE.
  • The edited file has a validation scenario associated that use as validation engine Saxon 9.6.0.7 PE or Saxon 9.6.0.7 EE.
  • The validation engine specified in Preferences is Saxon 9.6.0.7 PE or Saxon 9.6.0.7 EE.

If the Saxon namespace (http://saxon.sf.net) is mapped to a prefix, the functions are presented using this prefix. Otherwise, the default prefix for the Saxon namespace (saxon) is used.

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. Otherwise, only the function name being used.

The content completion pop-up window presents all the variables and functions from both the edited XQuery file and its imports.

XQuery Content Completion

Was this helpful?