Streamline with Content Completion

The intelligent Content Completion Assistant available in Oxygen XML Editor plugin enables rapid, in-line identification and insertion of structured language elements, attributes and, in some cases, their parameter options.

Content Completion Assistant

The functioning of the Content Completion Assistant feature is schema-driven (XML Schema, DTD, and RELAX NG). When Oxygen XML Editor plugin detects a schema, it logs its URL in the Status view.

The Content Completion Assistant is enabled by default, but you can disable it from Window > Preferences > oXygen > Editor > Content Completion. It is activated:

When active, it displays a list of context-sensitive proposals valid at the current caret position. Elements are highlighted in the list using the Up and Down cursor keys on your keyboard. For each selected item in the list, the Content Completion Assistant displays a documentation window. You can customize the size of the documentation window by dragging its top, right, and bottom borders.

To insert the selected content:

Note: When the DTD, XML Schema or RELAX NG schema specifies required child elements for the newly added element, they are inserted automatically only if the Add Element Content option (found in Preferences > Editor > Content Completion options page) is enabled. The Content Completion Assistant can also add optional content and first choice particle, as specified in the DTD or XML Schema or RELAX NG schema. To activate this feature, select the Add optional content and Add first Choice particle check boxes in the Preferences > Editor > Content Completion options page.

After inserting an element, the cursor is positioned:

The Content Completion Assistant is displayed:

The items that populate the Content Completion Assistant depend on the element structure specified in the DTD, XML Schema, Relax NG (full or compact syntax) schema, or NVDL schema associated with the edited document.
Note: The Content Completion Assistant is able to offer elements defined both by XML Schemas version 1.0 and 1.1.

The number and type of elements displayed by the Content Completion Assistant is dependent on the cursor's current position in the structured document. The child elements displayed within a given element are defined by the structure of the specified DTD, XML Schema, Relax NG (full or compact syntax) schema, or NVDL schema.

If the Content Completion Assistant proposals list contains only one element, the list is not displayed. When you trigger the Content Completion Assistant, the element is inserted automatically at the caret position.

A schema may declare certain attributes as ID or IDREF/IDREFS. When the document is validated, Oxygen XML Editor plugin checks the uniqueness and correctness of the ID attributes. It also collects the attribute values declared in the document to prepare the Content Completion Assistant's list of proposals. This is available for documents that use DTD, XML Schema, and Relax NG schema.

Also, values of all the xml:id attributes are handled as ID attributes. They are collected and displayed by the Content Completion Assistant as possible values for anyURI attributes defined in the schema of the edited document. This works only for XML Schema and Relax NG schemas.

For documents that use an XML Schema or Relax NG schema, the content assistant offers proposals for attributes and elements values that have as type an enumeration of tokens. Also, if a default value or a fixed value is defined in the XML Schema used in validation for an attribute or element, then that value is offered in the Content Completion Assistant window.