| <?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> | |
| <!-- /******************************************************************************* | |
| * Copyright (c) 2000, 2005 IBM Corporation and others. | |
| * All rights reserved. This program and the accompanying materials | |
| * are made available under the terms of the Eclipse Public License v1.0 | |
| * which accompanies this distribution, and is available at | |
| * http://www.eclipse.org/legal/epl-v10.html | |
| * | |
| * Contributors: | |
| * IBM Corporation - initial API and implementation | |
| *******************************************************************************/ --> | |
| <link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" /> | |
| <title>Adding a global attribute</title> | |
| </head> | |
| <body id="taddglba"><a name="taddglba"><!-- --></a> | |
| <h1 class="topictitle1">Adding global attributes</h1> | |
| <div><p>A global attribute is an attribute that can be recognized anywhere in a | |
| document. Once declared, a global attribute can be referenced in one or more | |
| declarations using an attribute reference.</p><div class="skipspace"><p>The | |
| following instructions were written for the Resource perspective, but | |
| they will also work in many other perspectives.</p> | |
| <p>To add a global | |
| attribute, follow these steps:</p> | |
| </div> | |
| <ol><li class="skipspace"><span>Open your XML schema in the XML schema editor.</span></li> | |
| <li class="skipspace"><span>In the Outline view, select your schema.</span> The entire | |
| schema and its contents should be displayed in the Graph view.</li> | |
| <li class="skipspace"><span>In the Graph view, right click in the <b>Attributes</b> section | |
| and click <b> <span class="uicontrol">Add Global Attribute</span>.</b></span></li> | |
| <li class="skipspace"><span>In the Properties view, type the attribute <b> <span class="uicontrol">Name</span></b>.</span> </li> | |
| <li class="skipspace"><span>Click the <b>Browse</b> button next to the <b> <span class="uicontrol">Type</span></b> field | |
| to launch the Set Types dialog.</span></li> | |
| <li class="skipspace"><span>Select the type you want in the type | |
| list, then click <b> <span class="uicontrol">OK</span></b>. </span>The Set Type dialog lists all built-in and user-defined types currently | |
| available. You can change the <b> <span class="uicontrol">Scope</span></b> of the list by | |
| selecting one of the following options:<ul><li><b><span class="uicontrol">Workspace</span></b>. Lists all of the types available in | |
| your workspace. </li> | |
| <li><b><span class="uicontrol">Enclosing Project</span>.</b> Lists all of the types available | |
| in the project that contains your file. </li> | |
| <li>(Default) <b> <span class="uicontrol">Current Resource</span>.</b> List all of the types | |
| available in your current file.</li> | |
| </ul> | |
| </li> | |
| <li class="skipspace"><span>Click the <b> <span class="uicontrol">Documentation</span></b> tab if you want | |
| to provide any information about this global attribute.</span> The <span class="uicontrol">Documentation</span> page is used for human readable | |
| material, such as a description, and the <span class="uicontrol">App Info</span> | |
| page can be used to provide information for applications.</li> | |
| </ol> | |
| </div> | |
| </body> | |
| </html> |