Edit online

Content Completion in XQuery

Oxygen XML Developer provides content completion for keywords and all known XQuery functions and operators. The Content Completion Assistant can be manually activated with the (Ctrl + Space) shortcut. The functions and operators are presented together with a description of the parameters and functionality, depending on the validation or transformation engine.

For some supported database engines such as MarkLogic and eXist, 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. For more information about the support for working with XQuery with regard to databases, see XQuery and Databases.

The extension functions included in the Saxon engine 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 12.3 PE or Saxon 12.3 EE.
  • The edited file has a validation scenario associated that use as validation engine Saxon 12.3 PE or Saxon 12.3 EE.
  • The validation engine specified in Preferences is Saxon 12.3 PE or Saxon 12.3 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.

Figure 1. XQuery Content Completion