Schema-Aware Preferences
Oxygen XML Editor Eclipse plugin can use the schema of your XML language to improve the way the Author mode editor handles your content. To configure the Schema-Aware options, open the Preferences dialog box and go to .
The following options are available:
- Schema-aware normalization, format, and indent
- When you open or save a document in Author mode, white space is
normalized using the
display
property of the current CSS stylesheet and the values of the settings for Preserve space elements, Default space elements, and Mixed content elements. When this option is selected, the schema will also be used to normalize white space, based on the content model (element-only, simple-content, or mixed). Note that the schema information takes precedence. - Schema-Aware Editing
- The options in this section determine how Oxygen XML Editor Eclipse plugin will use the schema
of a document to control the behavior of the Author mode.
- On - Enables all schema-aware editing options.
- Off - Disables all schema-aware editing options.
- Custom - Allows you to select custom schema-aware editing options from the following:
- Schema-Aware Actions section
-
- Delete element tags with backspace and delete
- Controls what happens when you attempt to delete an element tag. The two
options are:
- Smart delete - If deleting the tag would make the document invalid, Oxygen XML Editor Eclipse plugin will attempt to make the document valid by unwrapping the current element or by appending it to an adjacent element where the result would be valid. For instance, if you delete a bold tag, the content can be unwrapped and become part of the surrounding paragraph, but if you delete a list item tag, the list item content cannot become part of the list container. However, the content could be appended to a preceding list item.
- Reject action when its result is invalid - A deletion that would leave the document in an invalid state is rejected.
- Paste and Drag and Drop
- Controls the behavior for paste and drag and drop actions. Available options are:
- Smart paste and drag and
drop - If the content inserted by a paste or drop action is
not valid at the cursor position, according to the schema, Oxygen XML Editor Eclipse plugin tries to find an appropriate insert position. The
possibilities include:
- Creating a sibling element that can accept the content (for example, if you tried to paste a paragraph into an existing paragraph).
- Inserting the content into a parent or child element (for example, if you tried to paste a list item into an existing list item, or into the space above or below and existing list).
- Inserting the content into an ancestor element where it would be valid.
- Reject action when its result is invalid - If selected, Oxygen XML Editor Eclipse plugin will not let you paste content into a position where it would be invalid.
- Smart paste and drag and
drop - If the content inserted by a paste or drop action is
not valid at the cursor position, according to the schema, Oxygen XML Editor Eclipse plugin tries to find an appropriate insert position. The
possibilities include:
- Typing
- Controls the behavior that takes place when typing. Available options are:
- Smart typing - If typed characters are not allowed in the element at the cursor position, but the previous element does allow text, then a similar element will be inserted, along with your content.
- Reject action when its result is invalid - If selected, and the result of the typing action is invalid, the action will not be performed.
- Content Completion
- Controls the behavior that takes place when inserting elements using the
Content Completion Assistant in Author
mode. Available options are:
- Press ENTER to show available content
completion proposals - If selected, pressing
Enter will open the
Content Completion Assistant. If deselected, there are three
possibilities:
- The current element will be split (if possible).
- A new element with the same name will be inserted (if possible).
- Otherwise, a new paragraph will be inserted.
- Show all possible elements in the content completion list - If selected, the content completion list will show all the elements in the schema, even those that cannot be entered validly at the current position. If you select an element that is not valid at the current position, Oxygen XML Editor Eclipse plugin will attempt to find a valid location to insert it and may present you with several options.
- Allow only insertion of valid elements and attributes - If selected, you can only select elements in the content completion list that are valid (according to the schema) at the current position.
- Allow only insertion of valid attribute values - If selected, you cannot enter an attribute value that is not valid (according to the schema) in the Attributes view or In-place Attributes Editor. If the attribute has a choice of values, you can select a possible value from a drop-down list in the combo box, but you cannot enter a value manually.
- Press ENTER to show available content
completion proposals - If selected, pressing
Enter will open the
Content Completion Assistant. If deselected, there are three
possibilities:
- Warn on invalid content when performing action
- A warning message will be displayed when performing an action that will result
in invalid content. Available options are:
- Delete Element Tags - If selected, a warning message will be displayed if the Delete Element Tags action will result in an invalid document. You will be asked to confirm the deletion.
- Join Elements - If selected, a warning message will be displayed if the Join Elements action will result in an invalid document. You will be asked to confirm the join.
- Automatically apply the best schema-aware insertion operation
- If selected, Oxygen XML Editor Eclipse plugin automatically uses what it considers to be the best insertion solution, when there is an attempt to insert content that is not valid in a specific context. If not selected, Oxygen XML Editor Eclipse plugin will ask the user to choose from a list of proposed solutions.
- Convert external content on paste
-
If selected, the Smart Paste feature is enabled when external content is pasted in Author mode.
- Convert even when pasting inside space-preserve elements
- If selected, the Smart Paste feature will be used even when
external content is pasted inside a space-preserve element (such as
a
<codeblock>
). - Convert pasted URLs to links
- If selected, when a URL is pasted into Author mode, a
link will be inserted (the type of link depends on the type of document). For
example, in DITA documents, an
<xref>
is inserted.