Content Completion in XSLT Stylesheets

The list of proposals offered by the Content Completion Assistant are context-sensitive and includes proposals that are valid at the current cursor position. You can enhance the list of proposals by specifying an additional schema. This schema is defined by the user in the Content Completion / XSL preferences page and can be: XML Schema, DTD, RELAX NG schema, or NVDL schema.

XSLT Content Completion Assistant

The feature is activated in Text mode in the following situations:

  • After you press the < character when inserting an element, it is automatically activated after a short delay. You can adjust the activation delay with the Activation delay of the proposals window (ms) option from the Content Completion preferences page.
  • After typing a partial element or attribute name, you can activate it by pressing Ctrl + Space (Command + Space on OS X) or Alt + ForwardSlash (Command + Alt + ForwardSlash on OS X). If there is only one valid proposal at the current location, it is inserted without displaying the list of proposals.

The Content Completion Assistant proposes numerous item types (such as templates, variables, parameters, keys, etc.) that are defined in the current stylesheet, and in the imported and included XSLT stylesheets. The Content Completion Assistant also includes code templates that can be used to quickly insert code fragments into stylesheets.

Note

For XSL and XSD resources, the Content Completion Assistant collects its components starting from the master files. The master files can be defined in the project or in the associated validation scenario. For further details about the Master Files support go to Defining Master Files at Project Level.

The extension functions included in the Saxon 6.5.5 and 9.6.0.7 transformation engines are presented in the content completion list only if the Saxon namespace (http://saxon.sf.net for XSLT version 2.0 / 3.0 or http://icl.com/saxon for XSLT version 1.0) is declared and one of the following conditions is true:

  • The edited file has a transformation scenario that uses as transformation engine Saxon 6.5.5 (for XSLT version 1.0), Saxon 9.6.0.7 PE or Saxon 9.6.0.7 EE (for XSLT version 2.0 / 3.0).
  • The edited file has a validation scenario that uses as validation engine Saxon 6.5.5 (for version 1.0), Saxon 9.6.0.7 PE or Saxon 9.6.0.7 EE (for version 2.0 / 3.0).
  • The validation engine specified in Options page is Saxon 6.5.5 (for version 1.0), Saxon 9.6.0.7 PE or Saxon 9.6.0.7 EE (for version 2.0 / 3.0).

Additionally. the Saxon-CE-specific extension functions and instructions are presented in the list of content completion assistance proposals only if the http://saxonica.com/ns/interactiveXSLT namespace is declared.

Namespace prefixes in the scope of the current context are presented at the top of the content completion assistance window to speed up the insertion into the document of prefixed elements.

Namespace Prefixes in the Content Completion Assistant

For the common namespaces such as XSL namespace (http://www.w3.org/1999/XSL/Transform), XML Schema namespace (http://www.w3.org/2001/XMLSchema), or Saxon namespace (http://icl.com/saxon for version 1.0, http://saxon.sf.net/ for version 2.0 / 3.0), Oxygen XML Editor provides an easy mode to declare them by proposing a prefix for these namespaces.

Was this helpful?