| <?xml version="1.0" encoding="UTF-8"?> |
| <!DOCTYPE html |
| PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html> |
| <head> |
| <link rel="stylesheet" type="text/css" href="../org.eclipse.wst.doc.user/common.css" /> |
| <title>Creating attributes and attribute lists</title> |
| </head> |
| <body id="creatingattributes"><a name="creatingattributes"><!-- --></a> |
| |
| <h1 class="topictitle1">Creating attributes and attribute lists</h1> |
| <div><p>You can use an attribute to describe an element or provide information |
| about it. Attribute lists enable you to group together all related attributes |
| for an element. </p><div class="skipspace"><p>All elements must have their attributes listed in an attribute |
| list <img src="../images/attribute_list.gif" />. If you add an attribute <img src="../images/attribute.gif" /> to an element that does not |
| already have an attribute list, an attribute list will be created for the |
| element with a new attribute inserted in it.</p> |
| <p>To create an attribute, |
| follow these steps:</p> |
| </div> |
| <ol><li class="skipspace"><span>Open your DTD in the DTD editor.</span></li> |
| <li class="skipspace"><span>In the Outline view, right-click the element you want to work with |
| and click <span class="uicontrol">Add Attribute</span>.</span> An attribute list |
| will be created for your element if one does not already exist. </li> |
| <li class="skipspace"><span>Select the attribute you just created. </span></li> |
| <li class="skipspace"><span>In the Properties view, type the name of the attribute in the <span class="uicontrol">Name</span> field.</span></li> |
| <li class="skipspace"><span>From the <span class="uicontrol">Type</span> list, select the attribute's |
| type. </span></li> |
| <li class="skipspace"><span>From <span class="uicontrol">Usage</span> list, select the default usage |
| of the attribute.</span> It determines how the attribute can be used.</li> |
| <li class="skipspace"><span>If you selected <span class="uicontrol">#FIXED</span> or <span class="uicontrol">Default</span> as |
| the default usage of the attribute, you must enter a value in the <span class="uicontrol">Default |
| value</span> field.</span></li> |
| </ol> |
| </div> |
| |
| <div><p><b class="reltaskshd">Related tasks</b><br /> |
| <a href="../topics/tremvelm.html" title="If you have created elements, attributes, entities, notations, and comments you no longer need, you can delete any of them.">Deleting elements, attributes, entities, notations, and comments</a><br /> |
| </p> |
| </div> |
| <p> |
| (C) Copyright IBM Corporation 2000, 2005. All Rights Reserved. |
| </p> |
| </body> |
| </html> |