|Editing Documents / Editing XML Documents|
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.
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:
After inserting an element, the cursor is positioned:
The Content Completion Assistant is displayed:
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.