History | Edit

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 the Attributes view to insert attributes, edit their values, or add values to existing attributes.

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.
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: Attributes View

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.

Contextual Menu Actions in the Attributes View

The following actions are available in the contextual menu of the Attributes view when editing in Text mode:

Add
Allows you to insert a new attribute. Adding an attribute that is not in the list of all defined attributes is not possible when the Allow only insertion of valid elements and attributes schema-aware option is selected.
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.