Edit online

Attributes View in Author Mode

The Attributes view presents all the attributes of the current element determined by the schema of the document. By default, it is located on the right side of the editor. If the view is not displayed, it can be opened from the Window > Show View menu.

You can use this view to edit or add attribute values. The attributes of an element are editable if any one of the following is true:
  • The CSS stylesheet associated with the document does not specify a false value for the -oxy-editable property associated with the element.
  • The element is entirely included in a deleted Track Changes marker.
  • The element is part of a content fragment that is referenced in Author mode from another document.
The attributes are rendered differently depending on their state:
  • The names of the attributes are rendered with a bold font, and their values with a plain font.
  • Default values are rendered with a plain font, painted gray.
  • Empty values display the text "[empty]", painted gray.
  • Invalid attributes and values are painted red.
To edit the value of the corresponding attribute, double-click a cell in the Value column. If the possible values of the attribute are specified as list in the schema of the edited document, the Value column acts as a combo box that allows you to either select the value from a list or manually enter it.
Note: If the cursor is located inside read-only content, the attribute names and values are faded and you cannot add, edit, or remove values.
You can sort the attributes table by clicking the Attribute column header. The table contents can be sorted as follows:
  • By attribute name in ascending order.
  • By attribute name in descending order.
  • Custom order, where the used attributes are displayed at the beginning of the table sorted in ascending order, followed by the rest of the allowed elements sorted in ascending order.
Figure 1. Attributes View

A drop-down list located in the upper part of the view allows you to select the current element or its ancestors.

Expand/Collapse Button

There is an Expand/Collapse (/) button at the top-right of the view. When expanded, this presents the following additional combo boxes:

Name Combo Box
Use this combo box to select an attribute. The drop-down list displays the list of possible attributes allowed by the schema of the document, as in the Attributes view. You can use the Remove button to delete an attribute and its value from the selected element.
Value Combo Box
Use this combo box to add, edit, or select the value of an attribute. If the selected attribute has predefined values in the schema, the drop-down list displays those possible values. You can use the Browse button to select a URL for the value of an attribute. You can also press Ctrl + Space to open a content completion window that offers a list of possible choices and allows you to select multiple values. After you have entered or selected a value, use the Update button (or press Enter) to add the value to the attribute.
Note: For built-in frameworks, if the selected attribute in the Name field is an @id attribute, the Browse button is replaced by a Generate Unique ID Value button. Clicking this button will automatically generate a unique ID for the selected element.

Contextual Menu Actions in the Attributes View

The following actions are available in the contextual menu of the Attributes view when editing in Author mode:
Set empty value
Specifies the current attribute value as empty.
Remove
Removes the attribute (action available only if the attribute is specified). You can invoke this action by pressing the Delete or Backspace keys.
Copy
Copies the attrName="attrValue" pair to the clipboard. The attrValue can be:
  • The value of the attribute.
  • The value of the default attribute, if the attribute does not appear in the edited document.
  • Empty, if the attribute does not appear in the edited document and has no default value set.
Paste
Depending on the content of the clipboard, the following cases are possible:
  • If the clipboard contains an attribute and its value, both of them are introduced in the Attributes view. The attribute is selected and its value is changed if they exist in the Attributes view.
  • If the clipboard contains an attribute name with an empty value, the attribute is introduced in the Attributes view and you can start editing it. The attribute is selected and you can start editing it if it exists in the Attributes view.
  • If the clipboard only contains text, the value of the selected attribute is modified.

In-place Attributes Editor

Oxygen XML Author includes an in-place attributes editor in Author mode. To edit the attributes of an XML element in-place, do one of the following:
  • Select an element or place the cursor inside it and then press the Alt + Enter keyboard shortcut.
  • Double-click any named start tag when the document is edited in one of the following display modes: Full Tags with Attributes, Full Tags, Block Tags, or Inline Tags.

This opens an in-place attributes editor that contains the same content as the Attributes view. By default, this editor presents the Name and Value fields, with the list of all the possible attributes collapsed.

Figure 2. In-place Attributes Editor

Name Combo Box
Use this combo box to select an attribute. The drop-down list displays the list of possible attributes allowed by the schema of the document, as in the Attributes view.
Value Combo Box
Use this combo box to add, edit, or select the value of an attribute. If the selected attribute has predefined values in the schema, the drop-down list displays those possible values. You can use the Browse button to select a URL for the value of an attribute. You can also press Ctrl + Space to open a content completion window that offers a list of possible choices and allows you to select multiple values.
Note: For built-in frameworks, if the selected attribute in the Name field is an @id attribute, the Browse button is replaced by a Generate Unique ID Value button. Clicking this button will automatically generate a unique ID for the selected element.
If you click More while in the collapsed version, it is expanded to the full version of the in-place attribute editor.
Figure 3. In-place Attributes Editor (Full Version)

The full version includes a table grid, similar to the Atributes view, that presents all the attributes for the selected element.