3.2. Using the attribute form
Prev | 3. Attributes tool | Next

### 3.2. Using the attribute form

Procedure for adding an attribute or changing its value:

1. Type the name of the attribute in the name field (first field of the form).

2. Press Enter or Tab to move to the value field (second field of the form).

3. Type the value of the attribute in the value field.

4. Press Enter in the value field to commit the change. This also gives the keyboard focus back to the document view.

### Tip

Both the name and value fields support auto-completion. However auto-completion in the value field only works for attributes having certain types, for example, any enumerated type, `ID`, `IDREF`, `IDREFS`.

This auto-completion feature can be configured using the Preferences dialog box.

Procedure for removing an attribute:

1. Select the attribute by either clicking on it in the attribute table or by typing its name in the name field (first field of the form).

2. Press Enter to move to the value field (second field of the form).

3. Click on the right part — the down arrow — of the Edit button.

4. Click the Remove item in the displayed menu.

Procedure for adding an attribute to an element of the unconstrained type:

1. Type any attribute name in the name field (first field of the form).

   ### Note

   If the namespace of the attribute name has not been declared, you will have to declare it using Tools → Declare Namespace before being allowed to add the attribute.

2. Type the value of the attribute in the value field (second field of the form).

3. Press Enter in the value field to commit the change. This also gives the keyboard focus back to the document view.

Procedure for adding an attribute that matches an attribute wildcard:

1. Type an attribute name that matches the wildcard in the name field (first field of the form).

   ### Note

   If the namespace of the attribute name has not been declared, you will have to declare it using Tools → Declare Namespace before being allowed to add the attribute.

2. Type the value of the attribute in the value field (second field of the form).

3. Press Enter in the value field to commit the change. This also gives the keyboard focus back to the document view.

   XXE will of course check that the name you have typed conforms to the attribute wildcard.

The attribute form contains the following buttons:

Add or change attribute

  Commits the changes. Analogous to pressing Enter in the value field.

Cancel

  Cancels the non-committed changes and clears the attribute form. Analogous to typing Esc in the name or value field.

Edit

  The right part — the down arrow — of this button displays a menu, similar to the popup menu which is displayed when you right-click on a row of the attributes table.

  The left part of this button displays a dialog box which can be used to easily specify a value for the attribute being edited. The value specified using this dialog box is directly assigned to the attribute.

  Specialized helper dialog boxes are displayed for attributes having certain types, among these types:

  - any enumerated type,

  - `ID`, `IDREF`, `IDREFS` types,

  - `hexBinary` and `base64Binary` types.

  For all other types of attributes, a very simple multi-line editor is displayed. This may be useful to view or edit attribute values which are too long to be comfortably viewed or edited using the value field.

  Note that in the case of the dialog box displayed for enumerated types and ID or IDREF types, a single click is sufficient to select a value from the displayed list. Also note that the text field above the list supports auto-completion.

Browse Files

  Displays a file chooser dialog box. The URL or filename specified using this dialog box is is directly assigned to the attribute.

  Clicking on the right part — the down arrow — of this button displays a menu with 8 radio buttons allowing to choose between:

  - Open or save files.

  - File or directories.

  - Absolute or relative paths (relative paths are relative to the location of the element being edited).

  - URL or plain file names.

  The choices made using these radio buttons are persistent during the editing session (but not across editing sessions like, for example, user preferences specified using the Preferences dialog box).

Prev | Up | Next
3.1. Using the attribute table | Home | 4. Search tool