New attributes are declared for an element type. For example: If your well-formed XML document contains elements with a name of emphasis and you decide that you need an attribute for emphasis elements, you declare a new attribute for the element type emphasis. This attribute will be made available for all elements in your document with a name of emphasis.
Declaring attributes on the basis of element types instead of individual elements helps you to maintain a consistent set of attribute names for all elements of the same type.
To add an attribute for an element type in a well-formed XML document, follow these steps:
Declaring a new attribute
Choose -> from the main menu or click on the All tab in the element manager.
Select the element type for which you want to add an attribute from the list in the element manager, then click on the button.
The attribute list dialog for the selected element type will appear (see Figure 6-3). Click on the button in the attribute list dialog. The following new dialog will appear:
Enter the name of the new attribute in the entry field, then click on the button. The entry dialog will be closed and the name of the new attribute will appear in the attribute list dialog.
You can continue to add new attributes to the selected element type by clicking the button again. Click on the button when you have finished declaring new attributes for the element type in question.
The newly declared attributes are now available for all elements of the selected element type in your document.
Tip: The names of attributes that have been declared for elements in a well-formed XML document will be stored in the template for your document. They will available without the need to re-declare them for the next document that uses this document template.