Content Completion

The Content Completion feature enables inline syntax lookup and Auto Completion of mark-up elements and attributes to streamline mark-up and reduce errors while editing.

These settings define the operating mode of the content assistant.

The Content Completion preferences panel is opened from menu WindowPreferencesAuthor+Editor+Content Completion

Figure 15.13. The Content Completion preferences panel

The Content Completion preferences panel

Auto close the last opened tag

If the Use Content Completion option is not checked and if this option is checked, <oXygen/> will close the last opened tag when </ is typed.

Automatically rename matching tag

If checked, <oXygen/> will automatically rename the matching end tag when the start tag is modified in the editor.

Use Content Completion

When unchecked, all Content Completion features are disabled.

Close the inserted element

When inserting elements from the Content Completion assistant, both start and end tags are inserted.

If it has no matching tag

When checked, the end tag of the inserted element will be automatically added only if it is not already present in the document.

Add element content

When checked, <oXygen/> will insert automatically the required elements from the DTD or XML Schema. This option is applied also in the Author mode of the XML editor.

Add optional content

When checked, <oXygen/> will insert automatically the optional elements from the DTD or XML Schema. This option is applied also in the Author mode of the XML editor.

Add first Choice particle

When checked, <oXygen/> will insert automatically the first Choice particle from the DTD or XML Schema. This option is applied also in the Author mode of the XML editor.

Case sensitive search

When it is checked the search in the content completion window when you type a character is case sensitive ('a' and 'A' are different characters). This option is applied also in the Author mode of the XML editor.

Cursor position between tags

When checked, <oXygen/> will set the cursor automatically between tags. Even if the auto-inserted elements have attributes that are not required, the position of cursor can be forced between tags.

Show all entities

When checked, <oXygen/> will display a list with all the internal and external entities declared in the current document when the user types the start character of an entity reference (i.e. &).

Insert the required attributes

When checked, <oXygen/> will insert automatically the required attributes from the DTD or XML Schema for an element inserted with the help of the Content Completion assistant. This option is applied also in the Author mode of the XML editor.

Insert the fixed attributes

When checked, <oXygen/> will insert automatically any FIXED attributes from the DTD or XML Schema for an element inserted with the help of the Content Completion assistant. This option is applied also in the Author mode of the XML editor.

Show recently used items

When checked, <oXygen/> will remember the last inserted items from the Content Completion window. The number of items to be remembered is limited by Maximum number of recent items shown combo box. These most frequently used items are displayed on the top of Content Completion window and their icon is decorated with a small red square. This option is applied also in the Author mode of the XML editor.

Maximum number of recent items shown

Limits the number of recently used items presented at the top of the content completion window. This option is applied also in the Author mode of the XML editor.

Learn attributes values

When checked, <oXygen/> will display a list with all attributes values learned from the current document. This option is applied also in the Author mode of the XML editor.

Learn on open document

When checked, <oXygen/> will automatically learn the document structure when the document is opened. This option is applied also in the Author mode of the XML editor.

Learn words (Dynamic Abbreviations, available on CTRL+SPACE)

When checked, <oXygen/> will automatically learn the typed words and will make them available in a Content Completion fashion by pressing CTRL+SPACE.

Note

In order to be learned, the words need to be separated by space characters.

Annotations

The Annotations preferences panel is opened from menu WindowPreferencesAuthor+Editor+Content Completion+Annotations

Figure 15.14. The Content Completion Annotations preferences panel

The Content Completion Annotations preferences panel

Show annotations

When checked, <oXygen/> will display the annotations that are present in the used schema for the current element, attribute or attribute value. This option is applied also in the Author mode of the XML editor.

Show annotations as tooltip

If checked, it shows the annotations of elements and attributes as tooltips. This option is applied also in the Author mode of the XML editor.

Use DTD comments as annotation

When checked, <oXygen/> will use all DTD comments as annotation.

Use all Relax NG annotations as documentation

When checked any element that is not from the Relax NG namespace, that is "http://relaxng.org/ns/structure/1.0" will be considered annotation and will be displayed in the annotation window next to the content completion window and in the Model View. When unchecked only elements from the Relax NG annotations namespace, that is "http://relaxng.org/ns/compatibility/annotations/1.0" will be considered annotation.